C
C
C		THIS SUBROUTINE IS RESPONSIBLE FOR MODIFYING
C		ALL PLAYER ACCOUNTS IN BOTH THE PASSWORD FILE
C		AND THE STATISTICS FILE.
C
	SUBROUTINE MDFY
	DIMENSION IA(68),IPS(16)
	BYTE NTPRB,NTPWR,NTFOD,NTDMC,NTBWD,NTLPR,NTAWD
	EQUIVALENCE (IPS(1),USR2),(IPS(9),PASS2)
	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)
	LOGICAL*1	IA
	LOGICAL*1	IPS
	CHARACTER*10	NSHP
	CHARACTER*8	USR2,PASS2
	CHARACTER*10 SHPSNM
	CHARACTER*5  RANK
	CHARACTER*10	TYP
	CHARACTER*8  USR1
	CHARACTER*8  PASS1
	CHARACTER*8  USR
	CHARACTER*8  PASS
	CHARACTER*80 OUTPT
	PRINT 10
10	FORMAT(1X,///////////////////////////////////////)
	TYPE *,' MODIFY COMMAND ENGAGED'
	TYPE *,' '
	TYPE *,' '
11	PRINT 20
20	FORMAT(1X,'PLAYER NAME :',$)
	READ (5,31,ERR=11),USR1
31	FORMAT(A8)
	DO 30 I=1,200
		READ(22'I)IA
		IF (USR1 .EQ. USR) GOTO 40
30	CONTINUE
	TYPE *,' PLAYER DOES NOT EXIST'
	GOTO 9000
40	DO 300 II=1,200
			READ(4'II)IPS
			IF (USR .EQ. USR2) GOTO 320
300	CONTINUE
320	PRINT 50,USR
50	FORMAT(1X,A8,'  :',$)
	ACCEPT 60,USR1
	IF (USR1 .NE. ' ') USR=USR1
	IF (USR1 .NE. ' ') THEN
		USR2=USR1
		WRITE(4'II)IPS
	ENDIF
60	FORMAT(A8)
	PRINT 70,SHPSNM
70	FORMAT(1X,A10,'  :',$)
	ACCEPT 75,NSHP
75	FORMAT(A10)
	PRINT 50,PASS2
	ACCEPT 60,PASS1
	IF (PASS1 .NE. ' ') PASS2=PASS1
	WRITE(4'II)IPS
	TYP='ROMULANS'
	PRINT 80,TYP,IDESRM
80	FORMAT(1X,A10,5X,I10,'  :',$)
	ACCEPT 85,ICHN
85	FORMAT(I10)
	IF (ICHN .NE. -1) IDESRM=ICHN
	TYP='KLINGONS'
	PRINT 80,TYP,IDESKL
	ACCEPT 85,ICHN
	IF (ICHN .NE. -1) IDESKL=ICHN
	TYP='VESARUS'
	PRINT 80,TYP,LOST
	ACCEPT 85,ICHN
	IF (ICHN .NE. -1) LOST=ICHN
	TYP='MSSN PNTS'
	PRINT 80,TYP,MBR
	ACCEPT 85,ICHN
	IF (ICHN .NE. -1) MBR=ICHN
	TYP='TMS DEST'
	PRINT 80,TYP,IDST
	ACCEPT 85,ICHN
	IF (ICHN .NE. -1) IDST=ICHN
	TYP='GMS PLYD'
	PRINT 80,TYP,NMPL
	ACCEPT 85,ICHN
	IF (ICHN .NE. -1) NMPL=ICHN
	PRINT 90,TIME
90	FORMAT(1X,'TIME    ',F6.2,'  :',$)
	ACCEPT 95,CHN
95	FORMAT(F6.2)
	IF (CHN .NE. -1) TIME=CHN
	TYP='MAN PRB'
	PRINT 80,TYP,NTPRB
	ACCEPT 85,ICHN
	NTPRB=ICHN
	TYP='MR PWR'
	PRINT 80,TYP,NTPWR
	ACCEPT 85,ICHN
	NTPWR=ICHN
	TYP='MR FOD'
	PRINT 80,TYP,NTFOD
	ACCEPT 85,NTFOD
	TYP='MR DLC'
	PRINT 80,TYP,NTDMC
	ACCEPT 85,NTDMC
	TYP='LNG WRP'
	PRINT 80,TYP,NTBWD
	ACCEPT 85,NTBWD
	TYP='LNG PRB'
	PRINT 80,TYP,NTLPR
	ACCEPT 85,NTLPR
	TYP='ACC WRP'
	PRINT 80,TYP,NTAWD
	ACCEPT 85,NTAWD
	PRINT 100
100	FORMAT(1X,////,1X,'ALL MODIFICATIONS SATISFACTORY (Y/N) :',$)
	ACCEPT 110,ANS
110	FORMAT(A1)
	IF (ANS .EQ. 'Y') THEN
		WRITE (22'I)IA
		TYPE *,' RECORD MODIFYED.'
		GOTO 9000
	ELSE
		TYPE *,' RECORD MODIFY CANCLED.'
		GOTO 9000
	ENDIF
9000	PRINT 9001
9001	FORMAT(1X,/////,1X,'ANOTHER RECORD TO MODIFY (Y/N) :',$)
	ACCEPT 110,ANS
	IF (ANS .EQ. 'Y') GOTO 11
	END
