-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathave.bas
611 lines (609 loc) · 21.9 KB
/
ave.bas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
10 REM ------------------------------------------------------------------------
20 REM ----------------------- AVENTURA EN EL ESPACIO -------------------------
30 REM ---------------------------- ESTEBAN H.N. ------------------------------
40 REM -------------- LICENCIA GPLv3 (SEE AT THE END OF THE FILE) -------------
50 CALL &BB03
60 ENV 1,10,-1,5
70 ENT 1,15,1,1
80 ENV 2,10,-5,5
90 ENV 3,50,-1,20
100 ENV 4,50,-1,30
110 DIM xmar(25),ymar(25)
120 DIM marx(25),mary(25)
130 DIM basx(25),basy(25)
140 DIM extra (400)
150 SPEED INK 5,5
160 SYMBOL AFTER 100
170 SYMBOL 200,0,192,47,50,50,47,192,0
180 SYMBOL 201,0,0,56,28,11,8,16,96
190 SYMBOL 202,16,48,80,144,8,8,6,7
200 SYMBOL 203,8,16,16,8,4,250,14,0
210 SYMBOL 204,128,112,8,4,4,11,28,0
220 SYMBOL 205,0,0,0,0,0,7,7,14
230 SYMBOL 206,0,0,0,0,0,192,96,48
240 SYMBOL 207,14,7,3,0,0,0,0,0
250 SYMBOL 208,32,224,224,128,0,0,0,0
260 SYMBOL 209,0,0,0,0,0,0,0,1
270 SYMBOL 210,0,0,0,0,0,0,128,192
280 SYMBOL 211,1
290 SYMBOL 212,192
300 SYMBOL 213,0,0,0,0,4,0,8,16
310 SYMBOL 214,0,0,32,96,240,48,24,8
320 SYMBOL 215,112,8,6,3,3,4,0,0
330 SYMBOL 216,16,0,0,112,248,4,0,0
340 SYMBOL 217,16,28,36,198,227,36,56,8
350 SYMBOL 218,0,0,24,32,4,24,0,0
360 SYMBOL 219,0,0,0,24,24,0,0,0
370 SYMBOL 220,0,3,244,76,76,244,3,0
380 SYMBOL 221,16,56,56,40,0,0,0,0
390 SYMBOL 222,126,255,255,255,255,255,255,126
400 SYMBOL 223,0,0,0,0,126,255,255,255
410 SYMBOL 224,14,56,112,112,112,112,56,14
420 SYMBOL 225,0,6,15,15,15,15,9,0
430 SYMBOL 226,127,255
440 SYMBOL 227,252,254,15,7,3,3,3,3
450 SYMBOL 228,0,0,0,0,0,0,255,127
460 SYMBOL 229,3,3,3,3,7,15,254,252
470 SYMBOL 230,127,240
480 SYMBOL 231,252,2,1,1,1,1,1,1
490 SYMBOL 232,0,0,0,0,0,0,240,127
500 SYMBOL 233,1,1,1,1,1,1,2,252
510 SYMBOL 234,154,125,60,126,126,60,254,57
520 SYMBOL 235,192,224,240,240,240,240,224,192
530 SYMBOL 236,3,7,15,15,15,15,7,3
540 SYMBOL 237,66,165,165,165,102,90,231,189
550 SYMBOL 238,66,231,66,33,66,132,66,66
560 SYMBOL 239,70,146,223,28,177,22,202,81
570 SYMBOL 244,96,144,144,96,0,240,0,0
575 SYMBOL 245,0,0,128,126,129,126,128,0
580 choque1$=CHR$(201)+CHR$(202)+CHR$(8)+CHR$(8)+CHR$(10)+CHR$(204)+CHR$(203)
590 choque2$=CHR$(205)+CHR$(206)+CHR$(8)+CHR$(8)+CHR$(10)+CHR$(207)+CHR$(208)
600 choque3$=CHR$(209)+CHR$(210)+CHR$(8)+CHR$(8)+CHR$(10)+CHR$(211)+CHR$(212)
610 choque4$=CHR$(213)+CHR$(214)+CHR$(8)+CHR$(8)+CHR$(10)+CHR$(215)+CHR$(216)
620 bas$=CHR$(226)+CHR$(227)+CHR$(8)+CHR$(8)+CHR$(10)+CHR$(228)+CHR$(229)
630 borbas$=CHR$(230)+CHR$(231)+CHR$(8)+CHR$(8)+CHR$(10)+CHR$(232)+CHR$(233)
640 y=225
650 vida=3:g=9.8:mov=8:gdif=1:ga=g
660 c1=90:c2=88:c3=67:c4=240:c5=242:c6=243:c7=241
670 FOR n=1 TO 5:ac(n)=600+p:p=p+100:NEXT n:p=0
680 INK 1,0:PEN 1:MODE 0:LOCATE 7,12:PRINT"AVENTURA":LOCATE 7,14:PRINT"ESPACIAL":FOR n=1 TO 24:INK 1,n:SOUND 2,(n^2),1,15:FOR ret=1 TO 25:NEXT ret:NEXT n
690 LOCATE 4,18:PRINT CHR$(164);"ESTEBAN H. N."
700 LOCATE 6,20:PRINT"05/09/1988"
710 WHILE INKEY(47)=-1:WEND
720 REM ------------------------------ MENU -----------------------------------
730 MODE 1:INK 1,24:INK 2,10:INK 3,15:PEN 1
740 LOCATE 18,1:PRINT"TECLAS"
750 LOCATE 3,3:PRINT"[";CHR$(c1);"]":LOCATE 4,5:PRINT CHR$(252)
760 LOCATE 7,3:PRINT"[";CHR$(c2);"]":LOCATE 8,5:PRINT CHR$(217)
770 LOCATE 11,3:PRINT"[";CHR$(c3);"]":LOCATE 12,5:PRINT CHR$(245)
780 LOCATE 16,3:PRINT"CONTROLES"
790 LOCATE 20,7:PRINT CHR$(200)
800 LOCATE 20,5:PRINT CHR$(c4)
810 LOCATE 18,7:PRINT CHR$(c5)
820 LOCATE 22,7:PRINT CHR$(c6)
830 LOCATE 20,9:PRINT CHR$(c7)
840 LOCATE 26,3:PRINT CHR$(225);" 100 PUNTOS"
850 LOCATE 26,5:PEN 3:PRINT CHR$(223);:PEN 1:PRINT" 100 PUNTOS"
860 LOCATE 26,7:PEN 2:PRINT CHR$(221);:PEN 1:PRINT" 50 PUNTOS"
870 LOCATE 24,8:PRINT BAS$;" 1000 PTOS+";CHR$(200)
880 LOCATE 17,12:PRINT"~ MENU ~"
890 LOCATE 3,14:PRINT"1";CHR$(244);"GRADO DE DIFICULTAD"
900 LOCATE 3,16:PRINT"2";CHR$(244);"VELOCIDAD"
910 LOCATE 3,18:PRINT"3";CHR$(244);"GRAVEDAD DEL PLANETA"
920 LOCATE 12,20:PRINT"ELIJA OPCION (1-3)"
930 LOCATE 9,23:PRINT"[ESPACIO] PARA EMPEZAR"
940 a$=INKEY$
950 IF INKEY(47)=0 THEN 1040
960 IF a$="" OR a$<"1" OR a$>"3" THEN 940
970 IF a$="1" THEN LOCATE 26,14:PRINT"<=(1-5)=>";:b$=INKEY$:IF b$="" OR b$<"1" OR b$>"5" THEN 970 ELSE gdif=VAL(b$)
980 IF a$="2" THEN LOCATE 18,16:PRINT"<=(2-32)=> ";:INPUT "",mov:IF mov<2 OR mov>32 THEN LOCATE 28,16:PRINT" ":GOTO 980
990 IF a$="3" THEN LOCATE 26,18:PRINT"<=(0-20)=> ";:INPUT "",ga:IF ga<1 OR ga>20 THEN LOCATE 37,18:PRINT" ":GOTO 990
1000 LOCATE 26,14:PRINT" "
1010 LOCATE 18,16:PRINT" "
1020 LOCATE 26,18:PRINT" "
1030 GOTO 940
1040 REM -----------------------INICIALIZA VARIABLES --------------------------
1050 INK 1,24
1060 IF puntos>=2000 AND pu=0 THEN vida=vida+1:pu=1
1070 CALL &BD19:OUT &BC00,1:OUT &BD00,0
1080 MODE 0:PAPER 0:BORDER 0
1090 INK 0,0:INK 1,24:INK 2,15:INK 3,17:INK 4,13:INK 5,8:INK 6,24:INK 7,20:INK 8,10:INK 9,21:INK 10,20:INK 12,24:INK 13,20:INK 14,26,10:INK 15,24
1100 IF tiempo=0 THEN 1140
1110 puntos=puntos+1000-((tiempo*3)+100)
1120 tiempo=0
1130 IF puntos<0 THEN puntos=0
1140 x=2:g=ga:dado=0
1150 IF pant=3 THEN ar=0
1160 bals=1000:balt=1000
1170 IF pant>=8 THEN 1210
1180 IF der=0 AND pant=3 THEN de=0:ar=0
1190 IF pant>=3 THEN fase=0:der=1:GOTO 1340
1200 fase=1
1210 FOR estr=1 TO 640 STEP 10
1220 es=es+1
1230 IF es>3 THEN es=1
1240 alt=INT(RND*400)
1250 PLOT estr,alt,11+es
1260 NEXT
1270 IF pant>=18 THEN 4520
1280 IF pant>=13 THEN 1300
1290 IF pant>=8 THEN 1340
1300 mont=1
1310 altu=5
1320 IF pant>=13 THEN 1340
1330 GOTO 1490
1340 bala=1
1350 IF x THEN FOR n=10 TO 20 STEP 2:bala=bala+1:xmar(n)=0:ymar(n)=0:NEXT:FOR n=1 TO 3:bala=bala+1:extra(bala)=0:NEXT:bala=1
1360 balx=0:baly=0:disp=0:bals=0:balt=0:tie=0
1370 IF pant>=8 THEN 1490
1380 MODE 0
1390 a=-28.8
1400 FOR n=1 TO 25
1410 a=a+28.8
1420 b=INT(RND*400):IF b<250 OR b>380 THEN 1420
1430 PLOT a,b,2
1440 IF n=1 THEN c=a:d=b
1450 DRAW c,d,2
1460 c=a:d=b
1470 NEXT
1480 MOVE 2,380:FILL 2
1490 REM ------------------------- PARA PRIMERA FASE --------------------------
1500 IF pant>=13 THEN 1550
1510 IF pant>8 THEN mont=3.5:GOTO 1550
1520 IF pant>=3 THEN mont=2:GOTO 1550
1530 IF pant=2 THEN 3650
1540 IF fase=1 THEN PEN 12:LOCATE 2,15:PRINT CHR$(224)
1550 a=-28.8
1560 FOR n=1 TO 25
1570 a=a+28.8
1580 b=INT(RND*100*mont):IF b<10*altu THEN 1580
1590 PLOT a,b,2
1600 IF n=1 THEN c=a:d=b
1610 DRAW c,d,2
1620 IF b>d THEN xmar(n)=c:ymar(n)=d:basx(n)=(a+c)/2:basy(n)=(b+d)/2
1630 c=a:d=b
1640 NEXT
1650 MOVE 2,2:FILL 2
1660 REM ------------ INSTALACION DE MISILES VERTICALES Y BASES ---------------
1670 IF pant>=13 THEN 4430
1680 IF pant>=3 THEN 1700
1690 IF fase=1 THEN 3650
1700 FOR n=10 TO 20 STEP 2
1710 IF basx(n)=0 OR basy(n)=0 THEN 1750
1720 TAG
1730 MOVE basx(n)-16,basy(n),10:PRINT CHR$(225);
1740 TAGOFF
1750 NEXT
1760 mis=0
1770 FOR n=10 TO 20 STEP 2
1780 IF xmar(n)<20 OR ymar(n)<20 THEN 1870
1790 IF pant>8 THEN bas1=0
1800 TAG
1810 MOVE xmar(n)-16,ymar(n),10:PRINT CHR$(223);
1820 MOVE xmar(n)-16,ymar(n)+16,8:PRINT CHR$(221);
1830 bala=bala+1
1840 mis=mis+1
1850 extra(bala)=n
1860 TAGOFF
1870 NEXT
1880 IF pant<>8 THEN 1940
1890 PEN 15:LOCATE 10,4:PRINT bas$
1900 IF gdif<2 THEN 1940
1910 PRINT CHR$(22);CHR$(1)
1920 PEN 2:LOCATE 10,4:PRINT borbas$
1930 PRINT CHR$(22);CHR$(0)
1940 pant=pant+1
1950 REM ---------------------- INSTALA MARCADORES ----------------------------
1960 PRINT CHR$(22);CHR$(1)
1970 FOR n=1 TO (vida*2)-2 STEP 2
1980 PEN 5:LOCATE n,25:PRINT CHR$(220);
1990 NEXT n
2000 PEN 1:LOCATE 8,25:PRINT"PUNTOS: ";USING"####";puntos
2010 LOCATE 1,1
2020 PRINT CHR$(22);CHR$(0)
2030 CALL &BD19:OUT &BC00,1:OUT &BD00,40
2040 GOTO 2190
2050 REM ------------------------- DIBUJA NAVE --------------------------------
2060 TAG
2070 IF s=x AND t=y THEN son=0:GOTO 2090
2080 MOVE s,t,0:PRINT nave$;
2090 MOVE x,y,1:PRINT nave$;
2100 SOUND 4,1500-(de*4),5,5
2110 TAGOFF
2120 REM ---------------------- PARA PANTALLA FINAL ---------------------------
2130 IF pant>=19 THEN 2140 ELSE 2190
2140 PRINT CHR$(22);CHR$(1)
2150 PEN 10
2160 IF comp>=1 THEN LOCATE 17,7:PRINT CHR$(236):GOTO 2180
2170 LOCATE 11,7:PRINT CHR$(235)
2180 PRINT CHR$(22);CHR$(0)
2190 REM ---------------------- OPCION DE MOVIMIENTO---------------------------
2200 IF tiempo=300 THEN SOUND 4,142,90,15,2:INK 1,9,24
2210 IF pant<3 THEN tiempo=tiempo+1:IF tiempo>525/gdif THEN 3670
2220 IF INKEY(0)=0 THEN ar=ar+2:GOTO 2240
2230 IF fase=1 OR pant>8 THEN ar=ar-0.5*gdif
2240 IF INKEY(2)=0 THEN ar=ar-2
2250 IF pant=19 THEN 2280
2260 IF pant>8 AND INKEY(8)=0 THEN de=de-1:IF de<1 THEN de=1
2270 IF fase=0 THEN de=de+2:GOTO 2290
2280 IF INKEY(1)=0 THEN de=de+2
2290 IF INKEY(8)=0 THEN de=de-2
2300 IF INKEY(63)=0 THEN dado=0:GOTO 3030
2310 IF INKEY(79)=0 THEN 5580
2320 IF INKEY(66)=0 THEN WHILE INKEY$="":WEND
2330 IF disp=1 THEN 2850
2340 IF de>=0 THEN nave$=CHR$(200):xx=x+32:yy=y-8:vo=16+de:dir=1:ELSE nave$=CHR$(220):xx=x-2:yy=y-8:vo=16+de:dir=-1
2350 IF INKEY(71)=0 THEN disp=1:SOUND 2,50,30,15,1,1
2360 IF INKEY(62)=0 THEN disp=1:g=0:SOUND 2,50,30,15,1,1
2370 IF ar>mov THEN ar=mov
2380 IF ar<-mov THEN ar=-mov
2390 IF de>mov THEN de=mov
2400 IF de<-mov THEN de=-mov
2410 altu=5
2420 IF fase=1 OR pant>=19 THEN 2450
2430 REM ------------------- MOV.DE MISILES VERTICALES ------------------------
2440 GOTO 3520
2450 REM ------------------------- MOV.DE LA NAVE -----------------------------
2460 s=x:t=y
2470 x=x+de
2480 y=y+ar
2490 IF x<0 THEN x=0
2500 IF x>608 THEN 1040
2510 IF y>400 THEN y=400
2520 IF TEST(x+16,y-2)=2 THEN 2620
2530 IF TEST(x+30,y-4)=2 THEN 2620
2540 IF TEST(x+30,y-10)=2 THEN 2620
2550 IF TEST(x+16,y-10)=2 THEN 2620
2560 IF pant=19 AND TEST(x,y-16)=10 THEN 5090
2570 IF TEST(x+30,y-4)=15 THEN 4380
2580 IF TEST(x+30,y-10)=15 THEN 4380
2590 IF TEST(x,y)=2 THEN 2620
2600 IF TEST(x,y-16)=2 THEN 2620
2610 GOTO 2060
2620 REM ------------------- DIBUJA ESTALLIDO DE LA NAVE ----------------------
2630 TAG
2640 MOVE s,t,0:PRINT CHR$(200);
2650 TAGOFF
2660 PRINT CHR$(22);CHR$(1)
2670 PEN 6:LOCATE x/32+0.5,(400-y)/16+0.5:PRINT choque3$
2680 PEN 3:LOCATE x/32+0.5,(400-y)/16+0.5:PRINT choque2$
2690 PEN 4:LOCATE x/32+0.5,(400-y)/16+0.5:PRINT choque4$
2700 PEN 5:LOCATE x/32+0.5,(400-y)/16+0.5:PRINT choque1$
2710 PRINT CHR$(22);CHR$(0)
2720 ENV 1,14,-1,10
2730 SOUND 4,500,175,15,1,,25
2740 dado=0
2750 FOR n=1 TO 1000:NEXT n
2760 vida=vida-1
2770 pant=pant-1
2780 comp=0
2790 ar=0:de=0:disp=0
2800 IF vida=0 THEN 5580
2810 y=225
2820 tiempo=300
2830 IF pant>7 THEN y=384
2840 GOTO 1040
2850 REM ------------------- RUTINA DE MOV. DE LA BALA -----------------------
2860 IF g=0 THEN tie=tie+0.5 ELSE tie=tie+0.25
2870 balx=xx+vo*tie*dir
2880 baly=yy-g/2*tie^2
2890 PLOT bals,balt,0
2900 IF g=0 THEN 2950
2910 IF TEST(balx,baly-2)=2 THEN 3030
2920 IF TEST(balx,baly-2)=8 THEN destrba=1:puntos=puntos+50:GOTO 3030
2930 IF pant=19 AND TEST(balx,baly-2)=10 THEN puntos=puntos+100:SOUND 4,50,90,15,2:comp=comp+1:GOTO 3030
2940 IF TEST(balx,baly-2)=10 THEN puntos=puntos+100:SOUND 4,50,90,15,2:GOTO 3030
2950 IF TEST(balx+4,baly)=2 THEN 3030
2960 IF TEST(balx+4,baly)=8 THEN destrba=1:puntos=puntos+50:GOTO 3030
2970 IF pant=19 AND TEST(balx+4,baly-2)=10 THEN puntos=puntos+100:SOUND 4,50,90,15,2:comp=comp+1:GOTO 3030
2980 IF TEST(balx+4,baly)=10 THEN puntos=puntos+100:SOUND 4,50,90,15,2:GOTO 3030
2990 IF balx>640 OR balx<0 THEN disp=0:tie=0:g=ga:GOTO 2370
3000 PLOT balx,baly,1
3010 bals=balx:balt=baly
3020 GOTO 2370
3030 REM ---------------------- ESTALLIDO DE LA BALA --------------------------
3040 PLOT balx,baly,0
3050 IF (400-baly)/16>24 THEN 2370
3060 IF (400-baly)/16>25 THEN inc=-2
3070 IF (400-baly)/16<0.5 THEN inc=0.5
3080 IF balx>608 THEN balx=608
3090 IF fase=1 OR pant>13 THEN LOCATE balx/32+1,(400-baly)/16+inc:PRINT" "
3100 IF gdif>2 THEN 3200
3110 IF ast=1 THEN 3120 ELSE 3200
3120 PEN 0:LOCATE balx/32+0.5,(400-baly)/16+0.5:PRINT choque1$
3130 PRINT CHR$(22);CHR$(1)
3140 PEN 6:LOCATE balx/32+0.5,(400-baly)/16+0.5:PRINT choque3$
3150 PEN 3:LOCATE balx/32+0.5,(400-baly)/16+0.5:PRINT choque2$
3160 PEN 4:LOCATE balx/32+0.5,(400-baly)/16+0.5:PRINT choque4$
3170 PEN 5:LOCATE balx/32+0.5,(400-baly)/16+0.5:PRINT choque1$
3180 PRINT CHR$(22);CHR$(0)
3190 GOTO 3260
3200 PRINT CHR$(22);CHR$(1)
3210 PEN 6:LOCATE balx/32+1,(400-baly)/16+inc:PRINT CHR$(219)
3220 PEN 3:LOCATE balx/32+1,(400-baly)/16+inc:PRINT CHR$(218)
3230 PEN 5:LOCATE balx/32+1,(400-baly)/16+inc:PRINT CHR$(217)
3240 PRINT CHR$(22);CHR$(0)
3250 inc=0
3260 ENV 1,14,-1,10
3270 SOUND 1,500,100,15,1,,10
3280 balx=0:baly=0:bals=1000:balt=1000:disp=0:tie=0:g=ga:inc2=0
3290 IF comp=1 THEN LOCATE 11,7:PRINT " "
3300 IF comp>2 THEN comp=2
3310 IF comp=2 THEN 4950
3320 IF destrba=1 THEN 3520
3330 GOTO 2370
3340 REM ------------------- ESTALLIDO DE MISILES VERTICALES ------------------
3350 IF xmar(extra(bala))=0 THEN 2370
3360 TAG
3370 MOVE xmar(extra(bala))-16,ymar(extra(bala))+16,0:PRINT CHR$(221);
3380 IF ymar(extra(bala))>384 THEN ymar(extra(bala))=384
3390 TAGOFF
3400 PRINT CHR$(22);CHR$(1)
3410 PEN 5:LOCATE (xmar(extra(bala))-16)/32+1,(400-(ymar(extra(bala))+16))/16+0.5:PRINT CHR$(217)
3420 PEN 3:LOCATE (xmar(extra(bala))-16)/32+1,(400-(ymar(extra(bala))+16))/16+0.5:PRINT CHR$(218)
3430 PEN 6:LOCATE (xmar(extra(bala))-16)/32+1,(400-(ymar(extra(bala))+16))/16+0.5:PRINT CHR$(219)
3440 PRINT CHR$(22);CHR$(0)
3450 ENV 1,14,-1,10
3460 SOUND 2,500,100,15,1,,10
3470 xmar(extra(bala))=0
3480 extra(bala)=0
3490 destrba=0
3500 IF dado=1 THEN 2620
3510 GOTO 2370
3520 REM ---------------- RUTINA DE MOV.DE MISILES VERTICALES------------------
3530 IF bala>=mis+1 THEN bala=1
3540 bala=bala+1
3550 s=x:t=y
3560 IF xmar(extra(bala))=0 THEN 3610
3570 ymar(extra(bala))=ymar(extra(bala))+8
3580 TAG
3590 MOVE xmar(extra(bala))-16,ymar(extra(bala))+16,8:PRINT CHR$(221);
3600 TAGOFF
3610 IF destrba=1 THEN 3340
3620 IF TEST(xmar(extra(bala))-4,ymar(extra(bala))+20)=2 THEN 3340
3630 IF TEST(xmar(extra(bala))-4,ymar(extra(bala))+20)=1 THEN dado=1:puntos=puntos+5:GOTO 3340
3640 GOTO 2450
3650 REM -------------------- DATOS DE LA PRIMERA FASE ------------------------
3660 pant=pant+1
3670 IF pant>=2 THEN 3770
3680 FOR n=1 TO 20
3690 PEN 2:LOCATE n,1:PRINT CHR$(222)
3700 NEXT n
3710 FOR n=1 TO 3
3720 FOR mur=1 TO 19
3730 PEN 2:LOCATE 8+n,mur:PRINT CHR$(222)
3740 NEXT mur,n
3750 IF tiempo THEN tiempo=0:GOTO 2190
3760 GOTO 1950
3770 REM ----------------------- SEGUNDA PANTALLA -----------------------------
3780 IF pant=3 THEN 4150
3790 tiempo=0
3800 FOR n=1 TO 20
3810 PEN 2:LOCATE n,1:PRINT CHR$(222)
3820 NEXT n
3830 mur$=CHR$(222)+CHR$(222)+CHR$(222)
3840 FOR n=1 TO 4
3850 LOCATE 6,1+n:PRINT CHR$(222)
3860 NEXT n
3870 FOR n=1 TO 4
3880 LOCATE 10,1+n:PRINT mur$
3890 NEXT n
3900 FOR n=1 TO 4
3910 LOCATE 16,1+n:PRINT CHR$(222)
3920 NEXT n
3930 FOR n=0 TO 8
3940 LOCATE 5,6+n:PRINT CHR$(222);CHR$(222)
3950 NEXT
3960 FOR n=0 TO 8
3970 LOCATE 10,6+n:PRINT mur$
3980 NEXT n
3990 FOR n=0 TO 8
4000 LOCATE 16,6+n:PRINT CHR$(222);CHR$(222)
4010 NEXT n
4020 FOR n=0 TO 3
4030 LOCATE 5,15+n:PRINT CHR$(222);CHR$(222)
4040 NEXT
4050 FOR n=0 TO 3
4060 LOCATE 11,15+n:PRINT CHR$(222)
4070 NEXT
4080 FOR n=0 TO 3
4090 LOCATE 16,15+n:PRINT CHR$(222);CHR$(222)
4100 NEXT
4110 FOR n=0 TO 12
4120 LOCATE 5+n,19:PRINT CHR$(222)
4130 NEXT
4140 GOTO 1950
4150 REM --------------- TERCERA PANTALLA.ULTIMA PRIMERA FASE -----------------
4160 RESTORE 4220
4170 PLOT 0,40,2
4180 FOR n=1 TO 26
4190 READ a,b
4200 DRAW a,b,2
4210 NEXT n
4220 DATA 80,60,120,40,240,80,280,60,380,90
4230 DATA 400,110,420,120,440,140,440,160,420,180
4240 DATA 440,210,420,230,400,260,420,270,420,280
4250 DATA 400,290,400,300,360,310,340,320,320,340
4260 DATA 340,350,340,360,360,370,360,380,320,390,320,400
4270 PLOT 640,180
4280 FOR n=1 TO 14
4290 READ a,b
4300 DRAW a,b,2
4310 NEXT n
4320 MOVE 638,4:FILL 2
4330 PEN 12:LOCATE 2,15:PRINT CHR$(224)
4340 DATA 620,170,600,190,580,160,540,170,520,190
4350 DATA 540,210,520,220,520,240,540,260,560,250
4360 DATA 580,270,600,240,620,260,640,250
4370 GOTO 1950
4380 REM ----------------------- ENTRADA EN LA BASE ---------------------------
4390 vida=vida+1
4400 puntos=puntos+1000
4410 PEN 0:LOCATE 10,4:PRINT bas$
4420 GOTO 2590
4430 REM ---------------------- DIBUJA ASTEROIDES -----------------------------
4440 ast=1
4450 FOR n=1 TO 20:PEN 2:LOCATE n,1:PRINT CHR$(234):NEXT n
4460 FOR n=1 TO 60
4470 asx=INT(RND*20):IF asx<5 THEN 4470
4480 asy=INT(RND*25):IF asy<1 OR asy>20 THEN 4480
4490 PEN 2:LOCATE asx,asy:PRINT CHR$(234)
4500 NEXT n
4510 GOTO 1700
4520 REM ------------------------- PANTALLA FINAL -----------------------------
4530 ast=0
4540 RESTORE 4600
4550 PLOT 0,64,2
4560 FOR n=1 TO 44
4570 READ a,b
4580 DRAW a,b,2
4590 NEXT n
4600 DATA 32,48,48,64,64,48,96,64,128,80
4610 DATA 144,96,160,128,176,144,160,160,176,176
4620 DATA 192,192,208,224,224,256,208,272,224,288
4630 DATA 224,304,240,320,256,336,272,336,288,320
4640 DATA 288,272,304,256,320,272,320,336,336,368
4650 DATA 368,352,400,368,416,352,448,384,464,384,464,400
4660 DATA 496,400,496,384,512,368,528,368,544,352
4670 DATA 544,288,560,272,576,288,576,336,592,352
4680 DATA 608,352,624,368,624,400
4690 PLOT 336,160,2
4700 FOR n=1 TO 30
4710 READ a,b
4720 DRAW a,b,2
4730 NEXT n
4740 DATA 352,176,368,192,384,192,400,208,416,192
4750 DATA 432,192,448,176,480,192,512,208,496,240
4760 DATA 448,240,432,272,464,304,512,304,528,272
4770 DATA 544,256,560,240,576,224,576,208,560,176
4780 DATA 528,160,512,128,480,112,432,096,400,096
4790 DATA 384,096,368,112,352,128,336,144,336,160
4800 MOVE 48,32:FILL 2
4810 INK 1,0
4820 MOVE 352,160:FILL 1
4830 INK 1,24
4840 MOVE 352,160:FILL 0
4850 PEN 10
4860 LOCATE 15,10:PRINT CHR$(223)
4870 PRINT CHR$(22);CHR$(1)
4880 LOCATE 11,7:PRINT CHR$(235)
4890 LOCATE 17,7:PRINT CHR$(236)
4900 PRINT CHR$(22);CHR$(0)
4910 LOCATE 13,19:PRINT CHR$(237)
4920 pant=pant+1
4930 IF pant>19 THEN pant=19
4940 GOTO 1950
4950 REM ---------------- DESTRUCCION MONTA\A ULTIMA PANTALLA -----------------
4960 FOR n=18 TO 1 STEP -1
4970 PEN 10:LOCATE 13,n:PRINT CHR$(238)
4980 FOR te=1 TO 32 STEP 4
4990 IF TEST(x+te,y+te)=10 THEN 2620
5000 NEXT te
5010 IF n<15 THEN LOCATE 13,n+4:PRINT" "
5020 SOUND 2,(n^2),1,15
5030 NEXT
5040 PLOT 380,185,0:DRAW 380,400,0:PLOT 416,185,0:DRAW 416,400,0
5050 FOR n=4 TO 1 STEP -1
5060 LOCATE 13,n:PRINT" "
5070 NEXT n
5080 GOTO 3330
5090 REM ---------------------------- LLEGADA ---------------------------------
5100 SPEED INK 32,32
5110 INK 1,24:INK 2,2,24:INK 10,24,2
5120 FOR N=32 TO 1 STEP -1
5130 FOR ret=1 TO 100:NEXT ret
5140 SPEED INK n,n
5150 NEXT n
5160 FOR n=1 TO 200:NEXT n
5170 INK 10,26:INK 2,26:INK 1,26:SOUND 2,50,300,15
5180 FOR n=0 TO 26
5190 FOR pluma=3 TO 15:INK pluma,n:NEXT pluma
5200 INK 0,n
5210 BORDER n
5220 FOR ret=1 TO 50:NEXT ret
5230 NEXT n
5240 INK 0,0:INK 1,24:INK 2,15:INK 10,20:BORDER 0
5250 SOUND 4,500,175,15,1,,25
5260 SOUND 1,1000,850,15,3,,30
5270 SOUND 2,3000,800,15,4,,25
5280 TAG
5290 ORIGIN 480,256
5300 explo=10
5310 FOR n=1 TO 175
5320 MOVE explo*COS(n),explo*SIN(n),2:PRINT CHR$(239);
5330 explo=explo+1
5340 NEXT n
5350 INK 2,26:FOR n=1 TO 10:NEXT n:INK 2,0:INK 0,0:BORDER 0:INK 10,0:INK 1,24
5360 TAGOFF
5370 MODE 0:INK 1,24:INK 3,17:INK 14,26,10
5380 PEN 1:CLEAR INPUT:SPEED INK 2,2
5390 LOCATE 5,1:PRINT"[FANTASTICO!"
5400 LOCATE 1,3:PRINT"[LO HAS CONSEGUIDO!"
5410 LOCATE 2,5:PRINT"Por el merito a tu"
5420 LOCATE 4,7:PRINT"labor se te ha"
5430 LOCATE 7,9:PRINT"nombrado"
5440 PEN 14
5450 LOCATE 8,11:PRINT"CAPITAN"
5460 PEN 1
5470 LOCATE 5,13:PRINT"en el manejo"
5480 LOCATE 7,15:PRINT"de naves"
5490 LOCATE 4,17:PRINT"TELE TRIPULADAS"
5500 LOCATE 8,19:PRINT"en el"
5510 LOCATE 1,21:PRINT"GRADO DE DIFICULTAD"
5520 PEN 14
5530 LOCATE 9,23:PRINT gdif
5540 PEN 3
5550 LOCATE 3,25:PRINT"PULSAR UNA TECLA"
5560 WHILE INKEY$="":WEND
5570 GOTO 5640
5580 REM ----------------------- TERMINA LA PARTIDA ---------------------------
5590 INK 1,24:PEN 1
5600 PRINT CHR$(22);CHR$(1)
5610 LOCATE 7,13:PRINT"SE ACABO"
5620 PRINT CHR$(22);CHR$(0)
5630 FOR ret=1 TO 3000:NEXT ret
5640 ac(0)=puntos
5650 FOR x=0 TO 5
5660 FOR n=0 TO 5
5670 IF n=5 THEN c=ac(n):d=c:GOTO 5700
5680 IF ac(n)>ac(n+1) THEN 5690 ELSE 5720
5690 c=ac(n):d=ac(n+1)
5700 ac(n)=d
5710 ac(n+1)=c
5720 NEXT n
5730 NEXT x
5740 BORDER 0:MODE 1:PEN 1
5750 LOCATE 11,6:PRINT"MEJORES PUNTUACIONES"
5760 LOCATE 13,9:PRINT"1";CHR$(244);".....";ac(5)
5770 LOCATE 13,11:PRINT"2";CHR$(244);".....";ac(4)
5780 LOCATE 13,13:PRINT"3";CHR$(244);".....";ac(3)
5790 LOCATE 13,15:PRINT"4";CHR$(244);".....";ac(2)
5800 LOCATE 13,17:PRINT"5";CHR$(244);".....";ac(1)
5810 puntos=0:vida=3:tiempo=0
5820 pant=0:y=225:x=2:ast=0
5830 ar=0:de=0:disp=0:comp=0
5840 WHILE INKEY(47)=-1:WEND
5850 CLEAR INPUT
5860 GOTO 720
6000 ' ------------------------------------------------------------------------
6010 ' ---------------------------- LICENSE GPLv3 -----------------------------
6020 ' ------------------------------------------------------------------------
6030 ' Aventura Espacial situada en un planeta inhospito, donde el piloto
6040 ' debera sortear todo tipo de obstaculos hasta llevar su nave a la
6050 ' mas recondita de las cuevas y aterrizarla en un lugar adecuado.
6060 '
6070 ' Copyright (C) 1988 @estbhan (Esteban H.N.)
6080 '
6090 ' This program is free software: you can redistribute it and/or modify it
6100 ' under the terms of the GNU General Public License as published by the
6110 ' Free Software Foundation, either version 3 of the License, or (at your
6120 ' option) any later version.
6130 '
6140 ' This program is distributed in the hope that it will be useful, but
6150 ' WITHOUT ANY WARRANTY; without even the implied warranty of
6160 ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6170 ' GNU General Public License for more details.
6180 '
6190 ' You should have received a copy of the GNU General Public License along
6200 ' with this program. If not, see <https://www.gnu.org/licenses/>.
6210 ' -----------------------------------------------------------------------