      SUBROUTINE NOVA(IX,IY)
C*BEGIN COMMON 
      COMMON SNAP,SNAPSHT(247), 
     +   DATE,REMKL,REMCOM,REMBASE,REMRES,REMTIME,STARKL,BASEKL,
     +   KILLK,KILLC,GALAXY(8,8),CX(10),CY(10),BASEQX(5),BASEQY(5), 
     +   NEWSTUF(8,8),PLNETS(10,5),ISX,ISY,NSCREM,NROMKL,NROMREM,
     +   NSCKILL,NPLANKL,ISATB,BATX,BATY,THINGX,THINGY,
     +   QUAD(10,10),KX(20),KY(20),KPOWER(20),KDIST(20),KSTUF(20),  
     +   FUTURE(10),MESSAGE(5,10),
     +   INKLING,INBASE,INRESOR,INCOM,INTIME,INSTAR,INENRG,INSHLD,
     +   INTORPS,INLSR,INDATE,ENERGY,SHLD,SHLDUP,CONDIT,TORPS,SHIP, 
     +   QUADX,QUADY,SECTX,SECTY,WARPFAC,WFACSQ,LSUPRES,DAMAGE(20), 
     +   LENGTH,SKILL,PASSWD,DIST,DIREC,TIME,BASEX,BASEY,DOCKFAC, 
     +   KLHERE,COMHERE,CASUAL,NHELP,NKINKS,STARCH(8,8),
     +   DEVICE(2,14),IDIDIT,GAMEWON,ALIVE,JUSTIN,RESTING,ALLDONE,
     +   DAMFAC,SHLDCHG,NDEVICE,PLNETX,PLNETY,INORBIT,LANDED,IPLANET,
     +   IMINE,ICRYSTL,INPLAN,NENHERE,ISHERE,NEUTZ,IRHERE,ICRAFT,
     +   IENTESC,ISCRAFT,ISCATE,CRYPROB,ICITE,IPHWHO,
     +   CRACKS(12) 
      INTEGER SHLDUP,CONDIT,QUADX,QUADY,SECTX,SECTY,TORPS,
     +   REMKL,REMBASE,SKILL,REMCOM,GALAXY,STARCH,CX,CY, 
     +   SHIP,ALLDONE,BASEQX,BASEQY,BASEX,BASEY,GAMEWON, 
     +   ALIVE,STARKL,BASEKL,CASUAL,COMHERE,RESTING,SNAP,SHLDCHG, 
     +   THINGX,THINGY,BATX,BATY,PLNETX,PLNETY,PLNETS
      REAL KDIST,KPOWER,LSUPRES,INTIME,INRESOR,INDATE,INSHLD,   
     +   INENRG,INLSR 
	BYTE QUAD
	REAL*8 DEVICE,PASSWD
C*END COMMON 
	LOGICAL*1 IHS,IHR,IHC,IHK,IHE,IHF,IHBLANK,IHDOT,IHP,IHB
	1 ,IHSTAR,IHT,IHQUEST,IHNUM,IQUAD,IQUAD1,ISHIP
      COMMON/HOLLER/IHEOL,IHREAL,IHALPHA,IHS,IHR,IHC,IHK,IHGREEN,IHRED, 
     +IHYELLO,IHDOCKD,IHE,IHF,IHBLANK,IHDOT,IHQUEST,IHP,IHSTAR,IHB
     +,IHT,IHNUM  
      INTEGER BURST,HITS(10,2),BOT,TOP,TOP2 
      DIMENSION COURSE(9) 
      EQUIVALENCE (CRACKS(1),HIT),(CRACKS(4),KSHOT),(SHIP,ISHIP)
	EQUIVALENCE (CRACKS(7),INOVA)
      DATA COURSE/ 10.5, 12.0, 1.5, 9.0, 0.0, 3.0, 7.5, 6.0, 4.5 /
