'The program starts with SPIRITS.BAS ,but you should change the
'"maxstars=30" line in STAGE.BAS in order to slow down the program if you
'run it on faster computers.  It was made on a 486SX/33 so it will be too
'fast on most other computers. 

DEFINT A-Z
CLS : SCREEN 9: WIDTH 80, 43: CLS
J = 1: DIM T(100)
FOR JE = 1 TO 100: T(JE) = JE * 5: NEXT JE

KEYPRESS:
CHO$ = INKEY$
LINE (10, 10)-(620, 330), 4, B: LINE (10, 110)-(620, 110), 4: LINE (10, 220)-(620, 220), 4: LINE (320, 10)-(320, 330), 4
G = 1: F = 1
X = 145: Y = 40
GOSUB StarBase
G = 4: F = 14
X = 145: Y = 270
GOSUB PHANTOM
X = 5: Y = 5
G = 9: F = 2
X = 465: Y = 270
GOSUB OVAL
G = 2: F = 4: LA = 12: LB = 14: LC = 1
X = 145: Y = 190
GOSUB Sir
G = 1: F = 4: LA = 5: LB = 2: LC = 3
X = 465: Y = 190
GOSUB SPIRE
G = 4: F = 1: LA = 12
X = 465: Y = 58
GOSUB TANK
IF CHO$ = CHR$(0) + "M" THEN J = J + 1: IF J > 6 THEN J = 1
IF CHO$ = CHR$(0) + "K" THEN J = J - 1: IF J < 1 THEN J = 6
IF CHO$ = CHR$(0) + "H" THEN J = J - 2
IF CHO$ = CHR$(0) + "H" AND J = -1 THEN J = 6
IF CHO$ = CHR$(0) + "H" AND J = 0 THEN J = 5
IF CHO$ = CHR$(0) + "P" THEN J = J + 2
IF CHO$ = CHR$(0) + "P" AND J = 7 THEN J = 2
IF CHO$ = CHR$(0) + "P" AND J = 8 THEN J = 1
IF CHO$ = "1" THEN J = 1
IF CHO$ = "2" THEN J = 2
IF CHO$ = "3" THEN J = 3
IF CHO$ = "4" THEN J = 4
IF CHO$ = "5" THEN J = 5
IF CHO$ = "6" THEN J = 6
IF CHO$ = " " AND J = 1 OR CHO$ = CHR$(13) AND J = 1 THEN SHIP$ = "Star Base": ENERGY = 20: SPEED = 4: BOMBS = 3
IF CHO$ = " " AND J = 2 OR CHO$ = CHR$(13) AND J = 2 THEN SHIP$ = "Star Tank": ENERGY = 40: SPEED = 3: BOMBS = 5
IF CHO$ = " " AND J = 3 OR CHO$ = CHR$(13) AND J = 3 THEN SHIP$ = "Paladon": ENERGY = 15: SPEED = 6: BOMBS = 7
IF CHO$ = " " AND J = 4 OR CHO$ = CHR$(13) AND J = 4 THEN SHIP$ = "Dark Spire": ENERGY = 15: SPEED = 6: BOMBS = 4
IF CHO$ = " " AND J = 5 OR CHO$ = CHR$(13) AND J = 5 THEN SHIP$ = "Phantom": ENERGY = 10: SPEED = 7: BOMBS = 3
IF CHO$ = " " AND J = 6 OR CHO$ = CHR$(13) AND J = 6 THEN SHIP$ = "Oval": ENERGY = 12: SPEED = 7: BOMBS = 2
IF CHO$ = " " OR CHO$ = CHR$(13) THEN GOTO AFILE
COLOR 15, 0
LOCATE 13, 15: PRINT "Star Base"
LOCATE 13, 55: PRINT "Star Tank"
LOCATE 27, 16: PRINT "Paladon"
LOCATE 27, 54: PRINT "Dark Spire"
LOCATE 41, 16: PRINT "Phantom"
LOCATE 41, 57: PRINT "Oval"
IF J = 1 THEN COLOR 1, 0: LOCATE 13, 15: PRINT "Star Base"
IF J = 2 THEN COLOR 4, 0: LOCATE 13, 55: PRINT "Star Tank"
IF J = 3 THEN COLOR 11, 0: LOCATE 27, 16: PRINT "Paladon"
IF J = 4 THEN COLOR 0, 0: LOCATE 27, 54: PRINT "Dark Spire"
IF J = 5 THEN COLOR 14, 0: LOCATE 41, 16: PRINT "Phantom"
IF J = 6 THEN COLOR 9, 0: LOCATE 41, 57: PRINT "Oval"

  A$ = "    *    *    *    *    *    *    *    *    *    *    *    *    *    *    *    *    "
  WHILE INKEY$ <> "": WEND 'Clear keyboard buffer

      FOR A = 1 TO 5
      LOCATE 1, 1                             'print horizontal sparkles
      PRINT MID$(A$, A, 80);
      LOCATE 43, 1
      PRINT MID$(A$, 6 - A, 80);
      FOR B = 2 TO 42                         'Print Vertical sparkles
        C = (A + B) MOD 5
        IF C = 1 THEN
          LOCATE B, 80
          PRINT "*";
          LOCATE 44 - B, 1
          PRINT "*";
        ELSE
          LOCATE B, 80
          PRINT " ";
          LOCATE 44 - B, 1
          PRINT " ";
        END IF
      NEXT B
    NEXT A

GOTO KEYPRESS

AFILE:
OPEN "TEMP.DAT" FOR OUTPUT AS #1
WRITE #1, SHIP$, ENERGY, SPEED, BOMBS
CLOSE #1
RUN "STAGE.BAS"

