      SUBROUTINE DEADKL(IX,IY,TYPE,IXX,IYY) 
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
      COMMON/HOLLER/IHEOL,IHREAL,IHALPHA,IHS,IHR,IHC,IHK,IHGREEN,IHRED, 
     +IHYELLO,IHDOCKD,IHE,IHF,IHBLANK,IHDOT,IHQUEST,IHP,IHSTAR,IHB
     +,IHT,IHNUM  
      EQUIVALENCE (KSTUF(1),ITHERE), (CRACKS(4),KSHOT)
      BYTE TYPE
      CALL CRMSENA(TYPE,2,IXX,IYY)
C--------DECIDE WHAT KIND OF ENEMY IT IS, AND UPDATE APPROPRIATELY
      IF(TYPE .EQ. IHT) GO TO 30
      IF(TYPE .EQ. IHR) GO TO 27
      GALAXY(QUADX,QUADY)=GALAXY(QUADX,QUADY)-100 
      KLHERE=KLHERE-1 
      REMKL=REMKL-1 
      IF(TYPE .EQ. IHK) GO TO 25
      IF(TYPE .EQ. IHS) GO TO 26
C--------CHALK UP A COMMANDER 
      COMHERE=0 
      DO 10 I=1,REMCOM
      IF(CX(I) .EQ. QUADX .AND. CY(I) .EQ. QUADY)GO TO 15 
10    CONTINUE
15    CX(I)=CX(REMCOM)
      CY(I)=CY(REMCOM)
      CX(REMCOM)=0 
	CY(REMCOM)=0
      REMCOM=REMCOM-1 
      FUTURE(2)=1E38 
      IF(REMCOM.GT.0) FUTURE(2)=DATE+EXPRAN(FLOAT(INCOM/REMCOM))    
      KILLC=KILLC+1 
	IF(BATX.NE.QUADX .OR. BATY.NE.QUADY) GO TO 30
	BATX=0
	BATY=0
	FUTURE(5)=1E38
      GO TO 30
C--------CHALK UP AN ORDINARY KLINGON 
 25   KILLK=KILLK+1 
      GO TO 30
C--------CHALK UP THE (GULP) <SUPER-COMMANDER>. 
26	NSCREM=0
	ISHERE=0
	ISX=0
	ISY=0
	NSCKILL=1
      ISATB=0
	ISCATE=0
      FUTURE(6)=1E38 
	FUTURE(7)=1E38
      GO TO 30
C--------CHALK UP A ROMULAN.
 27   NEWSTUF(QUADX,QUADY)=NEWSTUF(QUADX,QUADY) -10 
      IRHERE=IRHERE-1 
	NROMKL=NROMKL+1
	NROMREM=NROMREM-1
C--------FOR EACH KIND OF ENEMY, FINISH MESSAGE TO PLAYER 
 30   CALL CRAMDMP(12H DESTROYED. ) 
      QUAD(IX,IY)=IHDOT 
      IF(REMKL .EQ. 0) RETURN 
      REMTIME=REMRES/(REMKL+4*REMCOM) 
C-------IF ENEMY IS A THOLIAN, SET ITHERE=0 AND RETURN    
      IF(TYPE.EQ.IHT) ITHERE=0
      IF(TYPE.EQ.IHT) RETURN
C--------REMOVE ENEMY SHIP FROM ARRAYS DESCRIBING LOCAL CONDITIONS
      DO 40 I=1,NENHERE 
      IF(KX(I) .EQ. IX .AND. KY(I) .EQ. IY)GO TO 45 
40    CONTINUE
45	IF(IPHWHO.EQ.1 .AND. I.LE.KSHOT) KSHOT=KSHOT-1
	NENHERE=NENHERE-1 
      IF(I .GT. NENHERE) GO TO 55 
      DO 50 J=I,NENHERE 
      KX(J)=KX(J+1) 
      KY(J)=KY(J+1) 
      KPOWER(J)=KPOWER(J+1) 
 50   KDIST(J)=KDIST(J+1) 
55	KX(NENHERE+1)=0
	KY(NENHERE+1)=0
	KDIST(NENHERE+1)=0
	KPOWER(NENHERE+1)=0
      RETURN
      END 