C--------CHECK FOR SUPERNOVA POSSIBILITY
      IF(RANF(0) .GE. 0.05) GO TO 76  
      CALL SNOVA(IX,IY) 
      RETURN
C--------PRINT NOVA MESSAGE FOR INITIAL STAR AT LOCATION (IX,IY)
 76   QUAD(IX,IY)=IHDOT 
      CALL CRMSENA(IHSTAR,2,IX,IY)
      CALL CRAMDMP(7H NOVAS.) 
      GALAXY(QUADX,QUADY)=GALAXY(QUADX,QUADY)-1 
C-------IF ENTERPRISE DESTROYS STAR, TAKE OFF POINTS      
      IF(IPHWHO.NE.1) STARKL=STARKL+1 
C--------SET UP STACK TO RECURSIVELY TRIGGER ADJACENT STARS 
	BOT=1
	TOP=1
	TOP2=1
	KOUNT=0
	ICX=0
	ICY=0
      HITS(BOT,1)=IX
      HITS(BOT,2)=IY
 78   DO 90 MM=BOT,TOP
      DO 90 NN=1,3
      DO 90 J=1,3 
      IF((J*NN) .EQ. 4)GO TO 90 
      II=HITS(MM,1)+NN-2
      JJ=HITS(MM,2)+J-2 
      IF(II .LT. 1 .OR. II .GT. 10)GO TO 90 
      IF(JJ .LT. 1 .OR. JJ .GT. 10)GO TO 90 
      IQUAD=QUAD(II,JJ) 
      IF(IQUAD.EQ.IHDOT .OR. IQUAD.EQ.IHQUEST .OR. IQUAD.EQ.IHBLANK
     +  .OR. IQUAD.EQ.IHNUM .OR. IQUAD.EQ.IHT) GO TO 90
      IF(IQUAD .NE. IHSTAR) GO TO 80
C--------ANOTHER STAR AFFECTED BY A NOVA
      IF(RANF(0.) .GE. .05)GO TO 79 
      CALL SNOVA(II,JJ) 
      RETURN
 79   TOP2=TOP2+1 
      HITS(TOP2,1)=II 
      HITS(TOP2,2)=JJ 
      GALAXY(QUADX,QUADY)=GALAXY(QUADX,QUADY)-1 
      IF(IPHWHO.NE.1) STARKL=STARKL+1 
      CALL CRMSENA(IHSTAR,2,II,JJ)
      CALL CRAMDMP(7H NOVAS.)
      GO TO 8905
 80   IF(IQUAD .NE. IHP) GO TO 8002 
C--------PLANET DESTROYED BY NOVA.
      NEWSTUF(QUADX,QUADY)=NEWSTUF(QUADX,QUADY) -1
	IF(IPHWHO.NE.1) NPLANKL=NPLANKL+1
      CALL CRMSENA(IHP,2,II,JJ) 
      CALL CRAMDMP(11H DESTROYED.) 
      DO 8001 I=1,5 
 8001 PLNETS(IPLANET,I)=0
	IPLANET=0
	PLNETX=0
	PLNETY=0
	IF(LANDED .NE. 1) GO TO 8905
	CALL FINISH(16)
	RETURN
 8002 IF(IQUAD .NE. IHB) GO TO 82 
C----------NOVA DESTROYS STARBASE 
      GALAXY(QUADX,QUADY)=GALAXY(QUADX,QUADY)-10
      DO 81 LLL=1,REMBASE 
      IF(BASEQX(LLL).NE.QUADX .OR. BASEQY(LLL).NE.QUADY) GO TO 81 
      BASEQX(LLL)=BASEQX(REMBASE) 
      BASEQY(LLL)=BASEQY(REMBASE) 
 81   CONTINUE
      REMBASE=REMBASE-1 
	BASEX=0
	BASEY=0
      IF(IPHWHO.NE.1) BASEKL=BASEKL+1 
      CALL NEWCOND
      CALL CRMSENA(IHB,2,II,JJ) 
      CALL CRAMDMP(11H DESTROYED.)
      GO TO 8905
 82   HIT=800.0 + 800.0*RANF(0) 
      IF(IQUAD .NE.ISHIP) GO TO 87