StarBase:
LINE (X - T(15), Y + T(6))-(X - T(15), Y + T(8)), G
LINE (X + T(15), Y + T(6))-(X + T(15), Y + T(8)), G
LINE (X - T(15), Y + T(6))-(X + T(15), Y + T(6)), G
LINE (X - T(15), Y + T(8))-(X - T(10), Y + T(4)), G
LINE (X - T(10), Y + T(4))-(X - T(5), Y + T(2)), G
LINE (X - T(5), Y + T(2))-(X, Y), G
LINE (X, Y)-(X + T(5), Y + T(2)), G
LINE (X + T(5), Y + T(2))-(X + T(10), Y + T(4)), G
LINE (X + T(10), Y + T(4))-(X + T(15), Y + T(8)), G
PAINT (X, Y + T(2)), G
CIRCLE (X, Y), T(3), F: PAINT (X, Y - T(2)), F
RETURN

PHANTOM:
LINE (X - T(10), Y + T(6))-(X + T(10), Y + T(5)), F, BF: LINE (X, Y - T(6))-(X - T(10), Y + T(6)), F: LINE (X, Y - T(6))-(X + T(10), Y + T(6)), F
PAINT (X, Y), F
CIRCLE (X, Y), 5, G: PAINT (X, Y), G
CIRCLE (X, Y + T(3)), 10, G: PAINT (X, Y + T(3)), G
LINE (X - T(10), Y + T(6))-(X - T(8), Y), F, BF: LINE (X + T(10), Y + T(6))-(X + T(8), Y), F, BF
LINE (X - T(8), Y + T(6))-(X - T(7), Y + T(3)), G, BF: LINE (X + T(8), Y + T(6))-(X + T(7), Y + T(3)), G, BF
CIRCLE (X - T(9), Y + T(1)), 3, G: PAINT (X - T(9), Y + T(1)), G
CIRCLE (X + T(9), Y + T(1)), 3, G: PAINT (X + T(9), Y + T(1)), G
RETURN

OVAL:
LINE (X - T(13), Y + T(5))-(X + T(13), Y + T(6)), G, BF
LINE (X - T(13), Y + T(5))-(X, Y - T(6)), G: LINE (X + T(13), Y + T(5))-(X, Y - T(6)), G
PAINT (X, Y + T(1)), G
CIRCLE (X - T(13), Y + T(5)), T(5), F: CIRCLE (X + T(13), Y + T(5)), T(5), F: CIRCLE (X, Y - T(5)), T(5), F
PAINT (X - T(14), Y + T(6)), F: PAINT (X + T(14), Y + T(6)), F: PAINT (X, Y - T(7)), F
RETURN

Sir:
sx = X: sy = Y
LINE (sx - T(10), sy)-(sx + T(10), sy), G
LINE (sx - T(10), sy)-(sx, sy - T(15)), G
LINE (sx + T(10), sy)-(sx, sy - T(15)), G
PAINT (sx, sy - T(5)), G
LINE (sx - T(4), sy)-(sx - T(4), sy - T(11)), H
LINE (sx + T(4), sy)-(sx + T(4), sy - T(11)), H
LINE (sx - T(4), sy - T(9))-(sx - T(6), sy - T(9)), F
LINE (sx + T(5), sy - T(9))-(sx + T(7), sy - T(9)), F
LINE (sx - T(6), sy - T(9))-(sx - T(6), sy - T(7)), F
LINE (sx + T(7), sy - T(9))-(sx + T(7), sy - T(7)), F
PSET (sx - T(5), sy - T(8)), F
PSET (sx + T(6), sy - T(8)), F
CIRCLE (sx, sy - T(8)), T(2), LC
PAINT (sx, sy - T(8)), LC, LC
LINE (sx - T(2), sy + T(1))-(sx, sy + T(3)), LA
LINE (sx + T(2), sy + T(1))-(sx, sy + T(3)), LA
PSET (sx, sy + T(2)), LB
PSET (sx, sy + T(1)), LB
PSET (sx - T(1), sy + T(1)), LB
PSET (sx + T(1), sy + T(1)), LB
RETURN

BOXOR:
LINE (X - T(25), Y + T(15))-(X + T(25), Y - T(15)), H, BF
RETURN

TANK:
LINE (X - T(13), Y + T(9))-(X - T(5), Y - T(8)), G, BF
LINE (X + T(13), Y + T(9))-(X + T(5), Y - T(8)), G, BF
LINE (X - T(5), Y + T(7))-(X + T(5), Y - T(7)), F, BF
CIRCLE (X, Y), T(2), LA: PAINT (X, Y), LA
RETURN

SPIRE:
sx = X: sy = Y
LINE (sx - T(10), sy + T(1))-(sx + T(10), sy + T(1)), G
LINE (sx - T(10), sy + T(1))-(sx, sy - T(15)), G
LINE (sx + T(10), sy + T(1))-(sx, sy - T(15)), G
PAINT (sx, sy - T(5)), G
LINE (sx - T(4), sy + T(1))-(sx - T(3), sy - T(11)), H, BF
LINE (sx + T(4), sy + T(1))-(sx + T(3), sy - T(11)), H, BF
LINE (sx - T(10), sy + T(1))-(sx - T(4), sy - T(5)), F
LINE (sx + T(10), sy + T(1))-(sx + T(4), sy - T(5)), F
LINE (sx - T(1), sy + T(1))-(sx + T(1), sy - T(1)), F, BF
CIRCLE (sx, sy - T(8)), T(2), F
PAINT (sx, sy - T(8)), F, F
RETURN

