	DIMENSION SPACE(250,250)
      DIMENSION SCANN(10,10),IA(68),PRINT(250),IPPP(12),IAB(68),IAC(68)
	DIMENSION EXPLO(33),SPCE(250,250,12),IPS(16),IRP(12)
	DIMENSION ITX(20),ITY(20),TR(20),SCAN(20,20)



	DATA EXPLO/'!','/','-','\','!','/','-','\','!','/','-'
     1		,'\','!','/','-','\','!','/','-','\','!','/','-'
     1		,'\','!','/','-','\','X',' ','R','K','E'/
	EQUIVALENCE (IA(1),RANK),(IA(6),USR),(IA(14),SHPSNM),
     1		(IA(24),IDESRM),(IA(28),IDESKL),(IA(32),LOST),
     1		(IA(36),MBR),(IA(40),IDST),(IA(44),NMPL),
     1		(IA(48),TIME),(IA(53),ISCRE),(IA(60),NTPRB),
	1	(IA(61),NTPWR),(IA(62),NTFOD),(IA(63),NTDMC),
	1	(IA(64),NTBWD),(IA(65),NTLPR),(IA(66),NTAWD)
	EQUIVALENCE (IAB(1),RNK),(IAB(6),USR1),(IAB(14),SHP),
     1		(IAB(24),I24),(IAB(28),I28),(IAB(32),I36),
     1		(IAB(36),I32),(IAB(40),I40),(IAB(44),I44),
     1		(IAB(48),A48),(IAB(53),I53),(IAB(60),NT1),
	1	(IAB(61),NT2),(IAB(62),NT3),(IAB(63),NT4),(IA(65),NT5),
	1	(IAB(66),NT6)
	EQUIVALENCE (IAC(1),RNKK),(IAC(6),USR2),(IAC(14),SHP1),
     1		(IAC(24),I23),(IAC(28),I27),(IAC(32),I35),
     1		(IAC(36),I31),(IAC(40),I39),(IAC(44),I43),
     1		(IAC(48),A47),(IAC(53),I52),(IAC(60),NT11),
	1	(IAC(61),NT12),(IAC(62),NT13),(IAC(63),NT14),
	1	(IAC(64),NT15),(IAC(65),NT16),(IAC(66),NT17)
	EQUIVALENCE	(SPACE(250,250),SPCE(250,250,10))
	EQUIVALENCE (IPS(1),USR1),(IPS(9),PASS1)
	LOGICAL*1	IPS,IA,IAB,IAC

	BYTE	NTPRB,NTPWR,NTFOD,NTDMC,NTBWD,NTLPR,NTAWD,NT1,NT2
	BYTE	NT3,NT4,NT5,NT6,NT11,NT12,NT13,NT14,NT15,NT16,NT17

	CHARACTER*9  TYP
	CHARACTER*10 SHP,SHP1,SHPSNM
	CHARACTER*5  RANK
	CHARACTER*8 RNK,RNKK,USR1,USR2,PASS1,USR,PASS
	CHARACTER*80 OUTPT
	OPEN(UNIT=22,NAME='UNISTA.DAT',TYPE='OLD',RECORDSIZE=17,
     1		ASSOCIATEVARIABLE=IVAR,ACCESS='DIRECT',SHARED)
	OPEN(UNIT=4,NAME='FOR004.DAT',TYPE='OLD',SHARED
     1	,ACCESS='DIRECT',RECORDSIZE=4)
	CALL MESS
	PRINT 1
	T=SECNDS(0.0)
 1	FORMAT(1X,/////,20X,'**  WELCOME TO UNIVERSE  **',///)
10051	FORMAT (1X,' VERSION :      10-30-80')
10040	FORMAT(1X,' AUTHOR :	RAJIV SUD')
10050	FORMAT(1X,' LOCATION : 	MIT BATES LINAC, MIDDLETON, MASS.')
	PRINT 10040
	PRINT 10050
	PRINT 10051
 21	REWIND 1
	REWIND 2
	REWIND 3
	PRINT 22
 22	FORMAT(1X,/////,1X,'PLAY / SEE / INFO / QUIT'
     1 	,'/ COMT (COMMENTS,QUES.) / EXIT  :',$)
	ACCEPT 23,ANS
 23	FORMAT(A5)
	IF (ANS .EQ. 'INFO') GO TO 25
	IF (ANS .EQ. 'SEE') GO TO 41
	IF (ANS .EQ. 'PLAY') GO TO 14
	IF (ANS .EQ. 'EXIT') STOP
	IF (ANS .EQ. 'QUIT') GOTO 10080
	IF (ANS .EQ. 'COMT') CALL COMT
	IF (ANS .EQ. '(!)') CALL MDFY
 	GO TO 21
 25	READ (1,26,END=21),OUTPT
 26	FORMAT(A80)
	PRINT 27,OUTPT
 27	FORMAT(1X,T2,A80)
	GO TO 25
 41	PRINT 42
 42	FORMAT(1X,///////,25X,'UNIVERSE STATISTICS')
	PRINT 43
 43	FORMAT (25X,'-------------------',//)
	PRINT 44
 44	FORMAT(16X,'SHIPS',11X,'KILLS',4X,'MSSN',1X,'TMS',1X,
     1			'GAMS',2X,'HRS')
	PRINT 45
 45	FORMAT(1X,'RANK',2X,'NAME',5X,'NAME',7X,' ROM',1X,' KLN',1X,
     1		'VSR',1X,'PNTS',1X,'DST',1X,'PLYD',2X,'PLYED',2X,
     1		'SCORE')
	PRINT 46
 46	FORMAT(1X,'----------------------------------------------------',
     1		'--------------------',/)
 47	DO 31 I=1,200
	READ(22'I)IA
	IF (RANK .EQ. ' ') GO TO 49
 48	FORMAT(1X,T2,A5,1X,A8,1X,A10,1X,I4,1X,I4,1X,I3,1X,I4,1X,I3,
     1		1X,I4,2X,F6.2,2X,I6)
	PRINT 48,RANK,USR,SHPSNM,IDESRM,IDESKL,LOST,MBR,IDST,NMPL,
     1		TIME,ISCRE
 31	CONTINUE
 49	GO TO 21
 14	PRINT 15
 15	FORMAT(1X,///,1X,'NAME   :',$)
	ACCEPT 16,USR
 16	FORMAT(A8)
	IF (USR .EQ. ' ') GO TO 14
 17	DO 10070 I=1,30
		READ(4'I,END=9700)IPS
		IF (USR .EQ. USR1) GOTO 19
10070	CONTINUE
	GOTO 9700
 19	PRINT 61
 61	FORMAT(1X,'PASSWORD :',$)
	ACCEPT 62,PASS
 62	FORMAT(A8)
	IF (PASS .EQ. PASS1) GO TO 68
	PRINT 63
63	FORMAT(1X,' ***  FOO ... YOU ARE NOTHING BUT A CHARLATAN')
	STOP
 68	USR2=USR
	DO 11000 I=1,200
		READ(22'I)IA
		IF (USR .EQ. USR2) GOTO 11001
11000	CONTINUE
11001	PRINT 69
 69	FORMAT(1X,////////////////////////,1X,
     1	'PLEASE STAND BY WHILE WE READY YOUR SHIP')
	CALL STAMP(USR)
	DATA 	BLANK1/1H  /  
	CLOSE(UNIT=1)
	CLOSE(UNIT=4)
	CLOSE(UNIT=22)
C
C
C	************	CALL SETUP MODULE
C
C
C
C
C
C		**********		SET UP KLINGONS !!
C
C
	LOST=0
	I1=SECNDS(T)
 10	CALL RANDU(I1,I2,X)
	NUMKL=X*250+100
	DO 20 I=1,NUMKL
 12	CALL RANDU(I1,I2,X)
	IX=X*249+1 
 13	CALL RANDU(I1,I2,Y)
	IY=Y*249+1
	IF (SPACE(IX,IY) .NE. 0) GO TO 12
	SPACE(IX,IY)='K '
	SPCE(IX,IY,11)=300
 20	CONTINUE
C
C		**********		END KLINGON SETUP
C
C
C		**********		ROMULAN SETUP !!
C
C
 30	CALL RANDU(I1,I2,X)
	NUMROM=X*200+150
	DO 40 I=1,NUMROM
 32	CALL RANDU(I1,I2,X)
	IX=X*249+1
 33	I1=I1+SECNDS(T)
	CALL RANDU(I1,I2,Y)
	IY=Y*249+1
	IF (SPACE(IX,IY) .NE. 0) GO TO 32
	SPACE(IX,IY)='R '
	SPCE(IX,IY,11)=150
 40	CONTINUE
C
C		**********		END ROMULAN SETUP
C
C
C		**********		BLACKHOLE SETUP !!
C
C
 50	CALL RANDU(I1,I2,X)
	NUMBHL=X*8+2
	DO 60 I=1,NUMBHL
 51	CALL RANDU(I1,I2,X)
	IX=X*249+1
 52	CALL RANDU(I1,I2,Y)
	IY=Y*249+1
	IF (SPACE(IX,IY) .NE. 0) GO TO 51
	SPACE(IX,IY)='+ '
 60	CONTINUE
C
C
C		**********		END BLACKHOLE SETUP
C
C
C
C		**********		SETUP STARS AND PLANETS 
C					AND GIVE PLANETS CHARACTERISTICS
C
C
	I1=I1+I2+(SECNDS(T))
 70	CALL RANDU(I1,I2,X)
	NUMSTR=X*500+300
	DO 80 I=1,NUMSTR
 71	CALL RANDU(I1,I2,X)
	IX=X*249+1
 72	CALL RANDU(I1,I2,Y)
	IY=Y*249+1
	IF (SPACE(IX,IY) .NE. 0) GO TO 71
	SPACE(IX,IY)='* '
 81	CALL RANDU(I1,I2,X)
	IDUM=X*5
	IF (IDUM .LT. 1 .OR. IDUM .GT. 5) GO TO 81
	SPCE(IX,IY,12)=IDUM
 80	CONTINUE
C
C		*****	PLANET SET UP HERE
C
 90	CALL RANDU (I1,I2,X)
	NUMPLN=X*150+80
	DO 100 I=1,NUMPLN
 91	CALL RANDU(I1,I2,X)
	IX=X*249+1
 92	CALL RANDU(I1,I2,Y)
	IY=Y*249+1
	IF (SPACE(IX,IY) .NE. 0) GO TO 91
	SPACE(IX,IY)='O '
 93	CALL RANDU(I1,I2,X)
	IDUM=X*15
	IF (IDUM .GT. 9) IDUM=8
	IF (IDUM .LT. 0 .OR. IDUM .GT. 10) GO TO 93
	SPCE(IX,IY,12)=IDUM
	SPCE(IX,IY,11)=50
	IF (IDUM .EQ. 6 .OR. IDUM .EQ. 5)  SPCE(IX,IY,11)=1000
	IF (IDUM .EQ. 4 .OR. IDUM .EQ. 7)  SPCE(IX,IY,11)=500
 100	CONTINUE
C
C
C
C		**********		END PLANET AND STAR SETUP
C
C
C
C		**********		 FREIGHTER SETUP
C
C
 110	CALL RANDU(I1,I2,X)
	NUMFR=X*150+50
	DO 120 I=1,NUMFR
 111	CALL RANDU(I1,I2,X)
	IX=X*249+1
 112	CALL RANDU(I1,I2,X)
	IY=X*249+1
	IF (SPACE(IX,IY) .NE. 0) GO TO 111
	SPACE(IX,IY)='F '
 113	CALL RANDU(I1,I2,X)
	IDUM=X*7
	IF (IDUM .LT. 0 .OR. IDUM .GT. 7)GO TO 113
	SPCE(IX,IY,12)=IDUM
	IF (SPCE(IX,IY,12) .EQ. 2 .OR. SPCE(IX,IY,12) .EQ. 3) SPCE(IX,IY,11)=50
	IF (SPCE(IX,IY,12) .EQ. 4 .OR. SPCE(IX,IY,12) .EQ. 5) SPCE(IX,IY,11)=150
 120	CONTINUE
C
C
C		**********		END OF  FREIGHTER SETUP
C
C
C
C		**********		PLACE ALIEN VESSELS
C
C
C
C
 	CALL RANDU(I1,I2,X)
	IX=X*100
	DO 101 I=1,IX
		CALL RANDU(I1,I2,X)
		IX=(X*249)+1
		CALL RANDU(I1,I2,X)
		IY=(X*249)+1
		SPACE(IX,IY)='X'
		CALL RANDU(I1,I2,X)
		IXX=(X*5)+1
		SPCE(IX,IY,11)=IXX
 101	CONTINUE
C
C
C
C		**********		END ALIEN SET UP
C
C
C
C
C		**********		PLACE STARGATES 
C
C
C
C
	CALL RANDU(I1,I2,X)
	I11=25*X
	DO 102 I=1,I11
 103		CALL RANDU(I1,I2,X)
		IX=X*249+1
		CALL RANDU(I1,I2,X)
		IY=X*249+1
		IF (SPACE(IX,IY) .NE. 0) GO TO 103
		IF (IY .GT. 247) GOTO 103
 104		CALL RANDU(I1,I2,X)
		IXX=X*230+4
		CALL RANDU(I1,I2,X)
		IYY=X*249+1
		IF (SPACE(IXX,IYY) .NE. 0) GO TO 104
		IF (IYY .LT. 3) GOTO 104
		SPACE(IX,IY)='['
		SPACE(IX+1,IY)=0
		SPACE(IXX,IYY)=']'
		SPACE(IXX-1,IYY)=0
		SPCE(IX,IY,11)=IXX
		SPCE(IXX,IYY,11)=IX
		SPCE(IXX,IYY,12)=IY
		SPCE(IX,IY,12)=IYY
 102	CONTINUE
C
C
C
C
C		**********		END STARGATE PLACE
C
C
C
C
C
C		**********	     PLACE VESARUS WARCRUSIERS
C
C
C
C
C
 	CALL RANDU(I1,I2,X)
	NUM=X*30+10
	DO 82 I=1,NUM
 83	CALL RANDU(I1,I2,X)
	IX=X*249+1
	CALL RANDU(I1,I2,X)
	IY=249*X+1
	IF (SPACE(IX,IY) .NE. 0) GO TO 83
	SPACE(IX,IY)='V'
	SPCE(IX,IY,11)=700
	CALL RANDU(I1,I2,X)
	IF (X .GT. .5) SPCE(IX,IY,12)=1
 82	CONTINUE
C
C
C
C
C
C
C
C
C
C		**********		PLACE CURIDIAN FLAGSHIPS
C
C
C
	CALL RANDU(I1,I2,X)
	NUM=X*10+5
	DO 12100 I=1,NUM
12101		CALL RANDU(I1,I2,X)
		IX=X*249+1
		CALL RANDU(I1,I2,X)
		IY=X*249+1
		IF (SPACE(IX,IY) .NE. 0) GOTO 12101
		SPACE(IX,IY)='&'
		SPCE(IX,IY,11)=999
12100	CONTINUE
C
C
C
C		**********		END PLAVE CURIDIAN
C		**********		END VESARUS SETUP
C
C
C
C
C		*********		PLACE DERELICT SHIPS
C
C
	CALL RANDU(I1,I2,X)
	NUM=X*5+1
	DO 10225 I=1,NUM
10224		CALL RANDU(I1,I2,X)
		IX=X*249+1
		CALL RANDU(I1,I2,X)
		IY=X*249+1
		IF (SPACE(IX,IY) .NE. 0) GOTO 10224
		SPACE(IX,IY)='@'
10223		CALL RANDU(I1,I2,X)
		IS=X*10
		IF (IS .LT. 0 .OR. IS .GT. 9) GOTO 10223
		SPCE(IX,IY,12)=IS
10225	CONTINUE
C
C
C
C
C		**********		END PLACE DERELICT SHIPS
C
C
C
C
C		**********	PLACE DRIDEN SPACEFIGHTER HOT SPOTS
C
C
C
	CALL RANDU(I1,I2,X)
	NUM=X*7+2
	DO 10591 I=1,NUM
10590	CALL RANDU(I1,I2,X)
	IX=250*X+1
	CALL RANDU(I1,I2,X)
	IY=250*X+1
	IF (SPACE(IX,IY) .NE. 0) GOTO 10590
	SPCE(IX,IY,1)=100
10591	CONTINUE
	GOTO 10295
C
C
C
C		**********		PLACE ENTERPRISE
C
C
10295	CALL RANDU(I1,I2,X)
	IHOMX=X*250
	IF (IHOMX .LT. 1) IHOMX=1
	SPACE(IHOMX,1)='B'
	SPACE(IHOMX,2)='E'
	IX=IHOMX
	IY=2
CC
C
C
C		*****	SET UP SHIP VARIABLES
C
	T=SECNDS(0.0)
	IF (NTPWR .EQ. 1) THEN
		ENERGY=9999
	ELSE
		ENERGY=5000
	ENDIF
	SHLDS=100.0000
	LNPR=30
	IPPR=10
	SRS=100.0000
	XLRS=100.000
	IF (NTFOD .EQ. 1) THEN
		FOOD=40.
	ELSE
		FOOD=20.
	ENDIF
	PHA=100.000
	TOR=100.000
	WRP=100.000
	XIMP=100.000
	COM=100.000
	TRA=100.000
	PRB=100.000
	DAM=100.000
	GEN=100.000
	IPOP=432
	IF (NTDMC .EQ. 1) THEN
		DICRY=20.
	ELSE
		DICRY=10.
	ENDIF
	DATA	IPPP/25,30,42,30,30,40,15,15,45,30,30,100/
	DATA	IRP/4,4,4,4,4,4,4,4,4,4,4,1/
C
C
C
C		**********	END ENTERPRISE SETUP
	DO 1001 I=1,24
 1001	CALL LNCR(I)
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C		*********		PROGRAM BEGINS
 400	PLSFACT=0
	NOMOVE=0
	NARNEU=0
  	DO 410 I=IX-15,IX+15
		DO 405 J=IY-15,IY+15
			IF (I .LT. 1 .OR. I .GT. 250) GO TO 405
			IF (J .LT. 1 .OR. J .GT. 250) GO TO 405
			IF (SPCE(I,J,1) .EQ. 100) GOTO 10350
			IF (SPACE(I,J) .EQ. 0) GO TO 405
	IF (SPACE(I,J) .EQ. 'K' .OR. SPACE(I,J) .EQ. 'R') GO TO 1500
			IF (SPACE(I,J) .EQ. 'O') GO TO 2100
			IF (SPACE(I,J) .EQ. '+') GO TO 2200
			IF (SPACE(I,J) .EQ. 'F') GO TO 2300
			IF (SPACE(I,J) .EQ. 'X') GO TO 4800
			IF (SPACE(I,J) .EQ. 'V') GO TO 5200
			IF (SPACE(I,J) .EQ. 'D') GOTO 1500
			IF (SPACE(I,J) .EQ. '=') GOTO 10450
			IF (SPACE(I,J) .EQ. '&') GOTO 1500
 405		CONTINUE
 410	CONTINUE
	IF (INOVA .GT. 0) GO TO 2400
 485	POP=IPOP
	IF (FOOD .GT. 5) FOOD=FOOD-(POP/2000)
	IF (FOOD .LT. 5) FOOD=FOOD-(POP/3000)
	IF (FOOD .LT. 7 .AND. FOOD .GT. 5) THEN
		CALL RANDU(I1,I2,X)
		CALL CC(15,1)
		IF (X .GT. .5) PRINT 486
	ENDIF
 486	FORMAT('+',5X,'**  FOOD STORES ARE LOW')
	CALL CC(15,1)
	IF (FOOD .LT. 3) PRINT 487
 487	FORMAT('+',5X,'*** FOOD STORES CRITICLE ..  FOOD RATIONING'
     1		,' IN ORDER')
	IF (FOOD .LT. 0) THEN
		CALL LNCR(14)
		CALL LNCR(15)
		CALL LNCR(16)
		CALL LNCR(17)
		CALL LNCR(18)
		CALL CC(15,1)
		PRINT 488
 488	FORMAT('+',///,5X,'* YOU HAVE STARVED YOUR ENTIRE CREW'
     1		,' TO DEATH *')
		GO TO 9500
	ENDIF
C
C
C
C		**********	THE VIRUS TAKES ITS TOLL
C
C
	IF (NTDES .EQ. 1) THEN
		CALL RANDU(I1,I2,X)
		HIT=X*5
		DESR=1
		GOTO 2135
10267		DESR=0
	ENDIF
C
C
C
C		**********	END VIRUS CONTROL
C
C
C
C
C
C
C
C		**********		PLANETARY DISTRESS
C
C
C
C
C
	IF (IATTX .NE. 0) THEN
		CALL RANDU(I1,I2,X)
		IF (X .GT. .92) DISTRS=1
	ENDIF
	IF (DTRSDN .NE. 1) THEN
	IF (DISTRS .EQ. 1) THEN
				DTRSDN=1
			DO 5602 IDUM=IATTX-5,IATTX+5
			DO 5602 JDUM=IATTY-5,IATTY+5
				CALL RANDU(I1,I2,X)
				IF (X .GT. .96) THEN
				IF (SPACE(IDUM,JDUM) .NE. 0) GO TO 5602
				SPACE(IDUM,JDUM)='K'
				SPCE(IDUM,JDUM,11)=300
				ENDIF
 5602			CONTINUE
	ENDIF
	ENDIF
	IF (DISTRS .EQ. 1) THEN
		CALL LNCR(23)
		CALL CC(23,1)
 		PRINT 5603,IATTX,IATTY
 5603	FORMAT('+','DISTRESS CALL FROM PLANET AT SECTOR <',I3,
     1		',',I3,'>')
		IF (SPCE(IATTX,IATTY,11) .GT. -300) THEN
			SPCE(IATTX,IATTY,11)=SPCE(IATTX,IATTY,11)-100
		ELSE
			IATTX=0
			DISTRS=0
			DTRSDN=0
		ENDIF
	ENDIF
	DIS=((IX-IATTX)**2+(IY-IATTY)**2)
	IF (SQRT(DIS) .LT. 5) THEN
		IATTX=0
		DISTRS=0
		DTRSDN=0
	ENDIF
C
C
C
C
C
C		END PLANETARY DISTRESS
C
C
C
C
C                 ************  THE ARTRIDIAN IS IN TROUBLE
C
C
C
	IF (IARTD .NE. 1) THEN
		CALL RANDU(I1,I2,X)
		IF (X .GT. .995) THEN
			IARTD=1
10270			CALL RANDU(I1,I2,X)
			IAXX=250*X+1
			CALL RANDU(I1,I2,X)
			IAYY=250*X+1
			IF (SPACE(IAXX,IAYY) .NE. 0) GOTO 10270
			SPACE(IAXX,IAYY)='A'
			IARTN=15
			DO 10271 I=IAXX-5,IAXX+5
			DO 10271 J=IAYY-5,IAYY+5
				CALL RANDU(I1,I2,X)
				IF (X .GT. .95) THEN
					IF (SPACE(I,J) .EQ. 0) THEN
						SPACE(I,J)='K'
						SPCE(I,J,11)=300
					ENDIF
				ENDIF
10271			CONTINUE
		ENDIF
	ENDIF
C
C
C
C
C
	IF (IARTD .EQ. 1) THEN
		IARTN=IARTN-1
		IF (IARTN .GT. 0) THEN
			DO 10272 I=IAXX-5,IAXX+5
			DO 10272 J=IAYY-5,IAYY+5
				IF (SPACE(I,J) .EQ. 'K')GOTO 10275
10272			CONTINUE
			CALL CC(18,1)
			PRINT 10273
10273	FORMAT('+','MESSAGE FROM ARTRIDIAN PASSENGER LINER GRATEFULLY'
     1			,' ACKNOLEDGEING OUR HELP.')
			PRINT 10274
10274	FORMAT(1X,'MESSAGE FROM STARFLEET, YOU HAVE BEEN AWARDED'
     1		,' 25 MISSION POINTS')
			NWMBR=NWMBR+25
			IARTD=0
			GOTO 10281
C
C
C
10275			CALL CC(22,1)
			PRINT 10276,IAXX,IAYY
10276	FORMAT('+','WE''RE RECEIVING A DISTRESS CALL FROM A ARTRIDIAN'
     1		,' PASSENGER SHIP AT <',I3,',',I3,'>')
			PRINT 10277
10277	FORMAT(1X,'IT REPORTS BEING UNDER HEAVY KLINGON ATTACK. REGULA'
     1			,'TIONS STATE WE MUST RESPOND')
			GOTO 10281
		ELSE
		IARTT=1
		IARTD=0
		IXX5=IAXX
		IYY5=IAYY
		GOTO 4114
10278		CALL CC(18,1)
		PRINT 10279
10279	FORMAT('+','STARFLEET REPORTS ARTRIDIAN PASSENGER SHIP DES'
     1		,'TROYED. STARFLEET REPRIMAND IN')
		PRINT 10280
10280	FORMAT(1X,'ORDER. YOU HAVE LOST 50 MISSION POINTS.')
		NWMBR=NWMBR-50
		ENDIF
	ENDIF
10281	CONTINUE
C
C
C
C
C		**********	END ARTRIDIAN
C
C
C
C

	CALL RANDU(I1,I2,X)
	IF (PHA .LT. 100 .AND. PHA .GT. 0) PHA=PHA+(IRP(3)*(DAM/100))+X
	IF (TOR .LT. 100 .AND. TOR .GT. 0) TOR=TOR+(IRP(4)*(DAM/100))+X
	IF (SRS .LT. 100 .AND. SRS .GT. 0) SRS=SRS+(IRP(1)*(DAM/100))+X
	IF (XLRS .LT. 100 .AND. XLRS .GT. 0) XLRS=XLRS+(IRP(2)*(DAM/100))+X
	IF (XIMP .LT. 100 .AND. XIMP .GT. 0) XIMP=XIMP+(IRP(5)*(DAM/100))+X
	IF (COM .LT. 100 .AND. COM .GT. 0) COM=COM+(IRP(11)*(DAM/100))+X
	IF (WRP .LT. 100 .AND. WRP .GT. 0) WRP=WRP+(IRP(6)*(DAM/100))+X
	IF (TRA .LT. 100 .AND. TRA .GT. 0) TRA=TRA+(IRP(7)*(DAM/100))+X
	IF (PRB .LT. 100 .AND. PRB .GT. 0) PRB=PRB+(IRP(8)*(DAM/100))+X
	IF (DAM .LT. 100 .AND. DAM .GT. 0) DAM=DAM+(IRP(9)*(DAM/100))+X
	IF (GEN .LT. 100 .AND. GEN .GT. 0) GEN=GEN+(IRP(10)*(DAM/100))+X
	IF (SRS .GT. IPPP(1)*10) SRS=IPPP(1)*10+1
	IF (XLRS .GT. IPPP(2)*6.7) XLRS=IPPP(2)*6.7+1
	IF (PHA .GT. IPPP(3)*4) PHA=IPPP(3)*4+1
	IF (TOR .GT. IPPP(4)*6.7) TOR=IPPP(4)*6.7+1
	IF (XIMP .GT. IPPP(5)*6.7) XIMP=IPPP(5)*6.7+1
	IF (WRP .GT. IPPP(6)*4) WRP=IPPP(6)*4+1
	IF (TRA .GT. IPPP(7)*20) TRA=IPPP(7)*20+1
	IF (PRB .GT. IPPP(8)*20) PRB=IPPP(8)*20+1
	IF (DAM .GT. IPPP(9)*3.4) DAM=IPPP(9)*3.4+1
	IF (GEN .GT. IPPP(10)*6.7) GEN=IPPP(10)*6.7+1
	IF (COM .GT. IPPP(11)*6.7) COM=IPPP(11)*6.7+1
	IF (PHA .GT. 100) PHA=100
	IF (TOR .GT. 100) TOR=100
	IF (SRS .GT. 100) SRS=100
	IF (XLRS .GT. 100) XLRS=100
	IF (XIMP .GT. 100) XIMP=100
	IF (WRP .GT. 100) WRP=100
	IF (PRB .GT. 100) PRB=100
	IF (COM .GT. 100) COM=100
	IF (GEN .GT. 100) GEN=100
	IF (DAM .GT. 100) DAM=100
	IF (TRA .GT. 100) TRA=100
	IF (ENERGY .LT. 0) GO TO 9500
	IF (SHLDS .LT. 0) GO TO 9500
	IF (IPOP .LT. 1) GO TO 9500
	ENERGY=ENERGY+((GEN/20)*DICRY)
	ITERCNT=ITERCNT+1
	IF (NTPWR .EQ. 1) THEN
		IF (ENERGY .GT. 9999) ENERGY=9999
	ELSE
		IF (ENERGY .GT. 5000) ENERGY=5000
	ENDIF
	XYZZY=0
	GO TO 1000
 502	CALL CC(1,32)
	PRINT 495
 495	FORMAT('+','POSITION')
	CALL CC(2,31)
	PRINT 5303,IX,IY
 5303	FORMAT('+','<',I3,',',I3,'>')
	CALL CC(4,32)
	PRINT 490
 490	FORMAT('+','SHIELDS')
	CALL CC(5,31)
	PRINT 5304,SHLDS
 5304	FORMAT('+',F7.3,' %')
	CALL CC(7,32)
	PRINT 496
 496	FORMAT('+','POWER')
	CALL CC(8,31)
	PRINT 5305,ENERGY
 5305	FORMAT('+',F10.4)
	IF (MOV .GT. 0) GO TO 4310
	CALL LNCR(16)
	CALL CC(16,1)
	PRINT 500
 500	FORMAT('+','COMMAND      :',$)
	ACCEPT 510,COMM
 510	FORMAT(A3)
	DO 5306 IABC=15,23
		CALL LNCR(IABC)
 5306	CONTINUE
	IF (COMM .EQ. 'SRS') GO TO 1000 
	IF (COMM .EQ. 'LRS') GO TO 2000 
	IF (COMM .EQ. 'PPN') GO TO 3000 
	IF (COMM .EQ. 'PHA') GO TO 4000 
	IF (COMM .EQ. 'TOR') GO TO 4100 
	IF (COMM .EQ. 'IMP') GO TO 4300 
	IF (COMM .EQ. 'WRP') GO TO 4400 
	IF (COMM .EQ. 'HLP') GO TO 4500 
	IF (COMM .EQ. 'LPR') GO TO 4600
	IF (COMM .EQ. 'COM') GO TO 4510
	IF (COMM .EQ. 'LND') GO TO 4660
	IF (COMM .EQ. 'DAM') GO TO 4650
	IF (COMM .EQ. 'SCR') GO TO 9606
	IF (COMM .EQ. 'QIT') GO TO 9400
	IF (COMM .EQ. 'BRD') GO TO 5000
	IF (COMM .EQ. 'CLR') GO TO 5505
	IF (COMM .EQ. 'DST') GOTO 12000
	IF (COMM .EQ. 'U') GO TO 10000
	IF (COMM .EQ. 'D') GO TO 10010
	IF (COMM .EQ. 'L') GO TO 10020
	IF (COMM .EQ. 'R') GO TO 10030
C
C
C
C
C
C
C
C
C
C
 1000	IF (SRS .LT. 25) GO TO 1100
	DO 1010 I6=IX-10,IX+10
	DO 1005 J6=IY-8,IY+8
		IF (I6 .LT. 1 .OR. I6 .GT. 250) GO TO 1020
		IF (J6 .LT. 1 .OR. J6 .GT. 250) GO TO 1020
		DUM=(IX-I6)**2+(IY-J6)**2
		IF (SQRT(DUM) .GT. (6*(SRS/100))) GO TO 1020
		IF (SPACE(I6,J6) .EQ. 0) THEN  
		SCAN(I6-(IX-8),J6-(IY-8))='.'
		ELSE 
		SCAN(I6-(IX-8),J6-(IY-8))=SPACE(I6,J6)
		END IF
		GO TO 1005
 1020		SCAN(I6-(IX-8),J6-(IY-8))='~'
 1005	CONTINUE
 1010 	CONTINUE
C
C
	DO 1050 I6=2,15
	CALL CC(I6-1,1)
	PRINT 1060,(SCAN(I6,J6),BLANK1,J6=1,15)
 1060	FORMAT ('+',80A1)
 1050	CONTINUE
 5204	IF (XYZZY .EQ. 1) THEN
		XYZZY=0
		GO TO 5203
	ENDIF
	GO TO 502
C
C
 1100	CALL CC(5,1)
	PRINT 1110
 1110	FORMAT ('+','** S.R.S. DAMAGED **')
	GO TO 5204
C
C
C		***********		END SRS
C
C
C		**********		LONG RANGE SENSOR SCANN
C
C
 2000	IRASE=15
	LRSCAL=1
	GO TO 5408
 5500	IF (XLRS .LT. 25) GO TO 2990
	CALL CC(1,45)
	PRINT 2001,XLRS
	CALL CC(2,45)
	PRINT 2002,(12*(XLRS/100))
 2001	FORMAT('+','L.R.S. FUNCTIONING AT ',F7.3,' %')
 2002	FORMAT('+','MAX. SCAN RANGE 5 - ',F6.3,' SCTRS')
	CALL CC (3,45)
	PRINT 2003
 2003	FORMAT('+','L.R.S. CONTACT AT SECTORS BELLOW')
	ICNT=4
	DO 2010 I=IX-15,IX+15
		DO 2005 J=IY-15,IY+15
			IF (I .LT. 1 .OR. I .GT. 250) GO TO 2005
			IF (J .LT. 1 .OR. J .GT. 250) GO TO 2005
			BUM=((I-IX)**2+(J-IY)**2)
			IF (SQRT(BUM) .LT. 5 .OR. SQRT(BUM) .GT. (12*(XLRS/100))) GO TO 2005
			IF (SPACE(I,J) .EQ. 0) GO TO 2005
			CNT=ICNT
			IF (ICNT/2 .EQ. NINT(CNT/2)) THEN
				CALL CC(ICNT,45)
			ELSE
				CALL CC(ICNT-1,55)
			ENDIF
			ICNT=ICNT+1
			PRINT 2020,I,J
 2020			FORMAT('+','<',I3,',',I3,'>')
 2005		CONTINUE
 2010	CONTINUE
	GOTO 400
 2990	CALL CC(17,1)
	PRINT 2991
 2991	FORMAT('+','LONG RANGE SENSORS INOPERATIVE')
	GOTO 400
C
C
C		**********		END LRS
C
C
C			**********		PINPOINT SCAN
C
C
 3000	CALL CC(17,1)
	PRINT 3010
 3010	FORMAT('+','SECTOR TO BE SCANNED :',$)
	READ(5,3020,ERR=3000),IXX,IYY
 3020	FORMAT(I4,I4)
	DUM=((IX-IXX)**2+(IY-IYY)**2)
	IF (SQRT(DUM) .GT. 5) GO TO 3990
	QERT=SPACE(IXX,IYY)
	QERT1=SPCE(IXX,IYY,11)
	QERT2=SPCE(IXX,IYY,12)
	CALL PINPNT(QERT,QERT1,QERT2)
	GOTO 400
3990	PRINT 3991
3991	FORMAT(1X,'SECTOR OUT OF RANGE')
	GOTO 400
C
C
C		**********		PHASER CONTROL
C
C
C
4000	IF (PHA .LT. 25) GOTO 4020
	CALL CC(16,1)
	PRINT 4044
4044	FORMAT('+','PLANETOID OR MULTIPLE TARGETS (P/M) :',$)
	READ(5,23,ERR=4000),ANS
	IF (ANS .EQ. 'P') GOTO 4005
	ICTX=0
	MCR=16
	DO 4001 I=IX-6,IX+6
	DO 4001 J=IY-6,IY+6
		IF (I .GT. 250 .OR. I .LT. 1) GOTO 4001
		IF (J .GT. 250 .OR. J .LT. 1) GOTO 4001
		DUM=((IX-I)**2+(IY-J)**2)
		IF (SQRT(DUM) .GT. (6*PHA/100)) GOTO 4001
		TYP=' '
4015		IF (SPACE(I,J) .EQ. 'R') TYP='ROMULAN'
		IF (SPACE(I,J) .EQ. 'K') TYP='KLINGON'
		IF (SPACE(I,J) .EQ. 'V') TYP='VESARUS'
		IF (SPACE(I,J) .EQ. 'D') TYP='DRIDEN'
		IF (SPACE(I,J) .EQ. 'F') TYP='FREIGHTER'
		IF (SPACE(I,J) .EQ. 'X') TYP='ALIEN'
		IF (SPACE(I,J) .EQ. '@') TYP='DERILICT'
		IF (SPACE(I,J) .EQ. '&') TYP='CURIDIAN'
		IF (SPACE(I,J) .EQ. 'E') GOTO 4001
		IF (SPACE(I,J) .EQ. 0) GOTO 4001
		IF (TYP .EQ. ' ') GOTO 4001
		IF (IPU .EQ. 1) THEN
			IPU=0
			GOTO 4016
		ENDIF
		IF (MCR .EQ. 24) MCR=16
4003		CALL LNCR(MCR,1)
		CALL CC(MCR,1)
		PRINT 4002,I,J,TYP,SPCE(I,J,11),SQRT(DUM),ENERGY
4002	FORMAT('+','<',I3,',',I3,'>',A10,' ',F6.2,' DST:',F5.3,'  ENGY:',
	1	F10.4,'  FIRE :',$)
		READ(5,4004,ERR=4003),UNITS
		IF (UNITS .EQ. 0) GOTO 4001
		IF (UNITS .EQ. -1) GOTO 4010
		IF (UNITS .LT. 0) GOTO 4003
4004		FORMAT(F10.4)
		HIT=UNITS/(SQRT(DUM)/2)
		ENERGY=ENERGY-UNITS
		MCR=MCR+1
		ICTX=ICTX+1
		ITX(ICTX)=I
		ITY(ICTX)=J
		TR(ICTX)=HIT
4001	CONTINUE
	IF (ICTX .EQ. 0) GOTO 400
4010	MCR=16
	DO 4011 I11=1,ICTX
		I=ITX(I11)
		J=ITY(I11)
		IPU=1
		GOTO 4015
4016		IF (MCR .EQ. 24) MCR=16
		CALL LNCR(MCR,1)
		CALL CC(MCR,1)
		PRINT 4017,TR(I11),TYP,I,J
4017	FORMAT('+',F8.3,' UNIT HIT ON ',A10,' AT SECTOR <',I3,',',I3,'>',$)
		MCR=MCR+1
		IF (SPACE(I,J) .EQ. 'V') SPCE(IXX5,IYY5,12)=1
		IF (SPACE(I,J) .EQ. 'X') GOTO 4011
		IF (SPACE(I,J) .EQ. '&') THEN
			CALL RANDU(I1,I2,X)
			FD1=TR(I11)*X
			TR(I11)=TR(I11)-FD1
			IF (MCR .EQ. 24) MCR=16
			CALL CC(MCR,1)
			PRINT 12104,FD1
12104	FORMAT('+',F10.4,' UNITS DEFLECTED BY HER SHIELDS',$)
			MCR=MCR+1
		ENDIF
		SPCE(I,J,11)=SPCE(I,J,11)-TR(I11)
		IF (SPCE(I,J,11) .LT. 0) THEN
			PRINT 4019,TYP
			IXX5=I
			IYY5=J
			IPU=1
			GOTO 4114
4019			FORMAT(1H+,'** ',A10,' DESTROYED **',$)
4018			IF (TYP .EQ. 'ROMULAN') IRMDES=IRMDES+1
			IF (TYP .EQ. 'KLINGON') IKLDES=IKLDES+1
			IF (TYP .EQ. 'VESARUS') ILOST=ILOST+1
			IF (TYP .EQ. 'DRIDEN') NWMBR=NWMBR+3
			IF (TYP .EQ. 'CURIDIAN') NWMBR=NWMBR+50
		ENDIF
4011	CONTINUE
	GOTO 400
4005	CALL LNCR(16)
	CALL CC(16,1)
	PRINT 4007
4007	FORMAT('+','TARGET SECTOR :',$)
	READ(5,3020,ERR=4005),IXX,IYY
	DIS=((IXX-IX)**2+(IYY-IY)**2)
	IF (SQRT(DIS) .GT. 6*PHA/100) GOTO 3990
	IF (SPACE(IXX,IYY) .EQ. 0) THEN
		PRINT 11008
11008		FORMAT(1X,' NEGATIVE LOCKON, NO TARGET DETECTED')
		GOTO 400
	ENDIF
	IF (SPACE(IXX,IYY) .NE. 'O') THEN
		PRINT 11009
11009		FORMAT(1X,' INVALID PHASER TARGET TYPE')
		GOTO 400
	ENDIF
	PRINT 11010
11010	FORMAT(1X,' PHASERS LOCKED ON TO STRATEGIC AREAS ON PLANETS'
	1	,' SURFACE.')
4034	PRINT 4033
4033	FORMAT(1X,'UNITS TO FIRE :',$)
	READ(5,4004,ERR=4034)UNITS
	IF (UNITS .LT. 0) GOTO 4034
	IF (UNITS .GT. ENERGY) GOTO 4034
	ENERGY=ENERGY-UNITS
	HIT=UNITS/(SQRT(DIS)/2)
	PRINT 11055,HIT
11055	FORMAT(10X,'*** ',F10.4,' UNIT HIT ON PLANET')
	SPCE(IXX,IYY,11)=SPCE(IXX,IYY,11)-HIT
	IF (SPCE(IXX,IYY,11) .LT. 0) THEN
		IF (SPCE(IXX,IYY,12) .LT. 4 .OR. SPCE(IXX,IYY,12)
	1		.GT. 7) THEN
			SPCE(IXX,IYY,12)=10
		ENDIF
	ENDIF
	IF (SPCE(IXX,IYY,12) .EQ. 5) THEN
		 SPCE(IXX,IYY,12)=6
		GOTO 400
	ENDIF
	IF (SPCE(IXX,IYY,12) .EQ. 6) THEN
		IF (SPCE(IXX,IYY,11) .LT. 500) THEN
			CALL RANDU(I1,I2,X)
			IF (X .GT. .8) THEN
	PRINT  11011,IXX,IYY
11011	FORMAT(1X,' MESSAGE FROM PLANET AT SECTOR <',I3,',',I3,'>')
	PRINT 11012
11012	FORMAT(1X,' THEY SAY THERE SHIELDS ARE LOWERED AND THEY HAVE'
	1	,' CAPITULATED.')
				SPCE(IXX,IYY,12)=5
			ENDIF
		ENDIF
	ENDIF
	GOTO 400
 4020	CALL LNCR(17)
	CALL CC(17,1)
	PRINT 4021
 4021	FORMAT('+','PHASER BANKS INOPERATIVE')
	GO TO 400

C
C
C		**********		END PHASER CONTROL
C
C
C
C
C
C
C		**********		PHOTON TORPEDO CONTROL
C
C
C
 4100	IF (TOR .LT. 07) GO TO 4200
	IDIST=8*(TOR/100)
	IXX5=0
	IYY5=0
 4108	CALL LNCR(16)
	CALL CC(16,1)

	PRINT 4101
 4101	FORMAT('+','TORPEDO COURSE (0.0 - 359.9999) :',$)
	READ(5,4102,ERR=4108),CRSE
 4102	FORMAT(F10.4)
	CRSE=360.-CRSE
 4104	FORMAT(I3)
	IFUSE=8
	CRSE=CRSE*3.1415926/180
	XPLUS=SIN(CRSE)
	YPLUS=COS(CRSE)
	CALL LNCR(16)
	CALL CC(16,1)
	PRINT 4105
 4105	FORMAT('+','TORPEDO TRACK  :',/)
	ENERGY=ENERGY-25
	X=IX
	Y=IY
	DO 4106 I=1,IFUSE
	X=X+XPLUS
	Y=Y+YPLUS
	PRINT 4107,X,Y
 4107	FORMAT(1H+,'<',F7.3,',',F7.3,'>',$)
	IXX5=NINT(X)
	IYY5=NINT(Y)
	IF (IYY5 .LT. 1 .OR. IYY5 .GT. 250) GO TO 4127
	IF (IXX5 .LT. 1 .OR. IXX5 .GT. 250) GO TO 4127 
	IF (SPACE(IXX5,IYY5) .EQ. 'K') GO TO 4110
	IF (SPACE(IXX5,IYY5) .EQ. 'R') GO TO 4112
	IF (SPACE(IXX5,IYY5) .EQ. 'O') GO TO 4220
	IF (SPACE(IXX5,IYY5) .EQ. '*') GO TO 4115
	IF (SPACE(IXX5,IYY5) .EQ. 'F') GO TO 4125
	IF (SPACE(IXX5,IYY5) .EQ. '+') GO TO 4130
	IF (SPACE(IXX5,IYY5) .EQ. 'X') GO TO 4240
	IF (SPACE(IXX5,IYY5) .EQ. 'V') GO TO 4250
	IF (SPACE(IXX5,IYY5) .EQ. '@') GOTO 10402
	IF (SPACE(IXX5,IYY5) .EQ. 'A') GOTO 10404
	IF (SPACE(IXX5,IYY5) .EQ. 'D') GOTO 10406
	IF (SPACE(IXX5,IYY5) .EQ. '=') GOTO 10408
	IF (SPACE(IXX5,IYY5) .EQ. '&') GOTO 12105
 4106	CONTINUE
 4127	PRINT 4230,IXX5,IYY5
 4230	FORMAT(5X,'*** TORPEDO DETONATION AT SECTOR <',I3,',',I3
     1		,'> ***')
	GO TO 400
 4110	PRINT 4111
 4111	FORMAT(10X,'***   KLINGON DESTROYED   ***')
	IKLDES=IKLDES+1
	GO TO 4114
 4112	PRINT 4113
 4113	FORMAT(10X,'***   ROMULAN DESTROYED   ***')
	IRMDES=IRMDES+1
 4114	DO 5501 I6=1,30
			CALL CC(IXX5-(IX-7),((IYY5-(IY-7))*2)+1)
			PRINT 5451,EXPLO(I6)
 5501	CONTINUE
	SPACE(IXX5,IYY5)=0
	SPCE(IXX5,IYY5,11)=0
	SPCE(IXX5,IYY5,12)=0
	IF (DEREXP .EQ. 1) THEN
		DEREXP=0
		HIT=40
		GOTO 2110
	ENDIF
	IF (SDES .EQ. 1) THEN
		IF (CIT .LT. 5) THEN
			CIT=CIT+1
			GOTO 4114
		ENDIF
		GOTO 9500
	ENDIF
	IF (IARTT .EQ. 1) THEN
		IARTT=0
		GOTO 10278
	ENDIF
	IF (INV .EQ. 1) THEN
		INV=0
		GOTO 10283
	ENDIF
	IF (IPU .EQ. 1) THEN
		IPU=0
		GOTO 4018
	ENDIF
	GO TO 400
 4115	PRINT 4116
 4116	FORMAT(10X,'**  TORPEDO ABSORBED BY SOLAR MASS  **')
	IF (SPCE(IXX5,IYY5,12) .EQ. 2) THEN
		CALL RANDU(I1,I2,X)
		INOVA=X*6
		IF (INOVA .LT. 2) INOVA=2
		INOVX=IXX5
		INOVY=IYY5
	ENDIF
	GO TO 400
 4125	PRINT 4126
 4126	FORMAT(10X,'***   FREIGHTER DESTROYED   ***')
	GO TO 4114
 4130	PRINT 4131
 4131	FORMAT(10X,'**  TORPEDO LOST IN HIGH GRAVITATIONAL FEILD  **')
	GO TO 400
 4200	CALL LNCR(17)
	CALL CC(17,1)
	PRINT 4210
 4210	FORMAT('+','** PHOTON TORPEDO TUBES DAMAGED **')
	GO TO 400
 4220	PRINT 4221,IXX5,IYY5
 4221	FORMAT(5X,'* TORPEDO HIT ON PLANET AT SECTOR <',I3,',',
     1		I3,'> *')
	GOTO 400
 4240	PRINT 4241
 4241	FORMAT(10X,'** TORPEDO DETONATION ON ALIEN VESSEL')
	SPCE(IXX5,IYY5,11)=SPCE(IXX5,IYY5,11)-1
	IF (SPCE(IXX5,IYY5,11) .GT. 0) THEN
		PRINT 4242
 4242	FORMAT(10X,'SENSORS DETECT DAMAGE TO ALIEN VESSEL')
		GO TO 400
	ELSE
		PRINT 4243
 4243	FORMAT(10X,'**** ALIEN DESTROYED ****')
	NOMOVE=0
	GO TO  4114
	ENDIF
 4250	PRINT 4251
 4251	FORMAT(10X,'** TORPEDO HIT ON VESARUS WARCRUSIER **')
	SPCE(IXX5,IYY5,11)=SPCE(IXX5,IYY5,11)-100
	SPCE(IXX5,IYY5,12)=1
 	IF (SPCE(IXX5,IYY5,11) .LT. 0) THEN
 5155		PRINT 5160
 5160	FORMAT(10X,'** VESARUS WARCRUSIER DESTROYED **')
		ILOST=ILOST+1
		GO TO 4114
	ELSE
		PRINT 5161
 5161	FORMAT(10X,'** VESARUS WARCRUSIER DAMAGED')
	ENDIF
	GO TO 400
10402	PRINT 11013
11013	FORMAT(1X'    *** DERELICT SPACESHIP DESTROYED ***')
	GOTO 4114
10404	PRINT 11014
11014	FORMAT(1X,'    *** ARTRIDIAN CRUISE LINER DESTROYED ***')
	TYPE *,' DUE TO YOUR HEROIC ACT OF BUTCHERING HUNDREDS OF'
	PRINT 11020
11020	FORMAT(1X,' INNOCENT PEOPLE STARFLEET HAS SEEN FIT TO AWARD'
	1	,' YOU -200 MISSION POINTS')
	NWMBR=NWMBR-200
	IARTD=0
	GOTO 4114
10406	PRINT 11021
11021	FORMAT(1X,'    *** DRIDEN SPACEFIGHTER DESTROYED ***')
	NWMBR=NWMBR+3
	GOTO 4114
10408	PRINT 11022
11022	FORMAT(1X,'    *** DRIDEN MISSILE DESTROYED ***')
	GOTO 4114
12105	CALL RANDU(I1,I2,X)
	IF (X .GT. .5) THEN
		PRINT 12106
12106	FORMAT(1X,'*****  TORPEDO NEUTRALIZED BY CURIDIAN  *****')
		GOTO 400
	ENDIF
	PRINT 12107
12107	FORMAT(1X,'***  TORPEDO HIT ON CURIDIAN FLAGSHIP  ***')
	SPCE(IXX5,IYY5,11)=SPCE(IXX5,IYY5,11)-100
	IF (SPCE(IXX5,IYY5,11) .GT. 0) GOTO 400
	PRINT 12108
12108	FORMAT(1X,'*** CURIDIAN FLAGSHIP DESTROYED ***')
	NWMBR=NWMBR+50
	GOTO 4114
C
C
C		**********		END TORPEDO CONTROLL
C
C
C
C		**********		IMPULSE DRIVE
C
C
C
 4300	IF (XIMP .LT. 25) GO TO 4308
	IF (NOMOVE .EQ. 1) GO TO 4707
	CALL CC(16,1)
	PRINT 4301,XIMP
 4301	FORMAT('+','IMPULSE DRIVE FUNCTIONING AT ',F8.4,' %')
	MOVI=8*(XIMP/100)
	PRINT 4302,MOVI
 4302	FORMAT(1X,'MAXIMUM RANGE  :',I2,' SECTORS',/)
 4323	CALL LNCR(18)
	CALL CC(18,1)
	PRINT 4303
 4303	FORMAT('+','COURSE (0.0 - 359.9999) :',$)
	READ(5,4304,ERR=4323),CRSE
 4304	FORMAT(F8.4)
 4305	CALL LNCR(19)
	CALL CC(19,1)
	PRINT 4306,MOVI
 4306	FORMAT('+','FACTOR  (0 - ',I1,')  :',$)
	READ(5,4307,ERR=4305),MOV
 4307	FORMAT(I1)
	IF (MOV .GT. MOVI .OR. MOV .LT. 0) GO TO 4305
	CCRS=CRSE
	CRSE=360.-CRSE
	CRSE=CRSE*3.1415926/180
	XIPLS=SIN(CRSE)
	YIPLS=COS(CRSE)
	GO TO 400
 4308	CALL LNCR(17)
	CALL CC(17,1)
	MOV=0
	PRINT 4309
 4309	FORMAT('+',10X,'***   IMPULSE DRIVE DAMAGED   ***')
	GO TO 485
 4707	CALL CC(17,1)
	PRINT 4708
 4708	FORMAT('+','WE ARE HELD IN TRACTOR FIELD ORIGINATING'
     1		,' FROM ALIEN SPACESHIP')
 	PRINT 4709
 4709	FORMAT(1X,'ALL ENGINES USELESS')
	GO TO 400
C
C
C
 4310	IF (XIMP .LT. 25) GO TO 4308
	IF (PLSFACT .GT. 0) THEN
 5520	CALL LNCR(20)
	CALL LNCR(21)
	CALL LNCR(22)
	CALL LNCR(19)
	CALL CC(20,1)
	PRINT 5521,PLSFACT
 5521	FORMAT('+',F10.3,' UNITS OF POWER NEEDED TO COUNTERACT GRAVITY.')
	PRINT 5522
 5522	FORMAT(1X,'DO YOU AUTHORIZE (Y/N) :',$)
	READ(5,23,ERR=5520),ANS
	IF (ANS .EQ. 'N') THEN
		MOV=0
		GO TO 400
	ELSE
		ENERGY=ENERGY-PLSFACT
	ENDIF
	ENDIF
	SPACE(IX,IY)=0
	IF (SPCE(IX,IY,1) .EQ. 5) SPACE(IX,IY)='^'
	IX=IX+(XIPLS+.5)
	IY=IY+(YIPLS+.5)
	IF (IX .EQ. 1 .AND. XIPLS+.5 .GE. 0) GOTO 14000
	IF (IX .EQ. 250 .AND. XIPLS+.5 .LE. 0) GOTO 14000
	IF (IY .EQ. 1 .AND. YIPLS+.5 .GE. 0) GOTO 14000
	IF (IY .EQ. 250 .AND. YIPLS+.5 .LE. 0) GOTO 14000
	IF (IX .EQ. 1 .OR. IX .EQ. 250) THEN
		MOV=0
		GO TO 4320
	ENDIF
	IF (IY .EQ. 1 .OR. IY .EQ. 250) THEN
		MOV=0
		GO TO 4320
	ENDIF
14000	IF (SPACE(IX,IY) .EQ. ']') GO TO 5130
	IF (SPACE(IX,IY) .EQ. '[') GO TO 5131
 5129	IF (SPACE(IX,IY) .NE. 0 .AND. SPCE(IX,IY,1) .NE. 5) GO TO 4321
	MOV=MOV-1
 4320	IF (IX .LT. 1) IX=1
	IF (IX .GT. 250) IX=250
	IF (IY .LT. 1) IY=1
	IF (IY .GT. 250) IY=250
 	SPACE(IX,IY)='E'
	GO TO 400
 4321	CALL CC(20,1)
	PRINT 4322,IX,IY
 4322	FORMAT('+',10X,'****    BLOCKED BY OBJECT AT <',I3,','
     1		,I3,'>   ****')
	MOV=0
	IX=IX-(XIPLS-.5)
	IY=IY-(YIPLS-.5)
	GO TO 4320
C
C
C
C
C			THE 'U' COMMAND
10000	IF (NOMOVE .EQ. 1) GOTO 4707
	XIPLS=-1
	YIPLS=0
	GO TO 4310
C
C
C			THE 'D' COMMAND
10010	IF (NOMOVE .EQ. 1) GOTO 4707
	XIPLS=1
	YIPLS=0
	GO TO 4310
C
C
C			THE 'L' COMMAND
10020	IF (NOMOVE .EQ. 1) GOTO 4707
	XIPLS=0
	YIPLS=-1
	GO TO 4310
C
C
C			THE 'R' COMMAND
10030	IF (NOMOVE .EQ. 1) GOTO 4707
	XIPLS=0
	YIPLS=1
	GO TO 4310
C
C
C
C
C
C		**********		END IMPULSE MOVEMENT
C
C
C
C		**********		WARP DIRVE
C
C
C
C
 4400	IF (WRP .LT. 25) GO TO 4408
	IF (NOMOVE .EQ. 1) GO TO 4707
	IF (NARNEU .EQ. 1) THEN
		CALL CC(17,1)
		PRINT 12110
12110	FORMAT('+','WARP DRIVE HAS BEEN NEUTRALIZED BY UNKNOWN ENERGY'
	1	,' FIELD FROM')
		PRINT 12111
12111	FORMAT(1X,'THE CURIDIAN FLAGSHIP')
		GOTO 400
	ENDIF
	CALL CC(16,1)
	PRINT 4401,WRP
 4401	FORMAT('+','WARP DRIVE OPERATING AT ',F8.4,' %')
	IF (NTBWD .EQ. 1) THEN
		DIST=75*(WRP/100)
	ELSE
		DIST=50*(WRP/100)
	ENDIF
	PRINT 4402,DIST
 4402	FORMAT(1X,'MAXIUM RANGE ',F8.4,' SECTORS')
 4412	CALL LNCR(18)
	CALL CC(18,1)
	PRINT 4403
 4403	FORMAT('+','DESTINATION SECTOR  :',$)
	READ(5,4404,ERR=4412),IXX,IYY
 4404	FORMAT(I5,I4)
	IF (SPCE(IX,IY,5) .EQ. 20) THEN
	PRINT 11023
11023	FORMAT(1X,'THERE SEEMS TO BE SOME SORT OF DAMPING FIELD IN THIS')
	PRINT 11024
11024	FORMAT(1X,'AREA HAMPERING OUR ATTEMPTS TO ENTER HYPERSPACE. ALL')
	PRINT 11025
11025	FORMAT(1X,'INDICATIONS SHOW THIS TO BE SOME NATURAL PHENOMENON')
		GOTO 485
	ENDIF
	CALL RANDU(I1,I2,X)
	IF (INOVA .GT. 0) X=X+.4
	IF (X .GT. .95) GO TO 4710
 	DUM=((IX-IXX)**2+(IY-IYY)**2)
	IF (SQRT(DUM) .GT. DIST) GO TO 3990
 4714	SPACE(IX,IY)=0
	IF (NTAWD .EQ. 1) GOTO 10231
	CALL RANDU(I1,I2,X)
	CALL RANDU(I1,I2,Y)
	IF (X .GT. .5) THEN
		IXX=IXX+(SQRT(DUM)*(Y/10))
	ELSE
		IXX=IXX-(SQRT(DUM)*(Y/10))
	ENDIF
	CALL RANDU(I1,I2,X)
	CALL RANDU(I1,I2,Y)
	IF (X .GT. .5) THEN
		IYY=IYY+(SQRT(DUM)*(Y/10))
	ELSE
		IYY=IYY-(SQRT(DUM)*(Y/10))
	ENDIF
10231	IF (IXX .LT. 1) IXX=1
	IF (IXX .GT. 250) IXX=250
	IF (IYY .LT. 1) IYY=1
	IF (IYY .GT. 250) IYY=250
	IF (SPACE(IXX,IYY) .NE. 0) GO TO 4405
	IX=IXX
	IY=IYY
	SPACE(IX,IY)='E'
	GO TO 400
4405	CALL LNCR(24)
	CALL LNCR(24)
	PRINT 4406
4406	FORMAT(1X,'***********************')
	PRINT 4407,IXX,IYY
 4407	FORMAT(1X,'YOUR SHIP HAS BEEN DESTROYED BY A COLLISION WITH'
     1		,' OBJECT AT SECTOR <',I3,',',I3,'>',/////)
	GO TO 9500
 4408	CALL LNCR(17)
	CALL CC(17,1)
	PRINT 4409
 4409	FORMAT('+','***    WARP DRIVE DAMAGED   ***')
	GO TO 485
 4710	PRINT 4711
 4711	FORMAT(5X,'**  ION STORM...  HYPERSPACE DISRUPTION')
	PRINT 4712
 4712	FORMAT(5X,'    VESSEL ON RANDOM TRAJECTORY')
 4713	CALL RANDU(I1,I2,X)
	IYY=(X*250)+1
	IF (IYY .GT. 250) GO TO 4713
	CALL RANDU(I1,I2,X)
	IXX=(X*250)+1
	IF (IXX .GT. 250) GO TO 4713
	GO TO 4714
C
C
C		**********		END WARP DRIVE
C
C
C
C		**********		LIST COMMANDS
C
C
C
 4500	REWIND 3
 4501	READ(3,4502,END=4504),OUTPT
 4502	FORMAT(A80)
	PRINT 4503,OUTPT
 4503	FORMAT(1X,T2,A80)
	GO TO 4501
 4504	CLOSE(UNIT=3)
	GO TO 485
C
C
C
C
C		*********		COMPUTER
C
C
C
 4510	IF (COM .LT. 25) GO TO 4590
	CALL CC(16,1)
	PRINT 4511
 4511	FORMAT(1X,'COMPUTER ACTIVATED')
 4512	PRINT 4513
 4513	FORMAT(1X,'COMPUTER COMMAND :',$)
	READ(5,4514,ERR=4592),ICM
 4514	FORMAT(I2)
	GO TO (5030,5040,4550,10150,4516,5505),ICM
 4592 	PRINT 4515
 4515	FORMAT(1X,'DOES NOT COMPUTE')
	PRINT 4534
 4534	FORMAT(1X,'PRESENT COMPUTER COMMANDS ARE AS FOLLOWS :')
 4537	READ(2,4502,END=4536),OUTPT
	PRINT 4503,OUTPT
	GO TO 4537
 4536	CLOSE(UNIT=2)
	GO TO 4512
 4516	PRINT 4517
 4517	FORMAT(1X,'MANPOWER RESHUFFLE')
	PRINT 4518 
 4518	FORMAT(1X,/,1X,'CODE',5X,'SYSTEM',14X,'MINIMUM',5X,'ALLOTED')
 4519	FORMAT(1X,'  1',6X,'SHORT RANGE SENSORS',1X,' 10',9X,I3)
 4520	FORMAT(1X,'  2',6X,'LONG RANGE SENSORS',2X,' 15',9X,I3)
 4521	FORMAT(1X,'  3',6X,'PHASER BANKS',8X,' 25',9X,I3)
 4522	FORMAT(1X,'  4',6X,'TORPEDO TUBES',7X,' 15',9X,I3)
 4523	FORMAT(1X,'  5',6X,'IMPULSE DRIVE',7X,' 15',9X,I3)
 4524 	FORMAT(1X,'  6',6X,'WARP DRIVE',10X,' 25',9X,I3)
 4525	FORMAT(1X,'  8',6X,'PROBE LAUNCHER',6X,'  5',9X,I3)
 4526	FORMAT(1X,'  7',6X,'TRANSPORTER',9X,'  5',9X,I3)
 4527	FORMAT(1X,' 11',6X,'COMPUTER BANKS',6X,' 15',9X,I3)
 4528	FORMAT(1X,' 10',6X,'GENERATORS',10X,' 15',9X,I3)
 4529	FORMAT(1X,'  9',6X,'DAMAGE CONTROL',6X,' 30',9X,I3)
 4530	FORMAT(1X,' 12',6X,'EXCESS PERSONEL',5X,'   ',9X,I3)
	PRINT 46
	PRINT 4519,IPPP(1)
	PRINT 4520,IPPP(2)
	PRINT 4521,IPPP(3)
	PRINT 4522,IPPP(4)
	PRINT 4523,IPPP(5)
	PRINT 4524,IPPP(6)
	PRINT 4526,IPPP(7)
	PRINT 4525,IPPP(8)
	PRINT 4529,IPPP(9)
	PRINT 4528,IPPP(10)
	PRINT 4527,IPPP(11)
	PRINT 4530,IPPP(12)
 4640	PRINT 4531
 4531	FORMAT(1X,/,1X,'FROM <CODE>,TO <CODE>,NUMBER   :',$)
	READ(5,4532,ERR=4640),IFCD,ITCD,NUM
 4532	FORMAT(I4,I4,I3)
	IF (IFCD .EQ. 0) GO TO 4512
	IF (IPPP(IFCD) .LT. NUM) THEN
		PRINT 4533
 4533	FORMAT(10X,'TRY AGAIN')
		GO TO 4516
	ELSE
		IF (IFCD .EQ. 9 .AND. IRP(12) .LT. NUM) THEN
			PRINT 4533
			GOTO 4516
		ENDIF
	ENDIF
	IF (IFCD .EQ. 9) IRP(12)=IRP(12)-NUM
	IPPP(IFCD)=IPPP(IFCD)-NUM
	IPPP(ITCD)=IPPP(ITCD)+NUM
	IF (ITCD .EQ. 9) IRP(12)=IRP(12)+NUM
	GO TO 4512
 4550	IF (GEN .LT. .01) GEN=.01
	DRAIN=100/(GEN/100)
	IF (GEN .LT. .01) GEN=.01
	PRINT 4551,DRAIN
 4551	FORMAT(1X,F11.4,' UNITS  =  1 %  SHIELDS')
 4553	PRINT 4552
 4552	FORMAT(1X,'ADDITIONAL UNITS TO ALLOCATE :',$)
	READ (5,4004,ERR=4553),DRA
	IF (DRA .LT. 0) GO TO 4553
	IF (DRA .GT. ENERGY-1) GO TO 4553
	SHLDS=SHLDS+(DRA/DRAIN)
	IF (SHLDS .GT. 100) SHLDS=100
	ENERGY=ENERGY-DRA
	GO TO 4512
 4590	CALL CC(17,1)
	PRINT 4591
 4591	FORMAT('+','**   COMPUTER IS DOWN (SOUND FAMILIAR)   **')
	GO TO 400
 5030	PRINT 5031
 5031	FORMAT(1X,/,10X,'DISTANCE CALCULATOR')
 5032	PRINT 5033
 5033	FORMAT(1X,'INPUT SECTOR  :',$)
	READ (5,4404,ERR=5032),IXX,IYY
	DIST=((IX-IXX)**2+(IY-IYY)**2)
	DIST=SQRT(DIST)
	PRINT 5034,IX,IY,IXX,IYY,DIST
 5034	FORMAT(1X,'THE DISTANCE BETWEEN SECTOR <',I3,',',I3,
     1		'> AND SECTOR <',I3,',',I3,'> IS ',F10.4,' SECTORS')
	GO TO 4512
 5040	PRINT 4023
	READ(5,4024,ERR=5040),IXX,IYY
4023	FORMAT(1X,'TARGET SECTOR :',$)
4024	FORMAT(I4,I4)
 5041	PRINT 5042
 5042	FORMAT(1X,'DESIRED UNIT HIT  :',$)
	READ (5,4004,ERR=5041),UNITS
	DIST=((IXX-IX)**2+(IYY-IY)**2)
	UNITS=UNITS*(SQRT(DIST)/2)
	PRINT 5043,UNITS
 5043	FORMAT(1X,'A PHASER SHOT OF ',F10.4,' UNITS IS REQUIRED')
	GO TO 4512



10150	PRINT 10151
10151	FORMAT(1X,///,1X,'DAMAGE CONTROL',///)
	PRINT 10152
10152	FORMAT(6X,'CODE',10X,'SYSTEM',15X,'MEN ASSIGNED',
     1		9X,'CURRENT REPAIR RATE',/)

10153	FORMAT(8X,'1',13X,'SHORT RANGE SENSORS',7X,I3,16X,F8.4)
10155	FORMAT(8X,'3',13X,'PHASER BANKS       ',7X,I3,16X,F8.4)
10156	FORMAT(8X,'4',13X,'TORPEDO TUBES      ',7X,I3,16X,F8.4)
10157	FORMAT(8X,'5',13X,'IMPULSE DRIVE      ',7X,I3,16X,F8.4)
10158	FORMAT(8X,'6',13X,'WARP DRIVE         ',7X,I3,16X,F8.4)
10160	FORMAT(8X,'8',13X,'PROBE LAUNCHER     ',7X,I3,16X,F8.4)
10159	FORMAT(8X,'7',13X,'TRANSPORTER        '7X,I3,16X,F8.4)
10161	FORMAT(8X,'9',13X,'DAMAGE CONTROL     ',7X,I3,16X,F8.4)
10162	FORMAT(8X,'10',12X,'GENERATORS         ',7X,I3,16X,F8.4)
10163	FORMAT(8X,'11',12X,'COMPUTER BANKS     ',7X,I3,16X,F8.4)
10164	FORMAT(8X,'12',12X,'EXCESS PERSONEL    ',7X,I3,16X)
10154	FORMAT(8X,'2',13X,'LONG RANGE SENSORS',8X,I3,16X,F8.4)
	CALL RANDU(I1,I2,X)
	PRINT 10153,IRP(1),IRP(1)*(DAM/100)+X
	PRINT 10154,IRP(2),IRP(2)*(DAM/100)+X
	PRINT 10155,IRP(3),IRP(3)*(DAM/100)+X
	PRINT 10156,IRP(4),IRP(4)*(DAM/100)+X
	PRINT 10157,IRP(5),IRP(5)*(DAM/100)+X
	PRINT 10158,IRP(6),IRP(6)*(DAM/100)+X
	PRINT 10159,IRP(7),IRP(7)*(DAM/100)+X
	PRINT 10160,IRP(8),IRP(8)*(DAM/100)+X
	PRINT 10161,IRP(9),IRP(9)*(DAM/100)+X
	PRINT 10162,IRP(10),IRP(10)*(DAM/100)+X
	PRINT 10163,IRP(11),IRP(11)*(DAM/100)+X
	PRINT 10164,IRP(12)
10170	PRINT 4531
	READ(5,4532,ERR=10170),IFCD,ITCD,NUM
	IF (IFCD .EQ. 0) GOTO 4512
	IF (ITCD .LT. 1 .OR. ITCD .GT. 12) GOTO 10170
	IF (IRP(IFCD) .LT. NUM) THEN
		PRINT 4533
		GOTO 10170
	ELSE
		IRP(IFCD)=IRP(IFCD)-NUM
	ENDIF
	IRP(ITCD)=IRP(ITCD)+NUM
	GOTO 4512
C
C	**********	GIVE BEARING
C
10200	PRINT 10201
10201	FORMAT(1X,'SECTOR  :',$)
	READ(5,4024,ERR=10200)IXX,IYY
	XX1=IXX
	YY1=IYY
	X1=IX
	Y1=IY
	IF (XX1-X1 .EQ. 0) THEN
		IF (YY1-Y1 .GT. 0) THEN
			ANGL=0
			GOTO 14001
		ELSE
			ANGL=180
			GOTO 14001
		ENDIF
	ENDIF
	IF (YY1-Y1 .EQ. 0) THEN
		IF (XX1-X1 .GT. 0) THEN
			ANGL=270
			GOTO 14001
		ELSE
			ANGL=90
			GOTO 14001
		ENDIF
	ENDIF
	ANGL=ATAN((XX1-X1)/(YY1-Y1))
	ANGL=ANGL*57.298688
	ANGL=360-ANGL
14001	PRINT 10202,ANGL
10202	FORMAT(1X,'THE ANGLE IS ',F10.4,' DEGREES')
	GOTO 4512
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C		**********		END COMPUTER
C
C
C
CC
C
C		*********		SELF DESTRUCT
C
C
C
12000	CALL CC(16,1)
	PRINT 12001
12001	FORMAT('+','ARE YOU SURE YOU WISH TO SELF DESTRUCT :',$)
	READ(5,62,ERR=12000),ANS
	IF (ANS .NE. 'YES') THEN
		PRINT 12002
12002		FORMAT(1X,' ***** SELF DESTRUCT ABORTED *****')
		GOTO 485
	ENDIF
	PRINT 12003
12003	FORMAT(1X,'* SELF DESRUCT SEQUENCE ENGAGED. 10 SECOND COUNTDOWN')
	SET=SECNDS(0.0)
	DO 12004 I=1,10
		IRB=10-I
		CALL CC(21,4)
		PRINT 12005,IRB
12005		FORMAT('+',I2,'.....')
12006		CTDN=SECNDS(SET)
		QI=I
		IF (CTDN .LT. QI) GOTO 12006
		CALL CC(21,4)
		PRINT 12007
12007		FORMAT('+','              ')
12004	CONTINUE
	IXX5=IX
	IYY5=IY
	SDES=1
	GOTO 4114
C
C
C
C		**********	END SELF DESTRUCT
C
C
C
C		*********	PROBE LAUNCH
C
C
C
 4600	IF (PRB .LT. 25) GO TO 4616
	IF (LNPR .EQ. 0) GO TO 4618
	ANS=' '
	IRASE=12
	IPRINT=1
	GO TO 5408
 5452	CALL CC(16,1)
	PRINT 4601,PRB
 4601	FORMAT('+',1X,'PROBE LAUNCHER FUNCTIONING AT ',F8.4
     1			,' %')
	IF (NTLPR .EQ. 1) THEN
		IDIST=25*(PRB/100)
	ELSE
		IDIST=15*(PRB/100)
	ENDIF
	PRINT 4602,IDIST
 4602	FORMAT(1X,'MAX RANGE  :',I2,' SECTORS')
	PRINT 4627,LNPR
 4627	FORMAT(1X,'PROBES LEFT :',I2)
	IF (NTPRB .EQ. 1) THEN
10233		PRINT 10232
10232		FORMAT(1X,'AUTOMATIC OR MANUVERABLE (A/M) ?',$)
		READ(5,23,ERR=10233),ANS
		IF (ANS .EQ. 'M') THEN
			CRSE=0
			I=0
			GOTO 10234
			ENDIF
	ENDIF
 4622	PRINT 4603
 4603	FORMAT(1X,/,1X,'DIRECTION OF LAUNCH  (0.0 - 359.9999) :',$)
	READ(5,4604,ERR=4622),CRSE
 4604	FORMAT(F10.4)
	IF (CRSE .EQ. -1) GO TO 4614
	LNPR=LNPR-1
10234	CRSE=360-CRSE
	CRSE=CRSE*3.1415926/180
	XPLUS=SIN(CRSE)
	YPLUS=COS(CRSE)
	IF (ANS .EQ. 'M' .AND. I .GT. 0) GOTO 4611
	XX=IX
	YY=IY
	DO 4611 I=1,IDIST+1
		XX=XX+XPLUS
		YY=YY+YPLUS
		IXX=(XX+.5)
		IYY=(YY+.5)
	IF (IXX .EQ. 1 .OR. IXX .EQ. 250) GO TO 4620
	IF (IYY .EQ. 1 .OR. IYY .EQ. 250) GO TO 4620
	IF (SPACE(IXX,IYY) .NE. 0) GO TO 4612
		DO 4607 I1=IXX-4,IXX+4
		DO 4607 J1=IYY-4,IYY+4
	IF (I1 .LT. 1 .OR. I1 .GT. 250) GO TO 4605
	IF (J1 .LT. 1 .OR. J1 .GT. 250) GO TO 4605
		DUM=((IXX-I1)**2+(IYY-J1)**2)
		IF (SQRT(DUM) .GT. 3) GO TO 4605
		IF (SPACE(I1,J1) .EQ. 0) THEN
	SCANN(I1-(IXX-4),J1-(IYY-4))='.'
		ELSE
	SCANN(I1-(IXX-4),J1-(IYY-4))=SPACE(I1,J1)
		ENDIF
	GO TO 4607
 4605	SCANN(I1-(IXX-4),J1-(IYY-4))='~'
 4607	CONTINUE
	CALL CC(1,45)
	PRINT 4608,IXX,IYY
 4608	FORMAT('+','PROBE SCAN FOR SECTOR <'I3,',',I3,'>')
	SCANN(4,4)=')'
	DO 4610 I2=0,8
		CALL CC(I2+2,50)
		PRINT 4609,(SCANN(I2,J2),BLANK1,J2=0,8)
 4609		FORMAT('+',80A1)
 4610	CONTINUE
10235	IF (ANS .EQ. 'M') THEN
		CALL LNCR(16)
		CALL CC(16,1)
		PRINT 10236
10236	FORMAT('+','(''-1.'' TO TERMINATE) DIRECTION (0.0 - 359.999) :',$)
		READ(5,4604,ERR=4622),CRSE
		IF (CRSE .EQ. -1) THEN
			ANS='A'
			GOTO 4611
		ENDIF
		GOTO 10234
	ENDIF
 4611	CONTINUE
	GO TO 400
 4612	CALL LNCR(16)
	CALL LNCR(17)
	CALL LNCR(18)
	CALL LNCR(19)
	CALL CC(17,1)
 	PRINT 4613,IXX,IYY
 4613	FORMAT('+','PROBE DESTROYED BY COLLISION WITH OBJECT'
     1		,' AT SECTOR <',I3,',',I3,'>')
	GO TO 400
 4614	CALL CC(17,1)
 	PRINT 4615
 4615	FORMAT('+','PROBE LAUNCH ABORTED')
	GO TO 400
 4616	CALL CC(17,1)
 	PRINT 4617
 4617	FORMAT('+',10X,'**  PROBE LAUNCHER NONOPERATIONAL  **')
	GO TO 400
 4618	CALL CC(17,1)
 	PRINT 4619
 4619	FORMAT('+',10X,'* ALL PROBES EXPENDED *')
	GO TO 400
 4620	CALL CC(17,1)
	PRINT 4621
 4621	FORMAT('+',5X,'* PROBE LOST *')
	GO TO 400
 5408	DO 5409 I6=1,IRASE
		CALL CC(I6,41)
		PRINT 5410
 5410	FORMAT('+','                                       ')
 5409	CONTINUE
	IF (INORET .EQ. 1) THEN
		INORET=0
		GO TO 502
	ENDIF
	IF (IDAM .EQ. 1) THEN
		IDAM=0
		GO TO 5453
	ENDIF
	IF (IPRINT .EQ. 1) THEN
		IPRINT=0
		GO TO 5452
	ENDIF
	IF (LRSCAL .EQ. 1) THEN
		LRSCAL=0
		GO TO 5500
	ENDIF
	GO TO 400
C
C
C
C		**********		END PROBE LAUNCH
C
C
C
C		**********		SHOW DAMAGE TO US
C
C
C
 4650	CALL CC(16,1)
	PRINT 4651
 4651	FORMAT('+','SHIPS STATUS IS AS FOLLOWS   :',//)
	CALL CC(17,1)
	PRINT 4652,SRS,COM
 4652	FORMAT('+','SHORT RANGE SENSORS :',F9.4,' %'
     1	      ,5X,'COMPUTER BANKS      :',F9.4,' %')
 4653	FORMAT('+','LONG RANGE SENSORS  :',F9.4,' %'
     1        ,5X,'TRANSPORTER         :',F9.4,' %')
 4654	FORMAT('+','PHASER BANKS        :',F9.4,' %'
     1        ,5X,'PROBE LAUNCHER      :',F9.4,' %')
 4655	FORMAT('+','TORPEDO TUBES       :',F9.4,' %'
     1	      ,5X,'GENERATORS          :',F9.4,' %')
 4656	FORMAT('+','IMPULSE DRIVE       :',F9.4,' %'
     1	      ,5X,'DAMAGE CONTROLL     :',F9.4,' %')
 4657	FORMAT('+','WARP DRIVE          :',F9.4,' %'
     1 	      ,5X,'FOOD STORES         :',F9.4)
 4658	FORMAT('+','DILITHIUM CRYSTALS  :',F9.4,'  '
     1	      ,5X,'SHIPS CREW          :',I6)
	CALL CC(18,1)
	PRINT 4653,XLRS,TRA
	CALL CC(19,1)
	PRINT 4654,PHA,PRB
	CALL CC(20,1)
	PRINT 4655,TOR,GEN
	CALL CC(21,1)
	PRINT 4656,XIMP,DAM
	CALL CC(22,1)
	PRINT 4657,WRP,FOOD
	CALL CC(23,1)
	PRINT 4658,DICRY,IPOP
	IRASE=16
	INORET=1
	GO TO 5408
C
C
C
C		**********		END DAMAGE REPORT
C
C
C
C
C		**********		LANDING PARTY CONTROL
C
C
C
 4660	IF (TRA .LT. 25) GO TO 400
	CALL CC(16,1)
	PRINT 4661,TRA
 4661	FORMAT('+','TRANSPORTER FUNCTIONING AT ',F9.4,' %')
	DIS=4*(TRA/100)
	PRINT 4402,DIS
 4623	CALL LNCR(18)
	CALL CC(18,1)
	PRINT 4663
 4663	FORMAT('+','LANDING PARTY DESTINATION :',$)
	READ(5,4404,ERR=4623),IXX,IYY
	DIST=((IX-IXX)**2+(IY-IYY)**2)
	IF (DIS .LT. SQRT(DIST)) THEN
		GO TO 3990
	ELSE
		CONTINUE
	ENDIF
	IF (SPACE(IXX,IYY) .NE. 'O') THEN
		PRINT 4666
 4666	FORMAT(1X,'BETTER TAKE A SECOND LOOK AT WHATS THERE')
		GO TO 400
	ELSE
		CONTINUE
	ENDIF
 4624	PRINT 4667
 4667	FORMAT(1X,'NUMBER TO BE SENT :',$)
	READ(5,4104,ERR=4624),NUM
	IF (NUM .GT. IPPP(12)) THEN
		PRINT 4695
 4695	FORMAT(1X,'INSUFFICENT PERSONEL')
		GO TO 400
	ENDIF
	EXP=(NUM*10)*SQRT(DIST)
	IF (EXP .GT. ENERGY) THEN
		PRINT 4664
 4664	FORMAT(1X,'INSUFFICENT ENERGY')
		GO TO 400
	ELSE
		ENERGY=ENERGY-EXP
	ENDIF
	SFOOD=0
	SMIN=0
	XENERGY=0
	ILNPR=0
	GO TO (4669,4672,4673,4676,4677,4700,4701),SPCE(IXX,IYY,12)+1
	GO TO (4703,4690,4704,10354),SPCE(IXX,IYY,12)-6
 4669	PRINT 4666
	GO TO 400
 4672	CALL RANDU(I1,I2,X)
	SFOOD=(X*2)*NUM
	CALL RANDU(I1,I2,X)
	SMIN=(X*NUM/10)
	GO TO 4690
 4673	CALL RANDU(I1,I2,X)
	INUM=X*25
	PRINT 4674
 4674	FORMAT(1X,'LANDING PARTY REPORTS BEING UNDER ATTACK BY'
     1		,' PLANETARY NATIVES')
	IF (INUM .GT. NUM) THEN
		IPPP(12)=IPPP(12)-NUM
		IPOP=IPOP-NUM
		PRINT 4675
 4675	FORMAT(1X,'ALL CONTACT WITH LANDING PARTY LOST')
		GO TO 400
	ELSE
		IPPP(12)=IPPP(12)-INUM
		IPOP=IPOP-INUM
		NUM=NUM-INUM
	ENDIF
	GO TO 4672
 4676	CALL RANDU(I1,I2,X)
	SFOOD=(X*5)*NUM
	GO TO 4690
 4677	IF (SPCE(IXX,IYY,11) .LT. 0) GO TO 4679
	INUM=SPCE(IXX,IYY,11)/2
	PRINT 4678
 4678	FORMAT(1X,'LANDING PARTY REPORTS CONFRONTATION WITH'
     1		,' PLANETARY ARMED FORCES')
	IF (INUM .GT. NUM) THEN
		IPPP(12)=IPPP(12)-NUM
		IPOP=IPOP-NUM
		PRINT 4675
		CALL RANDU(I1,I2,X)
		SPCE(IXX,IYY,11)=SPCE(IXX,IYY,11)-(X*NUM)
		GO TO 400
	ELSE
		NUM=NUM-INUM
		IPPP(12)=IPPP(12)-INUM
		IPOP=IPOP-INUM
		CALL RANDU(I1,I2,X)
		SPCE(IXX,IYY,11)=SPCE(IXX,IYY,11)-(2*X*(NUM+INUM))
	ENDIF
	GO TO 4672
 4679	PRINT 4680
 4680	FORMAT(1X,'LANDING PARTY RETURNS REPORTING PLANET IN '
     1		,'FLAMES AND RUINS. NO SIGNS OF ANY LIFE OR SUPPLIES')
	GO TO 400
 4690	PRINT 4691,NUM
 4691	FORMAT(1X,I3,' MEMBERS OF LANDING PARTY RETURNED '
	1	,'WITH THE FOLLOWING SUPPLIES')
 5027	CONTINUE
	IF (NTFOD .EQ. 1) THEN
		IF (SFOOD+FOOD .GT. 40) SFOOD=40-FOOD
	ELSE
		IF (SFOOD+FOOD .GT. 20) SFOOD=20-FOOD
	ENDIF
	IF (NTDMC .EQ. 1) THEN
		IF (SMIN+DICRY .GT. 20) SMIN=20-DICRY
	ELSE
		IF (SMIN+DICRY .GT. 10) SMIN=10-DICRY
	ENDIF
	IF (SFOOD .GT. 0) THEN 
		PRINT 4693,SFOOD
 4693	FORMAT(1X,'FOOD           :',F9.3)
	ENDIF
	IF (SMIN .GT. 0) THEN
		PRINT 4694,SMIN
 4694	FORMAT(1X,'DILITHIUM      :',F9.3)
	ENDIF
	IF (ILNPR .GT. 0) THEN
		PRINT 4696,ILNPR
 4696	FORMAT(1X,'PROBES         :',I2)
	ENDIF
	IF (XENERGY .GT. 0) THEN
		PRINT 4697,XENERGY
	ENDIF
	LNPR=LNPR+ILNPR
	ENERGY=ENERGY+XENERGY
	FOOD=FOOD+SFOOD
	DICRY=DICRY+SMIN
 4697	FORMAT(1X,'MICROWAVE POWER TRANSMISSION  :',F9.4,' UNITS')
	XENERGY=0
	SFOOD=0
	SMIN=0
	ILNPR=0
	GO TO 400
 4700	IF (SPCE(IXX,IYY,11) .LT. 0) GO TO 4679
	IF (NTDES .EQ. 1) THEN
		PRINT 10300
10300	FORMAT(1X,'MEDICAL REPORTS VIRUS IN CHECK !! CURE FOUND')
		NTDES=0
	ENDIF
	ILNPR=30-LNPR
	SMIN=10-MIN
	IF (ITERCNT-SPCE(IXX,IYY,1) .GT. 10) THEN
		XENERGY=SPCE(IXX,IYY,11)*4
	IF (NTPWR .EQ. 1) THEN
		IF (XENERGY+ENERGY .GT. 9999) XENERGY=9999-ENERGY
	ELSE
		IF (XENERGY+ENERGY .GT. 5000) XENERGY=5000-ENERGY
	ENDIF
		SPCE(IXX,IYY,1)=ITERCNT
	ELSE
		PRINT 4720
 4720	FORMAT(1X,'PLANET REPORTS UNABLE TO PROVIDE ENERGY DUE'
     1		,' TO LOW PLANETARY RESERVES')
	ENDIF
	IF (DISTRS .EQ. 1) GO TO 4690
	IATTX=IXX
	IATTY=IYY
	GO TO 4690
 4701	IF (SPCE(IXX,IYY,11) .LT. 0) GO TO 4679
	PRINT 4702
 4702	FORMAT(1X,'TRANSPORTER BEAM NOT ABLE TO PENETRATE'
     1		,' PLANETARY DEFENCE SHIELDS')
	GO TO 400
 4703	CALL RANDU(I1,I2,X)
	SFOOD=20-FOOD
	SMIN=(10-MIN)*X
	GO TO 4690
 4704	CALL RANDU(I1,I2,X)
	PRINT 4705
 4705	FORMAT(1X,'LANDING PARTY REPORTS BAD WEATHER AND ')
	PRINT 4706
 4706	FORMAT(1X,'PLANETARY CONDITIONS HAMPERING MISSION')
	INUM=20*X
	IF (INUM .GT. NUM) INUM=NUM
	NUM=NUM-INUM
	IPPP(12)=IPPP(12)-INUM
	IPOP=IPOP-INUM
	CALL RANDU(I1,I2,X)
	SMIN=NUM*X
	GO TO 4690
10354	GOTO 4679
C
C
C
C
C		**********		END LANDING PARTY
C
C
C
C
C		**********		THE ALIEN DOES HIS THING
C
C
C
C
 4800	DIST=((IX-I)**2+(IY-J)**2)
	IF (SQRT(DIST) .GT. 6) GO TO 405
	MOV=0
	NOMOVE=1
	SPACE(IX,IY)='E'
	DIST=((IX-I)**2+(IY-J)**2)
	CALL RANDU(I1,I2,X)
	DRAIN=X*(SPCE(I,J,11)*100)
	CALL CC(16,1)
	PRINT 4801,DRAIN
 4801	FORMAT('+','**    ENERGY LOSS OF ',F9.4,' UNITS DIRECTED'
     1		,' AT ALIEN VESSEL')
	ENERGY=ENERGY-DRAIN
	GO TO 405
C
C
C
C
C		**********		END ALIEN
C
C
C
C
C
C		**********		BOARD A VESSEL
C
C
C
C
 5000	IF (TRA .LT. 25) GO TO 5020
	CALL CC(16,1)
	PRINT 4661,TRA
	DIS=4*(TRA/100)
	PRINT 4402,DIS
	CALL CC(18,1)
	PRINT 5001
 5001	FORMAT('+','VESSEL AT SECTOR   :',$)
	READ (5,4404,ERR=400)IXX,IYY
	DIST=((IXX-IX)**2+(IYY-IY)**2)
	IF (SQRT(DIST) .GT. DIS) GO TO 3990
 5002	PRINT 4667
	READ(5,4104,ERR=5002),NUM
	IF (NUM .EQ. -1) GO TO 400
	IF (NUM .GT. IPPP(12)) THEN
		PRINT 4695
		GO TO 400
	ENDIF
	IF (SPACE(IXX,IYY) .EQ. 'F') GO TO 5004
	IF (SPACE(IXX,IYY) .EQ. 'R') GO TO 5014
	IF (SPACE(IXX,IYY) .EQ. 'K') GO TO 5014
	IF (SPACE(IXX,IYY) .EQ. 'X') GO TO 5016
	IF (SPACE(IXX,IYY) .EQ. 'E') GO TO 5018
	IF (SPACE(IXX,IYY) .EQ. 'V') GO TO 5014
	IF (SPACE(IXX,IYY) .EQ. '@') GO TO 10240
 	PRINT 5003
 5003	FORMAT(1X,'SORRY... TRY AGAIN')
	GO TO 400
 5004	GOTO(5005,5006,5007,5007,5010,5010,5012)SPCE(IXX,IYY,12)+1
 5005	CALL RANDU(I1,I2,X)
	SFOOD=(X*10)*NUM
	SPCE(IXX,IYY,12)=6
	GO TO 12200
 5006	CALL RANDU(I1,I2,X)
	SMIN=X*NUM
	SPCE(IXX,IYY,12)=6
	GO TO 12200
 5007	PRINT 5008
 5008	FORMAT(1X,'BOARDING PARTY REPORTS RESISTANCE BY '
     1		,'REIGHTER CREW')
	IF (SPCE(IXX,IYY,11) .GE. NUM) THEN
		IPPP(12)=IPPP(12)-NUM
		IPOP=IPOP-NUM
		NUM=0
		SPCE(IXX,IYY,11)=SPCE(IXX,IYY,11)-(NUM*X)
		PRINT 5009
 5009	FORMAT(1X,'ALL CONTACT WITH BOARDING PARTY LOST')
		GO TO 400
	ELSE
		CALL RANDU(I1,I2,X)
		MNUM=X*SPCE(IXX,IYY,11)
		IPPP(12)=IPPP(12)-MNUM
		NUM=NUM-MNUM
	ENDIF
	IF (SPCE(IXX,IYY,12) .EQ. 2) GO TO 5005
	IF (SPCE(IXX,IYY,12) .EQ. 3) GO TO 5006
	IF (SPCE(IXX,IYY,12) .EQ. 4) GO TO 5005
	IF (SPCE(IXX,IYY,12) .EQ. 5) GO TO 5006
 5010	IF (SPCE(IXX,IYY,11) .GT. 50) THEN
		PRINT 5011
 5011	FORMAT(1X,'TRANSPORTER BEAM UNABLE TO PENETRATE '
     1		,'REIGHTER DEFENSE SHIELDS')
		GO TO 400
	ENDIF
	GO TO 5007
 5012	PRINT 5013
 5013	FORMAT(1X,'BOARDING PARTY RETURNS WITH NO SUPPLIES')
	GO TO 400
C
C		**********		MORE CREWMEN
C
12200	CALL RANDU(I1,I2,X)
	IF (X .GT. .5) GOTO 5025
	IF (IPOP .GE. 430) GOTO 5025
	CALL RANDU(I1,I2,X)
	NEW=X*20+1
	IF (IPOP+NEW .GT. 432) NEW=432-IPOP
12203	CALL LNCR(17)
	CALL LNCR(18)
	CALL CC(17,1)
	PRINT 12201,NEW
12201	FORMAT('+',I3,' MEMBERS OF FREIGHTER CREW WISH TO JOIN STARFLEET'
	1	,' AND BECOME')
	PRINT 12202
12202	FORMAT(1X,'PART OF OUR CREW. DO YOU AUTHORIZE (Y/N) :',$)
	READ(5,23,ERR=12203),ANS
	IF (ANS .NE. 'Y') GOTO 12205
	PRINT 12204
12204	FORMAT(1X,'NEW CREW ABOARD ......')
	IPOP=IPOP+NEW
	IPPP(12)=IPPP(12)+NEW
12205	CALL LNCR(17)
	CALL LNCR(18)
	CALL LNCR(19)
	GOTO 5025
C
C		**********	END NEW CREW
C
C
C		*********     BOARD A HOSTILE VESSEL
C

5014	IF (SPCE(IXX,IYY,11) .GT. 30) THEN
		PRINT 12050
12050	FORMAT(1X,'TRANSPORTER UNABLE TO PENETRATE VESSELS DEFENSE'
     1		,' SCREENS')
		GOTO 400
	ENDIF

	CALL RANDU(I1,I2,X)
	IF (X .GT. .7) THEN
		PRINT 12051
12051	FORMAT(1X,'SENSORS SHOW AN ENERGY BUILDUP IN VESSELS ANTI-MATTER'
     1		,' PODS.......')
		IPPP(12)=IPPP(12)-NUM
		IPOP=IPOP-12
		IXX5=IXX
		IYY5=IYY
		GOTO 4114
	ENDIF

	IF (SPCE(IXX,IYY,11) .LT. 5) THEN
		SMIN=0
		SFOOD=0
		XENERGY=0
		GOTO 5025
	ENDIF
	PRINT 12052
12052	FORMAT(1X,'BOARDING PARTY REPORTS RESISTANCE BY VESSELS CREW')
	IF (SPCE(IXX,IYY,11) .GT. NUM) THEN
		IPOP=IPOP-NUM
		IPPP(12)=IPPP(12)-NUM
		SPCE(IXX,IYY,11)=SPCE(IXX,IYY,11)-NUM
		NUM=0
		PRINT 5009
		GOTO 400
	ENDIF

	IPOP=IPOP-SPCE(IXX,IYY,11)
	IPPP(12)=IPPP(12)-SPCE(IXX,IYY,11)
	NUM=NUM-SPCE(IXX,IYY,11)
	CALL RANDU(I1,I2,X)
	SMIN=2*X
	IF (SMIN .GT. MIN) SMIN=10-MIN
	XENERGY=SPCE(IXX,IYY,11)*10
	SPCE(IXX,IYY,11)=0
	GOTO 5025
C
C		**********	END HOSTILE BOARD
C
 5016	PRINT 5017
 5017	FORMAT(1X,'   HA HA   YOU''RE TO FUNNY')
	GO TO 400
 5018	PRINT 5019
 5019	FORMAT(1X,'CAN''T BOARD YOURSELF STUPID !!')
	GO TO 400
 5020	PRINT 5021
 5021	FORMAT(5X,'** TRANSPORTER NONOPERATIONAL **')
	GO TO 400
 5025	PRINT 5026,NUM
 5026	FORMAT(1X,I4,' MEMBERS OF BOÁRDING PARTY RETURN WITH'
     1		,' THE FOLLOWING SUPPLIES')
	GO TO 5027
10240	GO TO (10241,10243,10245,10249,10251,10253)SPCE(IXX,IYY,12)+1
	GO TO (10255,10257,10259,10261)SPCE(IXX,IYY,12)-5



10241	PRINT 11026
11026	FORMAT(1X,' SENSORS SHOW AN ENERGY BUILDUP !!!  IT APPEARS'
     1		,' THE VESSEL IS ABOUT TO BLOW ......')
	DEREXP=1
	IXX5=IXX
	IYY5=IYY
	GOTO 4114


10243	PRINT 10244
10244	FORMAT(1X,'BOARDING PARTY RETURNS REPORTING THEY FOUND NO'
     1		,'THING OF INTEREST ABOARD THE SHIP.')
	GOTO 400


10245	PRINT 10246
10246	FORMAT(1X,'BOARING PARTY RETURNS REPORTING THEY HAVE FOUND'
     1		,' SOME NEW TECHNOLOGY ABOARD THE')
	PRINT 10247
10247	FORMAT(1X,'VESSEL. ENGINEERING REPORTS IT IS ABLE TO IMPLE'
     1		,'MENT THE TECHNOLOGY AND THAT WE')
	PRINT 10248
10248	FORMAT(1X,'NOW HAVE PROBES THAT ARE MANUVERABLE WHILE IN'
     1		,' FLIGHT')
	NTPRB=1
	GOTO 10265


10249	PRINT 10246
	PRINT 10247
	PRINT 10250
10250	FORMAT(1X,'HAVE BEEN ABLE TO DOUBLE OUR CAPACITY FOR ENERGY'
     1		,'STORAGE (9999 UNITS)')
	NTPWR=1
	GOTO 10265



10251	PRINT 10246
	PRINT 10247
	PRINT 10252
10252	FORMAT(1X,'HAVE BEEN ABLE TO DOUBLE OUR CAPACITY FOR FOOD'
     1		,' STORAGE, UP TO 40')
	NTFOD=1
	GOTO 10265



10253	PRINT 10246
	PRINT 10247
	PRINT 10254
10254	FORMAT(1X,'HAVE BEEN ABLE TO DOUBLE OUR CAPACITY FOR DILITHI',
     1		'UM STORAGE, UP TO 20')
	NTDMC=1
	GOTO 10265



10255	PRINT 10246
	PRINT 10247
	PRINT 10256
10256	FORMAT(1X,'HAVE BEEN ABLE TO INCREASE THE RANGE OF OUR WARP'
     1		,' DRIVE TO 75 SECTORS')
	NTBWD=1
	GOTO 10265



10257	PRINT 10246
	PRINT 10247
	PRINT 10258
10258	FORMAT(1X,'HAVE BEEN ABLE TO INCREASE THE RANGE OF OUR PROBES'
     1		,' TO 25 SECTORS')
	NTLPR=1
	GOTO 10265



10259	PRINT 10246
	PRINT 10247
	PRINT 10260
10260	FORMAT(1X,'HAVE BEEN ABLE TO GIVE OUR WARP DRIVE PINPOINT'
     1		,' ACCURACY')
	NTAWD=1
	GOTO 10265



10261	PRINT 10244
	PRINT 10262
10262	FORMAT(1X,'MEDICAL REPORTS PARTY HAS CONTRACTED A DEADLY VIRU',
     1		'S WHICH HAS SURVIVED OUR')
	PRINT 10263
10263	FORMAT(1X,'STERILIZATION PROCEDURES AND IS NOW SPREADING THRO',
     1		'UGHT THE SHIP. WE MUST GET')
	PRINT 10264
10264	FORMAT(1X,'TO A PLANET WITH HIGH CIVILIZATION FOR WE HAVE NOT',
     1		' THE FACILITIES TO STOP IT')
	NTDES=1
	GOTO 485


10265	PRINT 10266
10266	FORMAT(1X,'IF THIS SHIP IS DESTROYED THE TECHNOLOGY IS LOST')
	GOTO 400
C
C
C
C
C			**********		END BOARDING PARTY
C
C
C
CC
C		**********		AND IF YOU HIT A STARGATE ??
C
C
C
C
 5130	IF (CCRS .NE. 0. .AND. COMM .NE. 'R') GO TO 5129
	IXX=SPCE(IX,IY,11)
	IYY=SPCE(IX,IY,12)+1
	IX=IXX
	IY=IYY
	MOV=0
	SPACE(IX,IY)='E'
	GO TO 5132
C
C
C
C
C
 5131	IF (CCRS .NE. 180. .AND. COMM .NE. 'L') GO TO 5129
	IXX=SPCE(IX,IY,11)
	IYY=SPCE(IX,IY,12)-1
	IX=IXX
	IY=IYY
	MOV=0
	SPACE(IX,IY)='E'
 5132	CALL RANDU(I1,I2,X)
	IF (X .LT. .7) GO TO 400
	CALL RANDU(I1,I2,X)
 5134	DO 5133	I=IX-7,IX+7
		DO 5133 J=IY-7,IY+7
			CALL RANDU(I1,I2,X)
	IF (SPACE(I,J) .EQ. 0 .AND. X .GT. .97) THEN
		SPACE(I,J)='K'
		SPCE(I,J,11)=300
	ENDIF
 5133	CONTINUE
	GO TO 400
C
C
C
C
C
C		**********		END STARGATE
C
C
C
C
C
C		**********		THE VESARUS FIRES
C
C
C
C
C
 5200	IF (SPCE(I,J,1) .EQ. 1) THEN
			SPCE(I,J,1)=0
			GO TO 405
		ENDIF
	DIS=((IX-I)**2+(IY-J)**2)
		IF (SQRT(DIS) .LT. 3.5) SPCE(I,J,12)=1
	IF (SPCE(I,J,12) .EQ. 0) THEN
		CALL RANDU(I1,I2,X)
		IF (X .GT. .4) GO TO 405
		CALL LNCR(20)
		CALL CC(20,1)
		PRINT 5201,I,J
 5201	FORMAT('+','VESARUS WARCRUSIER AT SECTOR <',I3,',',I3,'>'
     1		,' CHALLENGEING US TO DO BATTLE')
		GO TO 405
	ELSE
		IYY=J
		IXX=I
		CALL RANDU(I1,I2,X)
		DIS=((IYY-IY)**2+(IXX-IX)**2)
		IF (SQRT(DIS) .LT. 2) X=.1
		IF (X .GT. .5) THEN
			IF (IY .GT. IYY) THEN
				IYY=IYY+1
			ELSE
				IYY=IYY-1
			ENDIF
			IF (IX .GT. IXX) THEN
				IXX=IXX+1
			ELSE
				IXX=IXX-1
			ENDIF
			SPACE(IXX,IYY)='V'
			SPCE(IXX,IYY,12)=SPCE(I,J,12)
			SPCE(IXX,IYY,11)=SPCE(I,J,11)
			SPACE(I,J)=0
			SPCE(I,J,12)=0
			SPCE(I,J,11)=0
			SPCE(IXX,IYY,1)=1
		ENDIF
		DIS=((IX-IXX)**2+(IY-IYY)**2)
		IF (SQRT(DIS) .GT. 10) GO TO 405
		CALL RANDU(I1,I2,X)
		IF (X .GT. .6) GO TO 405
		HIT=(SPCE(IXX,IYY,11)/SQRT(DIS))/9
		IF (HIT .GT. 25) HIT=25
		CALL LNCR(20)
		CALL CC(20,1)
		PRINT 5202,HIT,IXX,IYY
 5202	FORMAT('+'3X,'**',F9.4,' UNIT HIT FROM VESARUS WARCRUSIER'
     1		,'AT SECTOR <',I3,',',I3,'>')
		SHLDS=SHLDS-HIT
		GO TO 2110
	ENDIF
C
C
C
C
C
C		**********		END VESARUS FIRE
C
C		**********	PLACE DRIDEN SPACEFIGHTERS
C				ONLY WHEN ENTERPRISE APPROACHES HOT SPOT
C
C
10350	SPCE(I,J,1)=0
	DO 10351 II1=IX-10,IX+10
	DO 10351 JJ1=IY-10,IY+10
		SPCE(II1,JJ1,5)=20
		DUM=((II1-IX)**2+(JJ1-IY)**2)
		IF (SQRT(DUM) .GT. 10 .OR. SQRT(DUM) .LT. 8) GOTO 10351
		CALL RANDU(I1,I2,X)
		IF (X .LT. .8) GOTO 10351
		IF (SPACE(II1,JJ1) .NE. 0) GOTO 10351
		SPACE(II1,JJ1)='D'
		SPCE(II1,JJ1,11)=100
10351	CONTINUE
	GOTO 405

C
C
C		**********	END PLACE DRIDEN
C
C
C
C
C
C		**********		CLEAR THE SCREEN
C
C
C
5505	PRINT 5506
5506	FORMAT(1X,/////////////////////////////)
	GO TO 502
C
C
C
C
C		*********		END CLEAR SCREEN
C
C
C
C
C		**********		ENEMY VESSELS MOVEMENT
C
C
C
C
 1500	IF (SPCE(I,J,12) .NE. 1) THEN
		GO TO 1510
	ELSE
		SPCE(I,J,12)=0
		GO TO 405
	END IF
C
C
 1510	DUM=((IX-I)**2+(IY-J)**2)
	IF (SQRT(DUM) .LT. 6) GO TO 1520
C
C
	I5=I
	J5=J
 1530	J6=J5
	I6=I5
	DUM=((IX-I6)**2+(IY-J6)**2)
	IF (SQRT(DUM) .LT. 6) GO TO 405
 1540	CALL RANDU(I1,I2,X)
	IF (X .GT. .4) GO TO 1550
	IF (IX .GT. I5) I5=I5+1
	IF (IX .LT. I5) I5=I5-1
 1550	CALL RANDU(I1,I2,X)
	IF (X .GT. .5) GO TO 1555
	IF (IY .GT. J5) J5=J5+1
	IF (IY .LT. J5) J5=J5-1
 1555	CALL RANDU(I1,I2,X)
	IDUM=(X*3)+1
	CALL RANDU(I1,I2,X)
	IF (I5 .EQ. IX) THEN
		IF (X .GT. .5) THEN 
			I5=I5+IDUM
		ELSE
			I5=I5-IDUM
		ENDIF
	ENDIF
C
	IF (J5 .EQ. IY) THEN
		IF (X .GT. .5) THEN
			J5=J5+IDUM
		ELSE
			J5=J5-IDUM
		ENDIF
	ENDIF
C
	IF (I5 .LT. 1 .OR. I5 .GT. 250) GO TO 1540
	IF (J5 .LT. 1 .OR. J5 .GT. 250) GO TO 1540
C
	IF (SPACE(I5,J5) .NE. 0) THEN
		GO TO 1540
	ELSE
		SPACE(I5,J5)=SPACE(I,J)
		SPACE(I,J)=0
		SPCE(I5,J5,11)=SPCE(I,J,11)
		SPCE(I,J,11)=0
		SPCE(I5,J5,12)=1
	ENDIF
C
	CALL RANDU(I1,I2,X)
	IF (X .GT. .5) GO TO 1530
	GO TO 405
C
C
C			MOVE IN IF CLOSE
C
C
 1520	I5=I
	J5=J
	IF (SPCE(I,J,11) .LT. 100) GO TO 1560
 1570 CALL RANDU(I1,I2,X)
	IF (X .GT. .5) THEN
		CALL RANDU(I1,I2,X)
		IF (X .GT. .5) THEN
			I5=I5+1
		ELSE
			I5=I5-1
		ENDIF
	ENDIF
C
	CALL RANDU(I1,I2,X)
	IF (X .GT. .5) THEN
		CALL RANDU(I1,I2,X)
		IF (X .GT. .5) THEN
			J5=J5-1
		ELSE
			J5=J5+1
		ENDIF
	ENDIF
C
	IF (I5 .GT. 250) I5=250
	IF (I5 .LT. 1) I5=1
	IF (J5 .LT. 1) J5=1
	IF (J5 .GT. 250) J5=250
	IF (SPACE(I,J) .EQ. 'D') GOTO 10500
	IF (SPACE(I,J) .EQ. '&') GOTO 12102
	CALL RANDU(I1,I2,X)
	IF (X .GT. .5) GO TO 1570
C
	IF (SPACE(I5,J5) .NE. 0) GO TO 1570
	SPACE(I5,J5)=SPACE(I,J)
	SPACE(I,J)=0
	SPCE(I5,J5,11)=SPCE(I,J,11)
	SPCE(I,J,11)=0
	SPCE(I5,J5,12)=1
C
C
C
C		**********		ENEMY VESSEL FIRE CONTROLL
C
C
C
 1560	IF (SPACE(I,J) .EQ. 'D') GOTO 10500
	IF (SPACE(I,J) .EQ. '&') GOTO 12102
	XYZZY=1
	GO TO 1000
 5203	CALL RANDU(I1,I2,X)
	IF (SPCE(I5,J5,11) .LT. 75) GO TO 405
	IF (X .GT. .8) GO TO 405
	DUM=((IX-I5)**2+(IY-J5)**2)
	DUM=SQRT(DUM)
	HIT=(SPCE(I5,J5,11)/DUM)/12
	IF (SPACE(I5,J5) .EQ. 'K') THEN
		CALL LNCR(21)
		CALL CC(21,1)
		PRINT 1562,HIT,I5,J5
	ELSE
		CALL LNCR(21)
		CALL CC(21,1)
		PRINT 1564,HIT,I5,J5
	ENDIF
 1562	FORMAT('+',3X,'** ',F8.4,' UNIT HIT FROM KLINGON AT SECTOR <'
     1		,I3,',',I3,'>')
 1564	FORMAT('+',3X,'** ',F8.4,' UNIT HIT FROM ROMULAN AT SECTOR <'
     1		,I3,',',I3,'>')
	SHLDS=SHLDS-HIT
	IF (SHLDS .LT. 60) GO TO 2110
	GO TO 405
C
C
C		*********		END ENEMY VESSEL FIRING
C
C
C
C		*********		THE PLANET FIRES !!
C
C
C
2100	QERT=SPACE(I,J)
	QERT1=SPCE(I,J,11)
	QERT2=SPCE(I,J,12)
	SHLDS11=SHLDS
	CALL PLNT(SHLDS,IX,IY,I,J,QERT,QERT1,I1,I2,QERT2)
	IF (SHLDS .NE. SHLDS11 .AND. SHLDS .LT. 60) GOTO 2110
	GOTO 405
C
C
C		**********	END PLANET FIRE
C
C

C		**********		DRIDEN FIRE CONTROL
C
C
C
C
10500	IF (SPACE(I5,J5) .NE. 0) GOTO 1570
	SPACE(I5,J5)=SPACE(I,J)
	SPCE(I5,J5,11)=SPCE(I,J,11)
	SPCE(I5,J5,12)=1
	SPACE(I,J)=0
	SPCE(I,J,11)=0
10301	CALL RANDU(I1,I2,X)
	IF (X .LT. .10) GOTO 405
	CALL RANDU(I1,I2,X)
	IF (X .GT. .5) THEN
		IF (IX .GT. I5) THEN
			IF (SPACE(I5+1,J5) .NE. 0) GOTO 405
			SPACE(I5+1,J5)='='
			SPCE(I5+1,J5,12)=270
			SPCE(I5+1,J5,11)=7
		ELSE
			IF (SPACE(I5-1,J5) .NE. 0) GOTO 405
			SPACE(I5-1,J5)='='
			SPCE(I5-1,J5,11)=7
			SPCE(I5-1,J5,12)=90
		ENDIF
	ELSE
		IF (IY .GT. J5) THEN
			IF (SPACE(I5,J5+1) .NE. 0) GOTO 405
			SPACE(I5,J5+1)='='
			SPCE(I5,J5+1,11)=0
			SPCE(I5,J5+1,12)=0
		ELSE
			IF (SPACE(I5,J5-1) .NE. 0) GOTO 405
			SPACE(I5,J5-1)='='
			SPCE(I5,J5-1,11)=0
			SPCE(I5,J5-1,12)=180
		ENDIF
	ENDIF
	GOTO 405
C
C
C
C	**********	DRIDEN MISSILE TRACKER
C
C
C

10450	IF (SPCE(I,J,2) .EQ. 1) THEN
		SPCE(I,J,2)=0
		GOTO 405
	ELSE
		IF (SPCE(I,J,12) .EQ. 0) THEN
			I5=I
			J5=J+1
			GOTO 10451
		ENDIF
		IF (SPCE(I,J,12) .EQ. 90) THEN
			I5=I-1
			J5=J
			GOTO 10451
		ENDIF
		IF (SPCE(I,J,12) .EQ. 180) THEN
			I5=I
			J5=J-1
			GOTO 10451
		ENDIF
		IF (SPCE(I,J,12) .EQ. 270) THEN
			I5=I+1
			J5=J
			GOTO 10451
		ENDIF
	ENDIF
10451	SPACE(I,J)=0
	IF (SPACE(I5,J5) .EQ. 0) THEN
		SPACE(I,J)=0
		SPACE(I5,J5)='='
		SPCE(I5,J5,2)=1
		SPCE(I5,J5,12)=SPCE(I,J,12)
		SPCE(I5,J5,11)=SPCE(I,J,11)
		SPCE(I,J,12)=0
		SPCE(I,J,11)=0
		IF (SPCE(I5,J5,11) .EQ. -1) THEN
10453			SPACE(I5,J5)=0
			SPCE(I5,J5,12)=0
			SPCE(I5,J5,11)=0
		ENDIF
	ELSE
		IF (SPACE(I5,J5) .EQ. 'E') THEN
			CALL CC(16,1)
			PRINT 10452
10452	FORMAT('+','  *** A MISSILE HIT ON US ')
			SPACE(I,J)=0
			SPCE(I,J,11)=0
			SPCE(I,J,12)=0
			HIT=25
			GOTO 2110
		ENDIF
	ENDIF
	GOTO 405
C
C
C		**********		END DRIDEN FIRING
C
C
C		**********		CURIDIAN FIRE CONTROL
C
C
C
C
12102	IF (SPACE(I5,J5) .NE. 0) GOTO 1570
	SPACE(I5,J5)=SPACE(I,J)
	SPCE(I5,J5,11)=SPCE(I,J,11)
	SPCE(I5,J5,12)=1
	SPACE(I,J)=0
	SPCE(I,J,11)=0
	NARNEU=1
	CALL RANDU(I1,I2,X)
	IF (X .GT. .8) GOTO 405
	CALL RANDU(I1,I2,X)
	HIT=X*7
	CALL CC(21,1)
	PRINT 12103,HIT,I5,J5
12103	FORMAT('+','*** ',F5.3,' UNIT HIT FROM CURIDIAN FLAGSHIP AT'
	1	,' SECTOR <',I3,',',I3,'>')
	SHLDS=SHLDS-HIT
	IF (SHLDS .LT. 60) GOTO 2110
	GOTO 405
C
C
C
C		**********		END CURIDIAN FIRE CONTROLL
C
C
C		**********		ENTERPRISE IS DAMAGED
C
C
 2110	IF (SHLDS .LT. 0) GO TO 9500
	IRASE=16
	IDAM=1
	GO TO 5408
 5453	DO 5450 IRS=1,33
		CALL CC(7,15)
		PRINT 5451,EXPLO(IRS)
 5451	FORMAT('+',A1)
 5450	CONTINUE
	CALL CC(1,42)
	PRINT 2111
 2111	FORMAT('+','*****   DAMAGE REPORTS COMING IN :')
	CALL RANDU(I1,I2,X)
	IF (X .GT. .5) GO TO 2113
	PHA=PHA-((HIT*((1/SHLDS)*100))+(X*5))
	IF (PHA .LT. 0) PHA=0
	CALL CC(2,43)
	PRINT 2112,PHA
 2112	FORMAT('+','PHASER BANKS        :',F8.4,' %')
 2113	CALL RANDU(I1,I2,X)
	IF (X .GT. .5) GO TO 2115
 	TOR=TOR-((HIT*((1/SHLDS)*100))+(X*5))
	IF (TOR .LT. 0) TOR=0
	CALL CC(3,43)
	PRINT 2114,TOR
 2114	FORMAT('+','TORPEDO TUBES       :',F8.4,' %')
 2115	CALL RANDU(I1,I2,X)
	IF (X .GT. .5) GO TO 2117
	SRS=SRS-((HIT*((1/SHLDS)*100))+(X*5))
	IF (SRS .LT. 0) SRS=0
	CALL CC(4,43)
	PRINT 2116,SRS
 2116	FORMAT('+','SHORT RANGE SENSORS :',F8.4,' %')
 2117	CALL RANDU(I1,I2,X)
	IF (X .GT. .5) GO TO 2119
	XLRS=XLRS-((HIT*((1/SHLDS)*100))+(X*5))
	IF (XLRS .LT. 0) XLRS=0
	CALL CC(5,43)
	PRINT 2118,XLRS
 2118	FORMAT('+','LONG RANGE SENSORS  :',F8.4,' ¥')
 2119	CALL RANDU(I1,I2,X)
	IF (X .GT. .5) GO TO 2121
	XIMP=XIMP-((HIT*((1/SHLDS)*100))+(X*5))
	IF (XIMP .LT. 0) XIMP=0
	CALL CC(6,43)
	PRINT 2120,XIMP
 2120	FORMAT('+','IMPULSE DRIVE       :',F8.4,' %')
 2121	CALL RANDU(I1,I2,X)
	IF (X .GT. .5) GO TO 2123
	WRP=WRP-((HIT*((1/SHLDS)*150))+(X*15))
	IF (WRP .LT. 0) WRP=0
	CALL CC(7,43)
	PRINT 2122,WRP
 2122	FORMAT('+','WARP DRIVE          :',F8.4,' %')
 2123	CALL RANDU(I1,I2,X)
	IF (X .GT. .5) GO TO 2125
	COM=COM-((HIT*((1/SHLDS)*35))+(X*5))
	IF (COM .LT. 0) COM=0
	CALL CC(8,43)
	PRINT 2124,COM
 2124	FORMAT('+','COMPUTER BANKS      :',F8.4,' %')
 2125	CALL RANDU(I1,I2,X)
	IF (X .GT. .5) GO TO 2127
	TRA=TRA-((HIT*((1/SHLDS)*100))+(X*5))
	IF (TRA .LT. 0) TRA=0
	CALL CC(9,43)
	PRINT 2126,TRA
 2126	FORMAT('+','TRANSPORTER         :',F8.4,' %')
 2127	CALL RANDU(I1,I2,X)
	IF (X .GT. .5) GO TO 2129
	PRB=PRB-((HIT*((1/SHLDS)*100))+(X*5))
	IF (PRB .LT. 0) PRB=0
	CALL CC(10,43)
	PRINT 2128,PRB
 2128	FORMAT('+','PROBE LAUNCHER      :',F8.4,' %')
 2129	CALL RANDU(I1,I2,X)
	IF (X .GT. .5) GO TO 2131
	GEN=GEN-((HIT*((1/SHLDS)*100))+(X*5))
	IF (GEN .LT. 0) GEN=0
	CALL CC(11,43)
	PRINT 2130,GEN
 2130	FORMAT('+','GENERATORS          :',F8.4,' %')
 2131	CALL RANDU(I1,I2,X)
	IF (X .GT. .5) GO TO 2133
	ENERGY=ENERGY-((HIT/(SHLDS/100))+100)
	CALL CC(12,43)
	PRINT 2132,((HIT/(SHLDS/100))+100)
 2132	FORMAT('+','ENERGY LOSS         :',F8.4,' UNITS')
 2133	CALL RANDU(I1,I2,X)
	IF (X .GT. .5) GO TO 2135
	DICRY=DICRY-(X*4)
	IF (DICRY .LT. 0) DICRY=0
	CALL CC(13,43)
	PRINT 2134,DICRY
 2134	FORMAT('+','DILITHIUM CRYSTALS  :',F8.4)
 2135	CALL RANDU(I1,I2,X)
	IF (X .GT. .5) GO TO 2138
	IDIE=HIT/(SHLDS/150)
	IF (IDIE .GE. IPOP-10) GOTO 9500

	IPOP=IPOP-IDIE
	CALL CC(14,43)
 	PRINT 2136,IDIE
 2136	FORMAT('+','CASUALTIES          :',I3)
	DO 2137 I6=1,IDIE
 2139		CALL RANDU(I1,I2,X)
		IR=(X*12)+1
		IF (IPPP(IR) .EQ. 0) GO TO 2139
		IPPP(IR)=IPPP(IR)-1
		IF (IR .EQ. 9) THEN
2142			CALL RANDU(I1,I2,X)
			IRR=(X*12)+1
			IF (IRP(IRR) .LE. 0) GOTO 2142
			IRP(IRR)=IRP(IRR)-1
		ENDIF
 2137	CONTINUE
	IF (DESR .EQ. 1) GOTO 10267
2138	CALL RANDU(I1,I2,X)
	IF (X .GT. .5) GOTO 2140
	DAM=DAM-((HIT*(1/SHLDS)*100))+(X*5)
	IF (DAM .LT. 0) DAM=0
	CALL CC(15,43)
	PRINT 2141,DAM
2141	FORMAT('+','DAMAGE CONTROL     :',F8.4)
2140	GOTO 405
 2150	GO TO 405
C
C
C
C
C
C		**********	ITS THE BLACK HOLE !!!
C
C
C
C
C
 2200	DUM=((I-IX)**2+(J-IY)**2)
	DIST=SQRT(DUM)
	PLSFACT=1500/DIST
	IXX=IX
	IYY=IY
	IF (I .GT. IX) IXX=IXX+1
	IF (I .LT. IX) IXX=IXX-1
	IF (J .GT. IY) IYY=IYY+1
	IF (J .LT. IY) IYY=IYY-1
	IF (SPACE(IXX,IYY) .NE. 0) GO TO 4405
	CALL LNCR(15)
	CALL CC(15,1)
	PRINT 2201
 2201	FORMAT('+','** SENSORS DETECT A HIGH GRAVITATIONAL FIELD **')
	IF (MOV .GT. 0) GO TO 405
	SPACE(IXX,IYY)='E'
	SPACE(IX,IY)=0
	IX=IXX
	IY=IYY
	GO TO 405
C
C
C
C
C		**********	END BLACK HOLE.
C
C
C
C
C
C
C
C		**********		REIGHTER MOVEMENT
C
C
C
 2300	DIST=((IX-I)**2+(IY-J)**2)
	IF (SQRT(DIST) .GT. 7) GO TO 405
	CALL RANDU(I1,I2,X)
	IF (X .LT. .7) GO TO 405
	IXX=I
	IYY=J
	IF (IXX .GT. IX) IXX=IXX+1
	IF (IXX .LT. IX) IXX=IXX-1
	IF (IYY .GT. IY) IYY=IYY+1
	IF (IYY .LT. IY) IYY=IYY-1
	IF (SPACE(IXX,IYY) .NE. 0) GO TO 405
	SPACE(I,J)=0
	SPACE(IXX,IYY)='F'
	SPCE(IXX,IYY,11)=SPCE(I,J,11)
	SPCE(IXX,IYY,12)=SPCE(I,J,12)
	SPCE(I,J,11)=0
	SPCE(I,J,12)=0
C
C
C
C
C
C		**********	REIGHTER FIRES !!
C
C
C
C	IF (SPCE(IXX,IYY,12) .LT. 4) GO TO 405
C	CALL RANDU(I1,I2,X)
C	IF (X .LT. .85) GO TO 405
C	UNITS=SPCE(IXX,IYY,11)/(SQRT(DIST)*10)
C	SHLDS=SHLDS-UNITS
C	CALL LNCR(16)
C	CALL CC(16,1)
C	PRINT 2301,UNITS,IXX,IYY
C 2301	FORMAT('+',5X,'** ',F8.4,' UNIT HIT FROM FREIGHTER AT '
C     1		,'<',I3,',',I3,'>')
	GO TO 405
C
C
C
C		**********	END FREIGHTER FIRE
C
C
C
C		**********		THE RED'S IN TROUBLE
C
C
 2400	DUM=((IX-INOVX)**2+(IY-INOVY)**2)
	IF (SQRT(DUM) .LT. 10) THEN
		CALL LNCR(21)
		CALL CC(21,1)
		PRINT 2401
 2401	FORMAT('+',/,10X,'>>>>>     WARNING     <<<<<')
		CALL LNCR(22)
		CALL CC(22,1)
		PRINT 2402,INOVX,INOVY
 2402	FORMAT('+',10X,'SENSORS DETECT INCREASED SOLAR ACTIVITY',
     1		'FROM STAR AT <',I3,',',I3,'>')
	INOVA=INOVA-1
	CALL RANDU(I1,I2,X)
	IF (INOVA .EQ. 0 .AND. X .GT. .3) GOTO 2405
	CALL RANDU(I1,I2,X)
	IF (X .LT. .7) GO TO 485
	CALL LNCR(19)
	CALL CC(20,1)
	PRINT 2403
 2403	FORMAT('+',10X,'*****>>>>     !ALERT!  .. SOLAR FLARE ..')
	HIT=25.00
	GO TO 2110
	ENDIF
2405	CALL CC(18,1)
	PRINT 10282,INOVX,INOVY
10282	FORMAT('+','!!!!!  STAR AT SECTOR <',I3,',',I3,'> HAS SUPER'
     1		,' NOVAED  !!!!!')
	CALL RANDU(I1,I2,X)
	IKLR=(X*20)+5
	IF (DUM .LT. IKLR/3) GOTO 9500
	HIT=400/DUM
	DO 10283 I=INOVX-IKLR,INOVX+IKLR
	DO 10283 J=INOVY-IKLR,INOVY+IKLR
		IF (I .LT. 1 .OR. I .GT. 250) GOTO 10283
		IF (J .LT. 1 .OR. J .GT. 250) GOTO 10283
		DUM=((I-INOVX)**2+(J-INOVY)**2)
		IF (SQRT(DUM) .LT. IKLR/3) THEN
			SPACE(I,J)='^'
			SPCE(I,J,1)=5
		ELSE
		IF (SPACE(I,J) .NE. 'E' .OR. SPACE(I,J) .NE. 'B') THEN
				IF (SPACE(I,J) .NE. 0) THEN
				DUMM=((IX-I)**2+(IY-J)**2)
				IF (SQRT(DUMM) .LT. 6) THEN
					INV=1
					IXX5=I
					IYY5=J
					GOTO 4114
				ELSE
					SPACE(I,J)=0
					SPCE(I,J,12)=0
					SPCE(I,J,11)=0
				ENDIF
				ENDIF
			ENDIF
		ENDIF
10283	CONTINUE
	IF (HIT .GT. 1) GOTO 2110
	GOTO 485
C
C
C
C
C		***********		QIT GAME
C
C
C
C
 9400	DUM=((IHOMX-IX)**2+(1-IY)**2)
	IF (SQRT(DUM) .LT. 3) GO TO 9600
	CALL CC(16,1)
	PRINT 9401
 9401	FORMAT('+',10X,'YOU CAN''T QUIT IN THE MIDDLE OF NOWHERE !!')
	PRINT 9402
 9402	FORMAT(10X,'GOTTA GO BACK TO THE STARBASE "B" FIRST !!')
	GO TO 485
C
C
C
C
C
C		***********	YOU ARE DESTROYED
C
C
C
C
 9500	IDES=1
	CALL CC(23,1)
 9600	REWIND 2
	OPEN(UNIT=22,NAME='UNISTA.DAT',TYPE='OLD',RECORDSIZE=17,
     1		ASSOCIATEVARIABLE=IVAR,ACCESS='DIRECT',SHARED)
 9601	DO 9602 I=1,200
		READ(22'I)IA
		IF (USR .EQ. USR1) GO TO 9603
 9602	CONTINUE
 9603	IDESRM=IDESRM+IRMDES
	TI=SECNDS(T)
	TIME=TIME+((TI/60)/60)
	IDESKL=IDESKL+IKLDES
	MBR=MBR+NWMBR
	LOST=LOST+ILOST
	IDST=IDST+IDES
	NMPL=NMPL+1
	IF (IDES .EQ. 1) THEN
	NTPRB=0
	NTPWR=0
	NTFOD=0
	NTDMC=0
	NTBWD=0
	NTLPR=0
	NTAWD=0
	ENDIF
	ISCRE=(IDESKL*10)+(IDESRM*5)+(MBR)+(LOST*50)-(IDST*100)
	IF (ISCRE .LT. 0) RANK='DUMMY'
	IF (ISCRE .GT. 0) RANK='ENLIS'
	IF (ISCRE .GT. 150) RANK='PRIV'
	IF (ISCRE .GT. 300) RANK='YEOMN'
	IF (ISCRE .GT. 450) RANK='ENSIN'
	IF (ISCRE .GT. 600) RANK='LT.'
	IF (ISCRE .GT. 900) RANK='LT CM'
	IF (ISCRE .GT. 1200) RANK='COMM'
	IF (ISCRE .GT. 1700) RANK='CAPT'
	IF (ISCRE .GT. 2400) RANK='FLCOM'
	IF (ISCRE .GT. 2800) RANK='FLCAP'
	IF (ISCRE .GT. 3400) RANK='* ADM'
	IF (ISCRE .GT. 3900) RANK='** AD'
	IF (ISCRE .GT. 4600) RANK='*** A'
	IF (ISCRE .GT. 5300) RANK='****A'
	IF (ISCRE .GT. 6300) RANK='FD CM'
	IF (ISCRE .GT. 7300) RANK='FDCPT'
	IF (ISCRE .GT. 8500) RANK='FDADM'
	IF (ISCRE .GT. 9800) RANK='FSCMD'
	IF (ISCRE .GT. 13300) RANK='FPRES'
	IF (ISCRE .GT. 20000) RANK='GOD'
	WRITE(22'I)IA
 9606	PRINT 9605
	IF (COMM .EQ. 'SCR') CALL CC(16,1)
 9605	FORMAT('+','YOUR STATISTICS FOR THIS GAME  :')
	PRINT 44
	PRINT 45
	PRINT 46
	IF (COMM .EQ. 'SCR') TI=SECNDS(T)
	ISCRE=(IKLDES*10)+(IRMDES*5)-(IDES*100)+(NWMBR)+(ILOST*50)
	NN=1
	PRINT 48,RANK,USR,SHPSNM,IRMDES,IKLDES,ILOST,NWMBR
     1		,IDES,NN,(TI/60)/60,ISCRE
	IF (COMM .EQ. 'SCR') GO TO 502
	CALL STAMP(USR)
 9862	DO 9860	I=1,199
		READ(22'I)IA
		READ(22'I+1)IAB
		IF (RNK .EQ. ' ') GO TO  9863
		IF (ISCRE .LT. I53) THEN
			WRITE (22'I)IAB
			WRITE (22'I+1)IA
			AGA=1
		ENDIF
 9860	CONTINUE
 9863	IF (AGA .EQ. 1) THEN
		AGA=0
		GO TO 9862
	ENDIF
	CLOSE(UNIT=22)
	STOP
C
C
C
C
C
C		**********	INSERT NEW MEMBER
C
C
C
9700	CALL ENTER
 9713	PRINT 9703
 9703	FORMAT(1X,'WHAT DO YOU WISH TO NAME YOUR SHIP (10'
     1	,' CHRS MAX)  :',$)
	ACCEPT 9704,SHPSNM
 9704	FORMAT(A10)
	IF (SHPSNM .EQ. ' ') GO TO 9713
	SHP=SHPSNM
	USR1=USR
 9714	PRINT 9705
 9705	FORMAT(1X,'WHAT PASSWORD WOULD YOU LIKE (8  MAX)',
     1  	':',$)
	ACCEPT 9706,PASS
 9706	FORMAT(A8)
	IF (PASS .EQ. ' ') GO TO 9714
 9709	DO 9710 I=1,200
	READ(22'I)IA
	IF (RANK .EQ. ' ') GO TO 9711
 9710	CONTINUE
 9711	RANK='ENLIS'
	USR=USR1
	SHPSNM=SHP
	IDESRM=0
	IDESKL=0
	MBR=0
	LOST=0
	IDST=0
	NMPL=0
	ISCRE=0
	NTPRB=0
	NTPWR=0
	NTFOD=0
	NTDMC=0
	NTBWD=0
	NTLPR=0
	NTAWD=0
	WRITE(22'I)IA
	DO 10100 II=1,200
		READ(4'II)IPS
		IF (USR1 .EQ. ' ') GOTO 9707
10100	CONTINUE
9707	USR1=USR
	PASS1=PASS
	WRITE(4'II)IPS
	GOTO 68
C
C
C
C
C	******	QUIT THE GAME PERMENANTLY
C
10080	CALL QUIT(USR2)
	GOTO 9862
C
C	*****	END
C
	END
