      SUBROUTINE WARPX
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
	+ ,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  
      INTEGER BLOOEY,TWARP
  	BLOOEY=0
	TWARP=0
      IF(WARPFAC .LE. 6.0) GO TO 50 
C--------DECIDE IF ENGINE DAMAGE WILL OCCUR 
      PROB=DIST*(6.0-WARPFAC)**2/66.666666666 
      IF(PROB .GT. RANF(0)) BLOOEY=1
      IF(BLOOEY.NE.0) DIST=RANF(0)*DIST 
C----------DECIDE IF TIME WARP WILL OCCUR 
      TWARP=0 
      IF(WARPFAC .LT. 10.0) GO TO 40
      IF(0.5*DIST .GT. RANF(0)) TWARP=1 
 40   IF(BLOOEY .EQ. 0 .AND. TWARP .EQ. 0) GO TO 50 
C--------IF ENGINE DAMAGE OR TIME WARP SHOULD OCCUR, CHECK PATH 
      ANGLE=((15.0-DIREC)*0.5235998)
      DELTAX=-SIN(ANGLE)
      DELTAY=COS(ANGLE) 
      BIGGER=AMAX1(ABS(DELTAX),ABS(DELTAY)) 
      DELTAX=DELTAX/BIGGER
      DELTAY=DELTAY/BIGGER
      N=10.0*DIST*BIGGER+0.5
      X=SECTX 
      Y=SECTY 
      IF(N .EQ. 0) GO TO 50 
      DO 45 L=1,N 
      X=X+DELTAX
      IX=X+0.5
      IF(IX .LT. 1 .OR. IX .GT. 10) GO TO 50
      Y=Y+DELTAY
      IY=Y+0.5
      IF(IY .LT. 1 .OR. IY .GT. 10) GO TO 50
      IF(QUAD(IX,IY) .EQ. IHDOT)  GO TO 45
	BLOOEY=0
	TWARP=0
 45   CONTINUE
C--------ACTIVATE WARP ENGINES AND PAY THE COST 
50    KSTUF(4)=0  
      CALL MOVE   
      IF(ALLDONE.NE.0) RETURN 
      ENERGY=ENERGY - DIST*WARPFAC*WARPFAC*WARPFAC*(SHLDUP+1) 
      IF(ENERGY .GT. 0) GO TO 55
      CALL FINISH(4)
      RETURN
55    IF(KSTUF(4).EQ.0) TIME=10.0*DIST/WFACSQ   
C--------ENTER TIME WARP
      IF(TWARP.NE.0) CALL TIMEWRP 
C--------DAMAGE WARP ENGINES
      IF(BLOOEY .EQ. 0) GO TO 60
      DAMAGE(6)=DAMFAC*(3.0*RANF(0)+1.0)
      CALL SKIP(1)
      CALL PROUT(24H"ENGINEERING TO BRIDGE--,24) 
      CALL PROUT(44H  SCOTT HERE.  THE WARP ENGINES ARE DAMAGED.,44) 
      CALL PROUT(41H  WE'LL HAVE TO REDUCE SPEED TO WARP 4."  ,41)   
 60   IDIDIT=1
      RETURN
      END 
