home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 26
/
CD_ASCQ_26_1295.iso
/
vrac
/
shwtxt19.zip
/
ATTACK.ST
< prev
next >
Wrap
Text File
|
1995-09-01
|
2KB
|
36 lines
'ATTACK.ST - Attack Game
copy(attack,2)\on intkey0 esc goto x\if`[m?] then cls\!"Mouse required."\exit
:s\nochk\cls7,0\copy(2,1)\bfill1(1,1,20,80)255 7\bfill1(2,2,19,79)32 15\csr
for%i=1to[rnd50to75]\poke1([rnd2to19],[rnd2to79])249 15\next
poke1([rnd2to19],[rnd2to79])[rnd40to41] 14\for %i=1to5\:z\%r=[rnd2to19]
%c=[rnd2to79]\if[as:1:%r:%c]<>32 z\v%i=%r\v(%i+5)=%c\v(%i+10)=[rnd1to2]
v(%i+15)=[rnd1to2]\v(%i+20)=32\next\%t=18\copy(1,0)
for%i=2to79\for%j=24to(25-[rnd0to4])nstep\bfill0(%j,%i,%j,%i)255 112\next\next
%a=20\%b=100\:k\chk\waitkey0\if key null a\if key q q\if key r r
if[.25:54:25:60]p\if[.25:72:25:77]q\if[.25:63:25:69]r
%b--\attr110\p@25,22\!%b,3lq\%r=[.r]\%c=[.c]\if[as:0:%r:%c]<>236 m
for%i=1to5\if v%i<>%r | v(%i+5)<>%c then gonext
%a--\attr110\p@25,12\!%a,2qz\save\bfill0(%r,1,%r,80)219 10
bfill0(1,%c,20,%c)219 10\gosub b\bcopy1to0(1,1,20,80)\v%i=0\if%a=0 w
if%a<5 then gonext\endif\v%i=2\v(%i+5)=[rnd2to79]\next
:m\if%b<%a l\:a\nochk\if[t0]<%t0 k\rst t0\%t0=[rnd6to9]
for%i=1to5\if v%i=0 then gonext\endif\%i5=%i+5\%it=%i+10\%if=%i+15
select case255\case[as:0:(v%i)-1:v%i5]=255\%y=2\case[as:0:(v%i)+1:v%i5]=255
%y=1\case else\if[rnd0to99]<75 then %y=v%it else %y=[rnd1to2]\endif\end select
:a1\v%it=%y
select case 255\case[as:0:v%i:(v%i5)-1]=255\%x=2\case[as:0:v%i:(v%i5)+1]=255
%x=1\case else\if[rnd0to99]<75 then %x=v%if else %x=[rnd1to2]\endif\end select
:a2\v%if=%x
bcopy1to0(v%i,v%i5,v%i,v%i5)\select case%y\case1\v%i--\case2\v%i++\end select
select case %x\case1\v%i5--\case2\v%i5++\end select\poke0(v%i,v%i5)236 10
if [t1]<%t|[as:0:24:v%i5]<>255 then gonext\endif\rst t1\%t=[rnd3to45]
bfill0(v%i+1,v%i5,24,v%i5)179 12\wait.2\gosub b\bcopy1to0(v%i+1,v%i5,24,v%i5)
if bsame0to2(24,1,24,80)l\next\goto k\:p\bfill0(25,54,25,60)attr207\waitkey
if`[.25:54:25:60]p\bfill0(25,54,25,60)attr79\goto k\:b\for %boom=1 to 8
bmod0(1,1,25,80),,255\next\ret\:r\save\bcopy2to0(5,19,17,62)\waitkey\restore
goto k\:w\attr206\p@12,24\!" Y O U W I N ! "\goto q
:l\attr206\p@12,24\!" Y O U L O S E "
:q\attr75\p@13,24\!" GAME OVER - Play Again? (Y or N) ";\waitkey
if key y s\if key n x\if[.13:50:13:50]s\if[.13:55:13:55]x\goto q\:x\exitc