missile xxďxNuclear Attack by Matthew Homer from ZX Computing Dec.83/Jan.84 To start:10 *** NOTE *** This program requires Issue 2 emulation because of its use of IN for keyboard scanning. [JimG] yxx=5:ss=0:pp=42*:0:5:5:0:0:0:0::.5,30 g(7):mm=7:vv=0:g(1)=28:g(2)=60<:g(3)=92\:g(4)=128:g(5)=164:g(6)=196:g(7)=228 ab=28:ss=0:c$(4,14):c(3):c(1)=0:c(2)=0:c(3)=0:6050 >Variables: a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,w,x,y,z ]Variables: z$,aa,bb,cc,dd,ee,ff,gg,hh,ii,jj,kk,ll,mm,nn,oo,pp,qq,rr,ss,tt,uu,vv,ww,xx,yy,zz 'Variables: ab,ac,ad,ae,af,ah,ai,aj,ak 4000 M0:7:0:0:0:0:1::6080   "Nuclear Attack" + Written BY....  Matthew Homer  1983  ss<0ss=0 .5,30 pz(30):m(30):q(30):i(11 ,2):a(11 ):d(11 ):e(11 ):f(11 ) "oad=0:yy=0:t=0:rr=0:kk=9 :ll=12 :nn=0:oo=125}:qq=14 #aj=0:jj=6:ii=0:aa=1:cc=1:dd=0:ee=1:ff=1:gg=1:hh=1:bb=0:s=0:b=0:p=0 %V0,10 ;" ";1;9 ;0,10 ;"SCORE ";ss ( 2127,0 <x=16:y=10 =c=20:n=20 >1;y,x;"X" Ayyabii=1 Bb>jj21004 C b=b+1 Db>10 b=b-1 Eb>10 Fyy=yy+1 Gf(b)=(*10 )-4 I4d(b)=g(((*mm))+1)-175*(f(b)/5) Ke(b)=175 R&i(b,1)=d(b):i(b,2)=e(b) Z'd(b)<0d(b)>25571G _ b>1 d 0 e"b=0mm=02200 f>ii65A n a=1b se(a)<57200  xd(a),e(a):f(a),-4 #e(a)=e(a)-5:d(a)=d(a)+f(a) ad=13060 ak=1:(d(a),e(a)-1)=1ƫ((175-e(a))/8,d(a)/8)=pp8000@ c65278<253ſ64510+65022+57342+49150<10201000 a >.9ffff3000 c65278<253ſ64510+65022+57342+49150<10201000 bb=1  100d  c=x:n=y x=x+(64510=251) y=y-(57342<255) x=x-(64510=253)  y=y+(49150<255) x<0x=0 y<0y=0 y>20y=20 x>31x=31 c=xn=y2050 1:y,x;"X" .1:0:n,c;"X":0:0 $65278<2536000p   4 ii=.8L  67C mm02210 yyab65A  2500 $5,8;" " $6,8;" " $7,8;" " $9 ,8;" " %10 ,8;" " %11 ,8;" " ba=40(0-1:a*.002xn,a:a:a=3069E:.0015wD,a:a:100d 81:1:7:1:0:0:  w=0  0,11 ;"SCOREBOARD" i3,0;" SCORE NAME"''" 1 ";14-c(1);c(1)," ";c$(1) 7,0;" 2 ";14-c(2);c(2)," ";c$(2)''" 3 ";14-c(3);c(3)," ";c$(3) 7,154:240,0:0,-64@:-240,0:0,64@:7,142:240,0 O32 ,154:0,-64@:127,154:0,-64@ ^12 ,6;"YOUR SCORE.. ";12 ,18;"........";12 ,(26-ss);ss w>02370B (a=13:ss>c(a)2316 a:2370B 616,2;"You have the Number ";a;" score." <"Please ENTER your name (up to 14 letters)...";c$(4) w=2a-1 c$(w+1)=c$(w) c(w+1)=c(w) w  w=2 $ c(a)=ss .c$(a)=c$(4) 3416,2;" " 8 2285 B*18,6;"C=Copy of scoreboard" L.16,4;"Please make a choice...." Q%''" E=End the Program " V%" S=Start another game " `a$=:a$=""2400` ia$="e"a$="E" ja$="e"a$="E" ta$="s"a$="S"2422v u 2430~ vmxx=5:pp=42*:0:5:5:0:0:0:0::.5,30 wg(7):mm=7:vv=0:g(1)=28:g(2)=60<:g(3)=92\:g(4)=128:g(5)=164:g(6)=196:g(7)=228 xab=28:6050 ~a$="c"a$="C"2438  2370B L:.5,30:18,6;" ":2380L A0:0:1:4:0:0:0: y=0:n=0 e17,2;"CITY POINTS..................";19,2;"MISSILE POINTS..............." "0,10 ;"BONUS POINTS" *a=1mm:g(a)=1282513 a:2520 5w=amm-1:g(w)=g(w+1):w:mm=mm-1 %3,5;"CITIES REMAINING" 5,7;"NONE" a=1mm '5,4*a-1;" " ?y=y+2000:17,30-y;y:.025{L,30 a '8,5;"MISSILES REMAINING" &t3010 ,7;"NONE" c=0:w=100d a=1(30-t) a*15+10 -c,w:-1,-1:-1,-2:0,-5:-2,-2:2,-4:0,-5:-2,-2:0,-3:6,-2:0,1 a*15+10 -c,w:1,-1:1,-2:0,-5:2,-2:-2,-4:0,-5:2,-2:0,-3:-6,-2:0,1 >n=n+500:19,30-n;n:.025{L,35# a=15w=70F a=15c=225 a (Yss=ss+n+y:21,2;"NEW SCORE....................";21,30-ss;ss -vv=22700 2ss100000CP2640P <ss50000P2640P F 2700 P(vv=1ss<100000CP2700 R'vv=vv+1:mm62700 Umm=mm+1 Z g(mm)=ww d51;6;1,9 ;"BONUS CITY " 9a=1502:a:"Press ENTER to Continue....";a$ xx=62717 xx=42715 Zxx=4:pp=34":0:4:4:0:0:0:0: 2720 Zxx=6:pp=502:0:6:6:0:0:0:0: 2720 Zxx=5:pp=42*:0:5:5:0:0:0:0: 1a=1mm:tt=(g(a)+3)/8-2 5jj=jj+2:ab=ab+1:21,tt;"":a mm=mm+1:g(mm)=128 $0,0:255,0 6213E 20 ad=1160 ad=1:8 ac=0 132 ac=ac+1 11 ,ac;"" '(11 ,ac+2)=pp5000 >.33050 ac>273050 1ae=16+ac*8:af=(ac+2)/4 /ae>g(af)-6ae10 b=b-1 0b>10 3050 :yy=yy+1 Df(b)=1 Nd(b)=g(af)-15.4vfff X9e(b)=75K:i(b,1)=d(b):i(b,2)=80P ])d(b)-1,80P:1,-5 b 3050 a=0151 b  ""+a,b a  11 ȕ6,6,22,30,95_,95_,127,255,28,28,92\,92\,125},125},253,255 ҏ0,0,64@,96`,104h,232,250,255,7,7,15,15,15,15,7,7 ܑ224,224,240,240,240,240,224,224,0,0,0,0,0,0,1,3 0,0,0,0,60<,255,255,255,0,0,0,0,0,0,128,192 3,1,0,0,0,0,0,0,255,255,255,60<,0,0,0,0 192,128,0,0,0,0,0,0,60<,126~,255,255,255,255,126~,60< 0,0,24,60<,60<,24,0,0,192,244,127,63?,127,195,7,14 192,224,240,252,255,240,192,0,60<,126~,90Z,126~,60<,219,60<,195 12 ,14,7,3,7,12 ,0,0,12 ,14,255,255,255,63?,124|,224 "E0,0,0,192,240,0,0,0 %ai=83S:ah=ac*8+20 ?11 ,0;" ";y,x;"X"  aj=1 hss=ss+3000 :0,10 ;" ";1;9 ;0,10 ;"SCORE ";ss  5010 ah=d(a):ai=e(a) Mai-10 >174ah-10 <0ah+10 >2555013  5014 !.025{L,20:5190F  ak=0 ak=ak+1 w=152 ah-w,ai-w:1,0 "ah-w*2,ai:1,0 ah+w,ai-w:1,0 "ah+w*2,ai:1,0 ah+w,ai+w:1,0 "ah,ai+w*2:1,0 ah-w,ai+w:1,0 "ah,ai-w*2:1,0 <w >ak=11 ?!ak=1.025{L,20 @ak=15015 A 0 Faj=1ad=0 Haj18002B K aj=0 P 100d pt307069 q 1 r4o=x*8-112p-kk:r=170-y*8-ll s oo,qq:o,r t oo,qq:o,r x 0 zA1:oo-1,qq:2,0:oo,qq:0,5 nn=0ll=ll-4 )nn=0kk=kk+21-ll*1.5@ &nn=0nn=24-ll*1.5@ kk=kk-6 nn=nn-6  oo=kk+116t:qq=ll+2 /t<29ll<0kk=216214F 0:7000X 0:5:5:0:0:0::10 ,4;"Do you want instructions?":w=1100d:w b$=:b$=""6051 b$="y"b$="Y"6054  61986 $:0,9 ;"YOUR BRIEFING" c'"You are in charge of a Surface- to-Air Guided Missile base at the outbreak of nuclear war..." e'"Your job is to defend 5 cities and your own missile launching site from the nuclear missiles.." '"You have THIRTY Surface-to-Air missiles, up to 10 of these willbe at the launching site at any time. If the site is hit, all missiles present will be destroyed." }'"Be careful, you are the last line of defence; the longer you can hold off the attack the morepeople can be evacuated." [w=1500:w:#1;1,2;"PRESS ANY KEY TO CONTINUE...":0 (:0,6;"TECHNICAL DETAILS" '"The Surface-to-Air missiles are guided by moving the ""X"" to the point that the missile is to explode...to destroy a Nuclear Missile or Plane,you can move the ""X"" in 8 directions." 6:w=9 21:w,0;" ":w:12 ,0;" " *1;"1 2 3 4 5 6 7 8 9 0 " m1'"Q ";1;"W ";5;0;"E ";6;0;"R T ";2;"Y U I O P " R" ";1;" ";5;"";0;" ";2;" " 0" ";3;" " 91;"A S D F G ";3;"H J K L " E1'" Z ";4;"X C V ";0;"B N M " <" ";4;" ";0;" " 8:0,0:255,0:0,104h:-255,0:0,-104h:0,78N:255,0 >1;9 ,0;" KEYBOARD DIAGRAM WITH KEY USES." 1;1;11 ,4;"LEFT";5;0;"RIGHT";6;"";2;"UP";3;"DOWN";4;"FIRE" [w=1500:w:#1;1,2;"PRESS ANY KEY TO CONTINUE...":0 (5::0,12 ;"SCORING" '"For each missile shot down you get 1000 points, For each city and each Surface-to-Air missile remaining intact at the end of a barrage you receive bonus points; after 50,000 & 100,000 you receive a bonus city..." '"You can shoot missiles down while moving your sights in any of 8 directions. Experience willshow you that it is best to fireyour missiles into the path of your target." #''"Good Luck ... You'll need it." Qw=1500:w:''" PRESS ANY KEY TO CONTINUE...":0:61986 S3,14;"";4,12 ;"";5,11 ;"" ]6,11 ;"";7,10 ;"";8,11 ;"" U9 ,11 ;"";10 ,12 ;"";11 ,14;"" X12 ,13 ;"";13 ,11 ;"";14,12 ;"" ]15,13 ;"";16,12 ;"";17,8;"" '18,7;"" _0,0:255,0:0,175:-255,0:0,-175 _4,4:247,0:0,167:-247,0:0,-167 _8,8:239,0:0,159:-239,0:0,-159 51;2;19,9 ;"STOP THE TAPE" K4;1;6,12 ;"NUCLEAR";7,12 ;"ATTACK."  a=44,208159 a,150:-5,-9 ,/2:0,-40(:-10 ,-10 :5,-5:5,-10 :0,-20:-10 ,-10 :0,-10 :10 ,-5 a,150:5,-9 ,-/2:0,-40(:10 ,-10 :-5,-5:-5,-10 :0,-20:10 ,-10 :0,-10 :-10 ,-5:0,2:-10 ,0:0,-2 ?a,101e:0,-25:a,568:0,-25 I1;3;18,(a/8);"";19,(a/8);"" 5:a-2,137:0,-3:1,0:1,1:0,2:-1,1:-1,0:a-2,126~:0,3:1,1:1,-1:0,-3:0,2:-1,0 a-2,122z:0,4:2,-4:0,4:a,120x:-1,0:-1,-1:0,-2:1,-1:1,0:0,2 a,114r:-2,0:0,-2:2,0:-2,0:0,-2:2,0:a-2,104h:0,4:1,0:1,-1:-1,-1:1,-1:0,-1 U7:a-4,144:8,0:a-4,142:8,0 13 ,(a/8);"" կa-4,61=:1,0:1,-1:1,0:1,1:1,0:1,-1:1,0:1,1:1,0 ֯a-4,59;:1,0:1,-1:1,0:1,1:1,0:1,-1:1,0:1,1:1,0 a 8#1;1,3;"PRESS ANY KEY TO BEGIN...." 0w=50235#-1:=""6130 w=110 : r.015zu\,w:.025{L,*100d-35#:.025{L,*502-25:.025{L,*20-10 :w "w=110 :w:0: 66ak=1::10 ,8;"""NUCLEAR ATTACK""" 7ss=-1:'5;"press any key to start":w=-112 :.025{L,*100d-40(:.025{L,w*5:w:0: 8z=212 4 B21,z;"" C21,z+17;"" Dz Eak=1:6320 F0:wwww=0 Ga=03 Hz=a+wwwwwwww+3 I1:115s+(z*6),2+(a*4):2,0:116t+(z*6),2+(a*4):0,5 Jz Kwwww=wwww-.5 L a:0 Mak=16229U Nt196225Q OB23280Z,63?:23281Z,63?:23282Z,63? P 6229U QB23276Z,63?:23277Z,63?:23278Z,63? U ak=0 V$0,0:255,0 `@kk=9 :ll=12 :nn=0:oo=125}:qq=14 ss=-120   7000X  6430 $0,0:255,0 %a=20687P22223V256  a,60< a 22479W,126~ %a=20719P22299W256 b  a,b a G255,231,231,231,231,195,129 (%a=20716P22296W256 2b,c,d g(w)-87231? >w:7996< Czz=w H#tt=(d(a)+3)/8-2 R@19,tt+1;" ";20,tt;" ";21,tt;" " \ uu=g(w) d$0,0:255,0 fJuu-4,1:7,0:uu-2,2:3,0 kpuu-5,2:9 ,0:uu-7,1:13 ,0:uu-2,3:3,0 puu-4,3:7,0:uu-6,2:11 ,0:uu-2,4:3,0:uu-9 ,1:17,0:uu-1,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d(w)=d(h) x f(w)=f(h) zi(w,1)=i(h,1) {i(w,2)=i(h,2) |w  b=b-1 rr=16214F  rr=0  100d #( #- #2"missile"10 ' Fig.1 %%'YNuclear Attack by Matthew Homer from ZX Computing Dec'83/Jan'84 WTYPING TIPS The following lines may be left out or replaced to save space. rLines 2210-2438 This routine forms the score- board, but could always be re- placed with a statement. CLines 6080-6120 The display when the program is first run. Lines 7268-7620 The nuclear explosion & mushroomcloud. These may be replaced by the far less spectacular routineshown below. dC1:19,tt;"";20,tt;"";21,tt;"" fmw=03010 :.08}# =,w:.08}# =,25-w:w:w=15:.1}L,-30:w kC0:19,tt;" ";20,tt;" ";21,tt;" " p$0,0:255,0