	SUBROUTINE DEATHRAY
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,
     ,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
	+ ,IHSTAR,IHT,IHQUEST,IHNUM
      COMMON/HOLLER/IHEOL,IHREAL,IHALPHA,IHS,IHR,IHC,IHK,IHGREEN,IHRED, 
     +IHYELLO,IHDOCKD,IHE,IHF,IHBLANK,IHDOT,IHQUEST,IHP,IHSTAR,IHB
     +,IHT,IHNUM  
1008	IDIDIT=0
      IF(SHIP .EQ. IHE) GO TO 113 
      CALL PROUT(34HYE FAERIE QUEENE HAS NO DEATH RAY.,34) 
      RETURN
 113  IF(NENHERE .GE. 1) GO TO 115
      CALL PROUT(56HSULU:  "BUT SIR, THERE ARE NO ENEMIES IN THIS QUADRA
     +NT.",56)
	RETURN
115   IF(DAMAGE(14).LE.0) GOTO 116    
      CALL PROUT(17HDEATHRAY DAMAGED.,17)
      RETURN      
116   IDIDIT=1    
      CALL PROUT(44HKIRK:  "PREPARE FOR ACTIVATION OF DEATHRAY!",44) 
      CALL SKIP(1)
      CALL PROUT(37HSPOCK:  "PREPARATIONS COMPLETE, SIR.",37)
      CALL PROUT(16HKIRK:  "ENGAGE!",16)  
	CALL SKIP(1)
      CALL PROUT(45HWHIRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR,45)
      CALL PROUT(32HSULU:  "CAPTAIN!  IT'S WORKING!",32)   
      IF(RANF(0.) .GT. 0.30) GO TO 130 
C--------BANG!    
      CALL REDALRT
      CALL PROUT(41H***MATTER-ANTIMATTER IMPLOSION IMMINENT! ,41)    
      CALL PROUT(54H***RED ALERT!  RED A*L******************************      
     +**,54) 
      CALL STARS
      CALL PROUT(54H*****************    KA-BOOM!!!!    ****************      
     C**    ,54) 
	CALL KABOOM
	RETURN
C--------SUCCESS! 
130	CALL SKIP(1)
      NENH=NENHERE 
      DO 135 I=1,NENH
	II=KX(1)
	JJ=KY(1)
 135  CALL DEADKL(II,JJ,QUAD(II,JJ),II,JJ)
      CALL SKIP(1)
      CALL PROUT(42HENSIGN CHEKOV:  "CONGRATULATIONS CAPTAIN!",42)   
      IF(REMKL .EQ. 0) CALL FINISH(1) 
      IF(REMKL .EQ. 0) RETURN 
      CALL SKIP(1)
      CALL PROUT( 
     +56HSPOCK:  "CAPTAIN, I BELIEVE THE "EXPERIMENTAL DEATH RAY",56)
      IF(RANF(0).GT..05) GOTO 140     
      CALL PROUT(22HIS STILL OPERATIONAL.",22)   
      RETURN      
140   CALL PROUT(33HHAS BEEN RENDERED DISFUNCTIONAL.",33)  
      DAMAGE(14)=39.95      
      RETURN      
	END