C----------STARSHIP IN A NOVA 
      CALL PROUT(29H***STARSHIP BUFFETED BY NOVA.,29)
	INOVA = 1
      CALL ZAP
C-------CHECK IF STARSHIP SURVIVED NOVA 
      IF(ENERGY .GT. 0)GO TO 86 
      CALL FINISH(7)
      RETURN
C--------ADD IN COURSE NOVA CONTRIBUTES TO KICKING STARSHIP 
 86   ICX=ICX+SECTX-HITS(MM,1)
      ICY=ICY+SECTY-HITS(MM,2)
      KOUNT=KOUNT+1 
      GO TO 90
C--------ENEMY DESTROYED OR DAMAGED ; BUFFETED BY NOVA. 
 87   IF(IQUAD .EQ. IHK) GO TO 88 
      DO 8701 LL=1,NENHERE
      IF(KX(LL).EQ.II .AND. KY(LL).EQ.JJ) GO TO 8702
 8701 CONTINUE
 8702 KPOWER(LL)=KPOWER(LL)-HIT 
      IF(KPOWER(LL) .LE. 0) GO TO 88
      NEWCX=II+II-HITS(MM,1)
      NEWCY=JJ+JJ-HITS(MM,2)
      CALL CRMSENA(IQUAD,2,II,JJ) 
      CALL CRAM(8H DAMAGED) 
      IF(NEWCX.LT.1 .OR. NEWCX.GT.10 .OR. 
     +   NEWCY.LT.1 .OR. NEWCY.GT.10) GO TO 8703
      IQUAD1=QUAD(NEWCX,NEWCY)
      IF(IQUAD1 .NE. IHBLANK) GO TO 87025 
C--------ENEMY DISPLACED INTO BLACK HOLE
      CALL CRAMDMP(26H, BLASTED INTO BLACK HOLE.) 
      CALL DEADKL(II,JJ,IQUAD,NEWCX,NEWCY) 
	GO TO 90
87025 IF(IQUAD1 .NE. IHDOT) GO TO 8703
      CALL CRAM(13H, BUFFETED TO) 
      CALL CRAMLOC(2,NEWCX,NEWCY) 
	CALL CREND
      QUAD(NEWCX,NEWCY)=IQUAD 
      KX(LL)=NEWCX
      KY(LL)=NEWCY
      KDIST(LL)=SQRT(FLOAT((SECTX-NEWCX)**2+(SECTY-NEWCY)**2))
	GO TO 8905
 8703 CALL CREND
      GO TO 90
C--------ENEMY DESTROYED BY NOVA. 
 88   CALL DEADKL(II,JJ,IQUAD,II,JJ)
      GO TO 90
 8905	QUAD(II,JJ)=IHDOT 
 90   CONTINUE
C--------IF MORE STARS AFFECTED BY NOVA GO FIND WHAT THEY GOT 
      IF(TOP .EQ. TOP2)GO TO 93 
      BOT=TOP+1 
      TOP=TOP2
      GO TO 78
93	INOVA = 0
	IF(KOUNT .EQ. 0)RETURN
C--------STARSHIP AFFECTED BY NOVA - KICK IT AWAY.
      DIST=KOUNT*.1 
      IF(ICX .NE. 0) ICX=ISIGN(1,ICX) 
      IF(ICY .NE. 0) ICY=ISIGN(1,ICY) 
      INDEX=3*(ICX+1)+ICY+2 
      DIREC=COURSE(INDEX) 
      IF(DIREC .EQ. 0) DIST=0 
      IF(DIST .EQ. 0)RETURN 
      TIME=12.0*DIST
      CALL SKIP(1)
      CALL PROUT(34HFORCE OF NOVA DISPLACES STARSHIP. ,34) 
      CALL MOVE 
      RETURN
      END 
