home *** CD-ROM | disk | FTP | other *** search
/ Floppy Magazine 1986 #3 / Floppy_Magazine_86-3_1986_Megasystems_Oy_fi.d64 / castle (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  5KB  |  175 lines

  1. 10 rem  castle 20.3.1986   v 223.0
  2. 20 rem by arttu suihkonen
  3. 30 rem
  4. 50 printchr$(8):poke895,0
  5. 80 poke900,10:poke910,0:poke890,3
  6. 85 poke913,0:poke914,0:poke808,232
  7. 90 poke53280,0:poke53281,0:poke908,0
  8. 105 ifa=0thena=1:load"super ork89",8,8
  9. 110 ifb=0thenb=1:load"4.ork2",8,8
  10. 115 ifc=0thenc=1:load"ca 37",8,8
  11. 120 ifd=0thend=1:load"msb 9",8,1
  12. 125 ife=0thene=1:load"game over",8,8
  13. 127 ifk=0thenk=1:load"music 21",8,8
  14. 128 iff=0thenf=1:load"pr. game*",8,8
  15. 130 ifi=0theni=1:load"se 5",8,8,8
  16. 135 gosub3100:sys51350:sys49400
  17. 139 fora=832to838:pokea,1:next:print"[147]"
  18. 140 poke203,64:goto350
  19. 150 sys51040
  20. 330 fort=0to2000:next:poke53269,0
  21. 332 print"[147]":poke913,0:poke914,0:return
  22. 350 poke53280,0:poke53281,0
  23. 370 poke56341,50:sys49710:print"[147]"
  24. 590 v=53248:print"":poke53269,0
  25. 600 poke890,3:gosub1680
  26. 620 ax=230:ac=231:lv=0:poke924,0:poke850,ax:poke851,ac:gosub1080:poke203,64
  27. 630 poke53264,0:sys49710:jh=0:ai=150
  28. 700 pokev+28,1:gosub920:poke53278,0:sys51418:poke53278,0
  29. 710 poke203,64:ifpeek(901)<>0then1570
  30. 715 ifpeek(203)=60then7000
  31. 720 ifpeek(203)=3then1680
  32. 730 ifpeek(910)<>0thensc=sc+peek(910)*100:poke910,0:gosub920
  33. 740 ifpeek(900)=0then1420
  34. 810 ai=ai-1:gosub920:goto710
  35. 920 poke646,k:print"time";ai;"[157] "
  36. 930 printtab(12)"[145][154]score";sc;" "
  37. 940 printtab(28)"[145][145]level[150]";lv;"[157]  "
  38. 950 print"[156]lives";peek(890);"[157]  ":ifpeek(890)=0then1410
  39. 955 ifsc=>hcthen hc=sc
  40. 960 printtab(12)"[154][145]hi-score[154]";hc;"  "
  41. 970 ifai=0thensys49400:poke53269,1:poke53264,0:sys50615:goto1570
  42. 990 return
  43. 1080 lv=lv+1:iflv=10thenax=230:ac=231
  44. 1090 poke924,lv:lv=peek(924):iflv=20thengosub1890:gosub1500:goto1680
  45. 1110 gosub150:poke53269,0:poke53264,0
  46. 1122 ax=ax+2:ac=ac+2:r=int(9*rnd(1))
  47. 1125 poke850,ax:poke851,ac:poke900,10
  48. 1130 ai=150:iflv>1thensc=sc+lv*100
  49. 1200 iflv<04thenk=03:g=06:goto1252
  50. 1205 iflv<06thenk=06:g=13:goto1252
  51. 1210 iflv<08thenk=05:g=01:goto1252
  52. 1215 iflv<11thenk=02:g=10:goto1252
  53. 1220 iflv<13thenk=03:g=07:goto1252
  54. 1225 iflv<15thenk=08:g=04:goto1252
  55. 1230 iflv<17thenk=14:g=07:goto1252
  56. 1234 iflv<20thenk=02:g=06:goto1252
  57. 1252 iflv<05thenrt=15:goto1260
  58. 1255 rt=31:poke2040,215
  59. 1260 print"[147]":gosub920:poke898,k
  60. 1265 pokev+28,1:poke921,g:poke925,r
  61. 1330 poke920,peek(52000+lv-1):lk=lk+1
  62. 1380 sys51490:poke918,rt
  63. 1400 iflv=5orlv=10orlv=15thenpoke890,peek(890)+1:sys50315:goto1405
  64. 1403 fort=0to250:next
  65. 1405 poke56341,49:poke924,lv:return
  66. 1410 gosub1890:gosub1500:goto1680
  67. 1420 pokev+21,1
  68. 1425 fort=1toai:sc=sc+10:ai=ai-1
  69. 1445 ifsc=>hcthen hc=sc
  70. 1460 print"time";ai;"[157] "
  71. 1470 print"";tab(12)"[154]score";sc
  72. 1475 print"";tab(12)"[154]hi-score";hc
  73. 1480 nextt:fora=1to200:nexta
  74. 1490 gosub1080:goto630
  75. 1500 pokev+21,0:ifsc<=no(9)thenreturn
  76. 1509 ni$="  ":sys49400:gosub5400
  77. 1510 n$=in$:poke53269,0
  78. 1520 no(9)=sc:ni$(9)=n$:fori=9to1step-1
  79. 1530 ifno(i)<=no(i-1)thengy=1:goto1680
  80. 1540 no(i)=no(i-1):no(i-1)=sc
  81. 1550 ni$(i)=ni$(i-1):ni$(i-1)=n$:next
  82. 1560 gy=1:goto1680
  83. 1570 ai=150:poke53269,1:poke53278,0
  84. 1575 poke53264,0:poke908,0:sys49400
  85. 1660 ifpeek(890)=0thenpokev+21,rt-1:goto1410
  86. 1665 sys50488:poke901,0
  87. 1670 print"";tab(5)"";peek(890)" ":fora=0to100:next:goto630
  88. 1680 print"[147]":poke53276,0:poke53269,0
  89. 1690 poke890,3:poke53280,0:poke53281,0
  90. 1710 poke203,64:v=53248:pokev+21,0
  91. 1715 poke56341,50:hc=no(0):printchr$(8)
  92. 1720 pokev+28,0:sys49400:lk=lk+1
  93. 1740 print"[154]   [201][202][193][194]89<=\[146] @a[146]         [193][194] 89[146] \"
  94. 1750 print"[154]   [203][204][195][196]:;>?^_bc[146]      by [195][196].:;[146]uihkonen":poke895,0
  95. 1760 print"[156]hi-score table":poke53264,0
  96. 1780 print
  97. 1810 print"[159]     fire to start game [159]  f7 new game":poke1787,0
  98. 1812 print"[c] mcmlxxxvi     helsinki"
  99. 1815 poke906,0:gosub6040
  100. 1820 ifgy=1thengy=0:gosub3200
  101. 1822 iflk=10thenlk=0:run135
  102. 1840 j2=peek(56320):sys50990:poke1787,0
  103. 1870 ifj2=111orpeek(203)=60thenpoke890,3:sc=0:poke53269,0:goto620
  104. 1875 ifpeek(203)=4thengosub6000
  105. 1877 ifpeek(203)=3thengosub8000
  106. 1880 goto1840
  107. 1890 sys50488:sys49710:poke53269,rt-1
  108. 1897 sys49386:print""peek(890)"[157]  ":sys51120:sys51090:poke56341,50
  109. 1950 fori=0to76:sys51120:fort=0to150:next:next
  110. 1960 return
  111. 3100 rem *** scoren loudaus levylta ***
  112. 3102 poke54296,0:sys51400:open 1,8,15
  113. 3105 open2,8,2,"-high scores-,s,r"
  114. 3110 gosub3500:fori=0to9:input#2,ni$(i):input#2,no(i):next:close2:close1
  115. 3150 poke54296,15:sys49400:return
  116. 3200 rem *** scoren seivaus levylle ***
  117. 3201 poke54296,0:sys51400
  118. 3205 open2,8,2,"@0:-high scores-,s,w"
  119. 3210 fori=0to9:print#2,ni$(i):print#2,no(i):next:close2
  120. 3300 sys49400:poke54296,15:return
  121. 3500 rem ** disk error routine **
  122. 3501 poke53269,0:input#1,a$,b$,c$,d$
  123. 3502 ifval(a$)=0thenreturn
  124. 3505 poke53280,0:poke53281,11:print"[147]"
  125. 3510 print"disk error[146]: "b$
  126. 3520 close2:close1:print" insert disk to drive "
  127. 3600 print" and press any key."
  128. 3610 ifpeek(203)<>64thenrun135
  129. 3620 goto3610
  130. 5400 bl$="                                       ":poke53264,0:sys50532:le=15
  131. 5405 poke53280,0:poke53281,0:print"[147]"
  132. 5407 print""tab(14)"[163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  133. 5410 cr$=chr$(13):de$=chr$(20):c=1
  134. 5420 v$=""
  135. 5425 msg$="[146]your name:":li=6:col=4
  136. 5430 y9=2:in$="":uc=0:ub$=left$(bl$,le):gosub 5530:ub$=" ":uc=3
  137. 5440 ut=ti
  138. 5450 geta$:ifa$=""then5510
  139. 5460 ifa$=cr$theny9=2:gosub5530:print "[157][157] ":return
  140. 5470 if a$=de$thenon-(len(in$)=0)goto 5510:in$=left$(in$,len(in$)-1):goto5510
  141. 5480 if (asc(a$)and127)<32 or a$=chr$(34) then 5510
  142. 5490 if le=len(in$) then 5510
  143. 5500 in$=in$+a$
  144. 5510 gosub 5530:if ti-ut<10 then 5450
  145. 5520 y9=3-y9:goto 5440
  146. 5530 print left$(v$,li)tab(col-1)mid$(msg$,y9)ub$in$mid$(" [146]",y9,uc)" ";:return
  147. 5999 rem nimi taulukoiden printtaus
  148. 6000 poke203,64:wq=peek(906):sys50990
  149. 6010 ifwq=0thenpoke906,5:goto6040
  150. 6020 ifwq=5thenpoke906,0:goto6040
  151. 6035 sys50990
  152. 6040 print"[144]";:sys20430
  153. 6062 wq=peek(906):fori=wqtowq+4
  154. 6065 sys50990:tq=6:ifi>8thentq=5
  155. 6070 ifno(i)<100thenni$(i)="floppy 1986
  156. 6071 [139]no(i)[179]1000000[167]tb[178]24
  157. 6072 [158]50990:[139]no(i)[179]100000[167]tb[178]25
  158. 6074 [139]no(i)[179]10000[167]tb[178]26
  159. 6076 [139]no(i)[179]1000[167]tb[178]27
  160. 6078 [158]50990:[139]no(i)[179]100[167]tb[178]29
  161. 6110 [153][163]tq)i[170]1"cmd. "ni$(i)
  162. 6111 [153]"on"[163]tb[170]2)no(i)
  163. 6120 [158]50990:[130]:[158]20415:[142]
  164. 7000 [143] pause -rutiini
  165. 7015 [153]""[163]28)"pause game"
  166. 7020 [158]49400:
  167. 7021 [139][194](203)[178]60[167]7021
  168. 7030 [139][194](203)[178]60[167]7040
  169. 7035 [137]7030
  170. 7040 [153]""[163]28)"           ":[129]t[178]0[164]100:[130]:[151]203,0:[158]49386:[137]710
  171. 8000 [143] hi-score listan puhdistus
  172. 8005 [151]54296,0:[158]51400:[159]2,8,2,"@0:-high scores-,s,w":[129]i[178]0[164]9:no(i)[178]1000
  173. 8010 ni$(i)[178]"floppy 1986 ":[152]2,ni$(i):[152]2,no(i):[130]:[160]2
  174. 8020 [138]135
  175.