[comp.sources.games] v06i097: conquer4 - middle earth multi-player game

billr@saab.CNA.TEK.COM (Bill Randle) (07/06/89)

Submitted-by: adb@bu-it.bu.edu (Adam Bryant)
Posting-number: Volume 6, Issue 97
Archive-name: conquer4/Patch1
Patch-To: conquer4: Volume 6, Issue 83-96

	[Note that one report on comp.sources.games.bugs states that
	 this patch introduces a new bug (see article
	 <948@auvax.AthabascaU.CA>). I'm sure Adam will have an official
	 fix for this in the next official patch. -br]

Okay... here is the first patch.  Look in notes.v4 for
a list of what it fixes.  Please apply it to the original
distribution source.  [For those who gave me addresses: I
am sending a test message today.... let me know if you
do not receive it by monday.]

adam

    Adam Bryant                     ||  ARPANET: adb@bu-it.bu.edu
    40 Chester Street  Apt. 9       ||  BITNET: adb@buenga
    Allston, MA  02134              ||  UUCP: ..!harvard!bu-cs!bucsf!adb
    (617) 353-9249                  ||  CSNET: adb%bucsf@bu-it
----------

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  patches01
# Wrapped by billr@saab on Wed Jul  5 14:50:47 1989
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'patches01' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'patches01'\"
else
echo shar: Extracting \"'patches01'\" \(45250 characters\)
sed "s/^X//" >'patches01' <<'END_OF_FILE'
X*** opatchlevel.h
X--- patchlevel.h
X**************
X*** 1
X! #define PATCHLEVEL	0
X--- 1 -----
X! #define PATCHLEVEL	1
X*** onotes.v4
X--- notes.v4
X**************
X*** 1,7
X  ------------------------------------------------------------------------------
X  | THIS FILE CONTAINS RELEASE NOTES FOR CONQUER V4.0 			     |
X! | It is broken into 3 sections.  Section 1 reflects changes from v3.5 to v4. |
X! | Section 2 reflects bugs in v4.0.  Section 3 reflects. Future ideas.        |
X  ------------------------------------------------------------------------------
X  
X  -------------------------------------------------------------------------
X--- 1,7 -----
X  ------------------------------------------------------------------------------
X  | THIS FILE CONTAINS RELEASE NOTES FOR CONQUER V4.0 			     |
X! | It is broken into 3 sections.  Section 3 reflects changes from v3.5 to v4. |
X! | Section 1 reflects bugs in v4.0.  Section 2 reflects. Future ideas.        |
X  ------------------------------------------------------------------------------
X  -------------------------------------------------------------------------
X  | == Bugs Fixed From Conquer Version 4.0 ============================== |
X**************
X*** 3,8
X  | It is broken into 3 sections.  Section 1 reflects changes from v3.5 to v4. |
X  | Section 2 reflects bugs in v4.0.  Section 3 reflects. Future ideas.        |
X  ------------------------------------------------------------------------------
X  
X  -------------------------------------------------------------------------
X  | 1.0 POSSIBLE SHORT-TERM ENHANCEMENTS/FIXES FOR CONQUER V4		|
X--- 3,23 -----
X  | It is broken into 3 sections.  Section 3 reflects changes from v3.5 to v4. |
X  | Section 1 reflects bugs in v4.0.  Section 2 reflects. Future ideas.        |
X  ------------------------------------------------------------------------------
X+ -------------------------------------------------------------------------
X+ | == Bugs Fixed From Conquer Version 4.0 ============================== |
X+ -------------------------------------------------------------------------
X+   1. increased newstring[] array from 40 to 100 in makeworl.c.
X+   2. corrected a mispelling of irrigation.
X+   3. line 830 of makeworl.c, added a y=(rand()%20); statement.
X+   4. corrected some bugs in newlogin() routine.  Fixed orc repro buying.
X+   5. made the -d flag be a subdirectory of DEFAULTDIR if not beginning
X+ 	with a '/'.
X+   6. fixed overruns of NTOTAL throughout the game.
X+   7. new function to decrease size of a test statement in extcmds.c.
X+   8. changed newlogin routine for detection of available countries.
X+   9. merged do_lizard() and updlizard().  [used name do_lizard()].
X+  10. fixed bug with getchar querys in makeworl.c.
X+  11. fixed bug with y < MAPX mistype in randeven.c.
X  
X  -------------------------------------------------------------------------
X  | 1.0 POSSIBLE SHORT-TERM ENHANCEMENTS/FIXES FOR CONQUER V4		|
X*** oMakefile
X--- Makefile
X*** oREADME
X--- README
X*** oheader.h
X--- header.h
X*** odata.h
X--- data.h
X**************
X*** 179,188
X  
X  struct s_sector
X  {
X! 	char	designation;		/* designation of sector	*/
X! 	char	altitude;		/* sector altitude		*/
X! 	char	vegetation;		/* sector vegetation		*/
X! 	char	owner;			/* nation id of owner		*/
X  	long	people;			/* civilians in sector		*/
X  	short	i_people;		/* initial civilians in sector	*/
X  	unsigned char	jewels;		/* jewel production ability	*/
X--- 179,188 -----
X  
X  struct s_sector
X  {
X! 	unsigned char	designation;	/* designation of sector	*/
X! 	unsigned char	altitude;	/* sector altitude		*/
X! 	unsigned char	vegetation;	/* sector vegetation		*/
X! 	unsigned char	owner;		/* nation id of owner		*/
X  	long	people;			/* civilians in sector		*/
X  	short	i_people;		/* initial civilians in sector	*/
X  	unsigned char	jewels;		/* jewel production ability	*/
X**************
X*** 200,208
X  	unsigned short warships;
X  	unsigned short merchant;
X  	unsigned short galleys;
X! 	char xloc;
X! 	char yloc;
X! 	char smove;			/* movement ability of ship */
X  	unsigned char crew;		/* crew on ship */
X  	unsigned char people;		/* people carried */
X  	unsigned char commodity;	/* future commodities */
X--- 200,208 -----
X  	unsigned short warships;
X  	unsigned short merchant;
X  	unsigned short galleys;
X! 	unsigned char xloc;
X! 	unsigned char yloc;
X! 	unsigned char smove;		/* movement ability of ship */
X  	unsigned char crew;		/* crew on ship */
X  	unsigned char people;		/* people carried */
X  	unsigned char commodity;	/* future commodities */
X**************
X*** 206,212
X  	unsigned char crew;		/* crew on ship */
X  	unsigned char people;		/* people carried */
X  	unsigned char commodity;	/* future commodities */
X! 	char armynum;			/* army carried */
X  };
X  
X  
X--- 206,212 -----
X  	unsigned char crew;		/* crew on ship */
X  	unsigned char people;		/* people carried */
X  	unsigned char commodity;	/* future commodities */
X! 	unsigned char armynum;		/* army carried */
X  };
X  
X  
X**************
X*** 342,350
X  struct army
X  {
X  	unsigned char unittyp;
X! 	char xloc;
X! 	char yloc;
X! 	char smove;
X  	long sold;
X  	char stat;
X  };
X--- 342,350 -----
X  struct army
X  {
X  	unsigned char unittyp;
X! 	unsigned char xloc;
X! 	unsigned char yloc;
X! 	unsigned char smove;
X  	long sold;
X  	unsigned char stat;
X  };
X**************
X*** 346,352
X  	char yloc;
X  	char smove;
X  	long sold;
X! 	char stat;
X  };
X  
X  struct	s_nation		/* player nation stats	*/
X--- 346,352 -----
X  	unsigned char yloc;
X  	unsigned char smove;
X  	long sold;
X! 	unsigned char stat;
X  };
X  
X  struct	s_nation		/* player nation stats	*/
X**************
X*** 357,366
X  	char	race;		/* national race (integer--see header.h)*/
X  	char	location;	/* location variable (gfr)	*/
X  	char	mark;		/* unique mark for nation	*/
X! 	char	capx;		/* Capitol x coordinate		*/
X! 	char	capy;		/* Capitol y coordinate		*/
X! 	char	active;		/* nation type and strategy	*/
X! 	char	maxmove;	/* maximum movement of soldiers */
X  	char	repro;		/* reproduction rate of nation	*/
X  	long	score;		/* score			*/
X  	long	tgold;		/* gold in treasury		*/
X--- 357,366 -----
X  	char	race;		/* national race (integer--see header.h)*/
X  	char	location;	/* location variable (gfr)	*/
X  	char	mark;		/* unique mark for nation	*/
X! 	unsigned char	capx;	/* Capitol x coordinate		*/
X! 	unsigned char	capy;	/* Capitol y coordinate		*/
X! 	unsigned char	active;	/* nation type and strategy	*/
X! 	unsigned char	maxmove;/* maximum movement of soldiers */
X  	char	repro;		/* reproduction rate of nation	*/
X  	long	score;		/* score			*/
X  	long	tgold;		/* gold in treasury		*/
X**************
X*** 384,400
X  	unsigned char	tax_rate;	/* taxrate populace	*/
X  	unsigned char	prestige;	/* nations prestige	*/
X  	unsigned char	popularity;	/* governments popularity	*/
X! 	unsigned char	power;			/* nation power	*/
X! 	unsigned char	communications;		/* leader communication	*/
X! 	unsigned char	wealth;			/* per capita income	*/
X! 	unsigned char	eatrate;		/* food eaten / 10 people*/
X! 	unsigned char	spoilrate;		/* food spoilage rate	*/
X! 	unsigned char	knowledge;		/* general knowledge	*/
X! 	unsigned char	farm_ability;		/* farming ability	*/
X! 	unsigned char	mine_ability;		/* mine ability		*/
X! 	unsigned char	poverty;		/* % poor people	*/
X! 	unsigned char	terror;			/* peoples terror of you*/
X! 	unsigned char	reputation;		/* reputation of nation	*/
X  };
X  #define	P_NTNCOM	((((float) curntn->communications)/ 50.0 ))
X  #define	P_EATRATE	((((float) curntn->eatrate) / 25.0 ))
X--- 384,400 -----
X  	unsigned char	tax_rate;	/* taxrate populace	*/
X  	unsigned char	prestige;	/* nations prestige	*/
X  	unsigned char	popularity;	/* governments popularity	*/
X! 	unsigned char	power;		/* nation power		*/
X! 	unsigned char	communications;	/* leader communication	*/
X! 	unsigned char	wealth;		/* per capita income	*/
X! 	unsigned char	eatrate;	/* food eaten / 10 people*/
X! 	unsigned char	spoilrate;	/* food spoilage rate	*/
X! 	unsigned char	knowledge;	/* general knowledge	*/
X! 	unsigned char	farm_ability;	/* farming ability	*/
X! 	unsigned char	mine_ability;	/* mine ability		*/
X! 	unsigned char	poverty;	/* % poor people	*/
X! 	unsigned char	terror;		/* peoples terror of you*/
X! 	unsigned char	reputation;	/* reputation of nation	*/
X  };
X  #define	P_NTNCOM	((((float) curntn->communications)/ 50.0 ))
X  #define	P_EATRATE	((((float) curntn->eatrate) / 25.0 ))
X**************
X*** 623,629
X  extern void	randomevent(), wdisaster(), weather(), deplete();
X  extern void	verify_ntn(), verify_sct(), verifydata(), prep();
X  extern void	destroy(), updmove(), spreadsheet(), mailopen(), mailclose();
X! extern void	updexecs(), updlizards(), updcapture(), updsectors();
X  extern void	updmil(), updcomodities(), updleader();
X  extern void	nationrun(), n_atpeace(), n_trespass(), n_people();
X  extern void	n_toofar(), n_unowned(), pceattr(), checkout();
X--- 623,629 -----
X  extern void	randomevent(), wdisaster(), weather(), deplete();
X  extern void	verify_ntn(), verify_sct(), verifydata(), prep();
X  extern void	destroy(), updmove(), spreadsheet(), mailopen(), mailclose();
X! extern void	updexecs(), updcapture(), updsectors();
X  extern void	updmil(), updcomodities(), updleader();
X  extern void	nationrun(), n_atpeace(), n_trespass(), n_people();
X  extern void	n_toofar(), n_unowned(), pceattr(), checkout();
X**************
X*** 935,941
X  #define GODJEWL		3000L		/* " */
X  #define GODPRICE	25000L
X  
X! #ifdef 0
X  /* THE FOLLOWING DEFINES ARE NOT IMPLEMENTED YET		*/
X  /* THEY DEFINE THE ATTRIBUTES OF A (TO BE IMPLEMENTED) REGION	*/
X  
X--- 935,941 -----
X  #define GODJEWL		3000L		/* " */
X  #define GODPRICE	25000L
X  
X! #ifdef XYZ
X  /* THE FOLLOWING DEFINES ARE NOT IMPLEMENTED YET		*/
X  /* THEY DEFINE THE ATTRIBUTES OF A (TO BE IMPLEMENTED) REGION	*/
X  
X*** oadmin.c
X--- admin.c
X**************
X*** 90,96
X  		strcpy(scenario, optarg);
X  		break;
X  	case 'd':
X! 		strcpy(defaultdir, optarg);
X  		break;
X  	case '?': /*  print out command line arguments */
X  		printf("Command line format: %s [-maxp -dDIR -rSCENARIO]\n",argv[0]);
X--- 90,100 -----
X  		strcpy(scenario, optarg);
X  		break;
X  	case 'd':
X! 		if(optarg[0]!='/') {
X! 			sprintf(defaultdir, "%s/%s", DEFAULTDIR, optarg);
X! 		} else {
X! 			strcpy(defaultdir, optarg);
X! 		}
X  		break;
X  	case '?': /*  print out command line arguments */
X  		printf("Command line format: %s [-maxp -dDIR -rSCENARIO]\n",argv[0]);
X**************
X*** 122,128
X  		exit(FAIL);
X  	}
X  	if((mflag)||(rflag)) {
X- 		makeworld(rflag);
X  		sprintf(string,"%sup",isonfile);
X  		unlink(string);
X  		exit(SUCCESS);
X--- 126,131 -----
X  		exit(FAIL);
X  	}
X  	if((mflag)||(rflag)) {
X  		sprintf(string,"%sup",isonfile);
X  		unlink(string);
X  		makeworld(rflag);
X**************
X*** 125,130
X  		makeworld(rflag);
X  		sprintf(string,"%sup",isonfile);
X  		unlink(string);
X  		exit(SUCCESS);
X  	}
X  
X--- 128,134 -----
X  	if((mflag)||(rflag)) {
X  		sprintf(string,"%sup",isonfile);
X  		unlink(string);
X+ 		makeworld(rflag);
X  		exit(SUCCESS);
X  	}
X  
X**************
X*** 162,168
X  		/* prevent more than one addition */
X  		sprintf(string,"%sadd",isonfile);
X  		if(check_lock(string,TRUE)==TRUE) {
X! 			printf("Some else is adding\n");
X  			printf("Please try again later.\n");
X  			exit(FAIL);
X  		}
X--- 166,172 -----
X  		/* prevent more than one addition */
X  		sprintf(string,"%sadd",isonfile);
X  		if(check_lock(string,TRUE)==TRUE) {
X! 			printf("Someone else is adding\n");
X  			printf("Please try again later.\n");
X  			exit(FAIL);
X  		}
X*** oextcmds.c
X--- extcmds.c
X**************
X*** 84,89
X  	refresh();
X  }
X  
X  void
X  combinearmies(armynum,army2)
X  int armynum, army2;
X--- 84,114 -----
X  	refresh();
X  }
X  
X+ /* returns TRUE if uncombinable FALSE if combinable */
X+ int
X+ nocomb_stat(astat)
X+ 	unsigned char astat;
X+ {
X+ 	int hold;
X+ 
X+ 	switch(astat) {
X+ #ifdef TRADE
X+ 	case TRADED:
X+ #endif TRADE
X+ 	case FLIGHT:
X+ 	case MAGATT:
X+ 	case MAGDEF:
X+ 	case SCOUT:
X+ 	case ONBOARD:
X+ 		hold = TRUE;
X+ 		break;
X+ 	default:
X+ 		hold = FALSE;
X+ 		break;
X+ 	}
X+ 	return(hold);
X+ }
X+ 
X  void
X  combinearmies(armynum,army2)
X  int armynum, army2;
X**************
X*** 88,93
X  combinearmies(armynum,army2)
X  int armynum, army2;
X  {
X  	if (armynum < 0 || armynum >= MAXARM ||
X  		army2 < 0 || army2 >= MAXARM ||
X  		armynum == army2 ||
X--- 113,120 -----
X  combinearmies(armynum,army2)
X  int armynum, army2;
X  {
X+ 	int nocomb_stat();
X+ 
X  	if (armynum < 0 || armynum >= MAXARM ||
X  		army2 < 0 || army2 >= MAXARM ||
X  		armynum == army2 ||
X**************
X*** 91,110
X  	if (armynum < 0 || armynum >= MAXARM ||
X  		army2 < 0 || army2 >= MAXARM ||
X  		armynum == army2 ||
X! #ifdef TRADE
X! 		P_ASTAT == TRADED ||
X! 		curntn->arm[army2].stat == TRADED ||
X! #endif TRADE
X! 		P_ASTAT == FLIGHT ||
X! 		curntn->arm[army2].stat == FLIGHT ||
X! 		P_ASTAT == MAGATT ||
X! 		curntn->arm[army2].stat == MAGATT ||
X! 		P_ASTAT == MAGDEF ||
X! 		curntn->arm[army2].stat == MAGDEF ||
X! 		P_ASTAT == SCOUT ||
X! 		curntn->arm[army2].stat == SCOUT ||
X! 		P_ASTAT == ONBOARD ||
X! 		curntn->arm[army2].stat == ONBOARD ||
X  		curntn->arm[army2].stat == SIEGE ||    /* may not jump out  */
X  		curntn->arm[army2].stat == SORTIE ||   /* of these statuses */
X  		P_ATYPE >= MINLEADER ||
X--- 118,125 -----
X  	if (armynum < 0 || armynum >= MAXARM ||
X  		army2 < 0 || army2 >= MAXARM ||
X  		armynum == army2 ||
X! 		(nocomb_stat(P_ASTAT) == TRUE) ||
X! 		(nocomb_stat(curntn->arm[army2].stat) == TRUE) ||
X  		curntn->arm[army2].stat == SIEGE ||    /* may not jump out  */
X  		curntn->arm[army2].stat == SORTIE ||   /* of these statuses */
X  		P_ATYPE >= MINLEADER ||
X**************
X*** 221,227
X  	}
X  	P_ASTAT = new_stat;
X  	AADJSTAT;
X! 	if( P_AMOVE>0 ) P_AMOVE--;
X  	AADJMOV;
X  }
X  
X--- 236,242 -----
X  	}
X  	P_ASTAT = new_stat;
X  	AADJSTAT;
X! 	if( P_AMOVE != 0 ) P_AMOVE--;
X  	AADJMOV;
X  }
X  
X*** omakeworl.c
X--- makeworl.c
X**************
X*** 45,51
X  int	rflag;		/* TRUE if you wish to read in a map from mapfiles */
X  {
X  	char passwd[PASSLTH+1],*getpass();
X! 	char newstring[40];
X  	FILE *fopen();
X  
X  	/*abort if datafile currently exists*/
X--- 45,51 -----
X  int	rflag;		/* TRUE if you wish to read in a map from mapfiles */
X  {
X  	char passwd[PASSLTH+1],*getpass();
X! 	char newstring[100];
X  	FILE *fopen();
X  
X  	/*abort if datafile currently exists*/
X**************
X*** 711,717
X  	short	npirates=0,nbarbarians=0,nnomads=0,nlizards=0;
X  
X  	FILE *fp, *fopen();
X- 	int done=FALSE;
X  	char line[80],allign;
X  	char fname[80];
X  
X--- 711,716 -----
X  	short	npirates=0,nbarbarians=0,nnomads=0,nlizards=0;
X  
X  	FILE *fp, *fopen();
X  	char line[80],allign;
X  	char fname[80];
X  
X**************
X*** 739,746
X  		curntn->mark='-';
X  	}
X  
X! 	for( country=1; country<NTOTAL; country++ ) {
X! 		for(i=country+1;i<NTOTAL;i++) {
X  			ntn[country].dstatus[i]=UNMET;
X  			ntn[i].dstatus[country]=UNMET;
X  		}
X--- 738,745 -----
X  		curntn->mark='-';
X  	}
X  
X! 	for( country=0; country<NTOTAL; country++ ) {
X! 		for(i=country;i<NTOTAL;i++) {
X  			ntn[country].dstatus[i]=UNMET;
X  			ntn[i].dstatus[country]=UNMET;
X  		}
X**************
X*** 828,833
X  		if((rand()%2==0)&&(curntn->active!=NPC_LIZARD)){
X  			if(rand()%2==0) {
X  				x=(rand()%20);
X  			} else {
X  				x=(MAPX-(rand()%20)-1);
X  				y=(MAPY-(rand()%20)-1);
X--- 827,833 -----
X  		if((rand()%2==0)&&(curntn->active!=NPC_LIZARD)){
X  			if(rand()%2==0) {
X  				x=(rand()%20);
X+ 				y=(rand()%20);
X  			} else {
X  				x=(MAPX-(rand()%20)-1);
X  				y=(MAPY-(rand()%20)-1);
X**************
X*** 949,955
X  		if( ntn[country].active != NPC_BARBARIAN ) continue;
X  		curntn = &ntn[country];
X  		armynum=barbarmy;
X! 		if( country!=NTOTAL ) while(armynum<MAXARM) {
X  			x = rand()%MAPX;
X  			y = rand()%MAPY;
X  			if (is_habitable(x,y)&&sct[x][y].owner==0) {
X--- 949,955 -----
X  		if( ntn[country].active != NPC_BARBARIAN ) continue;
X  		curntn = &ntn[country];
X  		armynum=barbarmy;
X! 		while(armynum<MAXARM) {
X  			x = rand()%MAPX;
X  			y = rand()%MAPY;
X  			if (is_habitable(x,y)&&sct[x][y].owner==0) {
X**************
X*** 979,986
X  	}
X  
X  #ifdef NPC
X! 	printf("\nDo you want NPC nations in this campaign?");
X! 	if( getchar()!='y' ) return;
X  	if((fp=fopen(npcsfile,"r"))==NULL) {
X  		printf("error on read of %s file\n",npcsfile);
X  		printf("Do you wish to use default NPC nations file (y or n)?");
X--- 979,987 -----
X  	}
X  
X  #ifdef NPC
X! 	printf("\nDo you want NPC nations in this campaign? (y or n)");
X! 	while( ((i=getchar()) != 'y')&&(i != 'n') ) ;
X! 	if( i!='y' ) return;
X  	if((fp=fopen(npcsfile,"r"))==NULL) {
X  		printf("error on read of %s file\n",npcsfile);
X  		printf("Do you wish to use default NPC nations file (y or n)?");
X**************
X*** 984,995
X  	if((fp=fopen(npcsfile,"r"))==NULL) {
X  		printf("error on read of %s file\n",npcsfile);
X  		printf("Do you wish to use default NPC nations file (y or n)?");
X! 		if(getchar()=='y'){
X! 		sprintf(line,"%s/%s",DEFAULTDIR,npcsfile);
X! 		if ((fp=fopen(line,"r"))==NULL) {
X! 			printf("\nsorry; error on read of %s file\n",line);
X! 			return;
X! 		} else printf("\nOK; default nations used\n");
X  		} else {
X  			printf("\nOK; no NPC nations used\n");
X  			return;
X--- 985,997 -----
X  	if((fp=fopen(npcsfile,"r"))==NULL) {
X  		printf("error on read of %s file\n",npcsfile);
X  		printf("Do you wish to use default NPC nations file (y or n)?");
X! 		while( ((i=getchar()) != 'y')&&(i != 'n') ) ;
X! 		if( i=='y'){
X! 			sprintf(line,"%s/%s",DEFAULTDIR,npcsfile);
X! 			if ((fp=fopen(line,"r"))==NULL) {
X! 				printf("\nsorry; error on read of %s file\n",line);
X! 				return;
X! 			} else printf("\nOK; default nations used\n");
X  		} else {
X  			printf("\nOK; no NPC nations used\n");
X  			return;
X**************
X*** 1072,1078
X  			curntn->tfood= curntn->tciv * 3;
X  			curntn->metals=10000L;
X  			curntn->jewels=10000L;
X! 			cnum++;
X  			place(xloc,yloc);
X  			att_setup(country);	/* nation attributes */
X  		}
X--- 1074,1080 -----
X  			curntn->tfood= curntn->tciv * 3;
X  			curntn->metals=10000L;
X  			curntn->jewels=10000L;
X! 			if (cnum < NTOTAL) cnum++;
X  			place(xloc,yloc);
X  			att_setup(country);	/* nation attributes */
X  		}
X*** osort.c
X--- sort.c
X**************
X*** 25,32
X   *      as it comes in.
X   *
X   * Initial Revision:		(adb@bucsf.bu.edu)
X!  *	Tuesday March 21th, 1989 - Began the program at 23:26 EST
X!  *      Wednesday March 22nd, 1989 - Finished the initial version 11:29 EST
X   */
X  
X  #include <stdio.h>
X--- 25,32 -----
X   *      as it comes in.
X   *
X   * Initial Revision:		(adb@bucsf.bu.edu)
X!  *     Tuesday March 21th, 1989 - Began the program at 23:26 EST
X!  *     Wednesday March 22nd, 1989 - Finished the initial version 11:29 EST
X   */
X  
X  #include <stdio.h>
X**************
X*** 30,36
X   */
X  
X  #include <stdio.h>
X- #include "header.h"
X  #ifndef HPUX
X  #include <sysexits.h>
X  #endif HPUX
X--- 30,35 -----
X   */
X  
X  #include <stdio.h>
X  #ifndef HPUX
X  #include <sysexits.h>
X  #endif HPUX
X**************
X*** 181,187
X  
X  	}
X  
X!      /* ==== end of main processing loop ==== */
X  
X  	/* close input file if not stdin */
X  	if (infile!=stdin) {
X--- 180,186 -----
X  
X  	}
X  
X! 	/* ==== end of main processing loop ==== */
X  
X  	/* close input file if not stdin */
X  	if (infile!=stdin) {
X**************
X*** 317,320
X  	temp->next = nptr;
X  	return(temp);
X  }
X- 
X--- 316,318 -----
X  	temp->next = nptr;
X  	return(temp);
X  }
X*** orandeven.c
X--- randeven.c
X**************
X*** 70,76
X  findnew()
X  {
X  	int newntn=0,nationis;
X! 	for ( nationis=NTOTAL; nationis >= 1; nationis--)
X  		if(ntn[nationis].active == INACTIVE) newntn=nationis;
X  	if (newntn == 0) return (0);
X  	strcpy(ntn[newntn].leader,"rebel");
X--- 70,76 -----
X  findnew()
X  {
X  	int newntn=0,nationis;
X! 	for ( nationis=NTOTAL-1; nationis >= 1; nationis--)
X  		if(ntn[nationis].active == INACTIVE) newntn=nationis;
X  	if (newntn == 0) return (0);
X  	strcpy(ntn[newntn].leader,"rebel");
X**************
X*** 1089,1095
X  *rand_sector()
X  {
X  	int count=0;
X! 	for(xpos=0;xpos<MAPX;xpos++) for(ypos=0;ypos<MAPX;ypos++)
X  		if(sct[xpos][ypos].owner == country) count++;
X  	count = rand()%count;
X  	for(xpos=0;xpos<MAPX;xpos++) for(ypos=0;ypos<MAPX;ypos++){
X--- 1089,1095 -----
X  *rand_sector()
X  {
X  	int count=0;
X! 	for(xpos=0;xpos<MAPX;xpos++) for(ypos=0;ypos<MAPY;ypos++)
X  		if(sct[xpos][ypos].owner == country) count++;
X  	count = rand()%count;
X  	for(xpos=0;xpos<MAPX;xpos++) for(ypos=0;ypos<MAPY;ypos++){
X**************
X*** 1092,1098
X  	for(xpos=0;xpos<MAPX;xpos++) for(ypos=0;ypos<MAPX;ypos++)
X  		if(sct[xpos][ypos].owner == country) count++;
X  	count = rand()%count;
X! 	for(xpos=0;xpos<MAPX;xpos++) for(ypos=0;ypos<MAPX;ypos++){
X  		if(sct[xpos][ypos].owner == country) count--;
X  		if(count==0) return(&sct[xpos][ypos]);
X  	}
X--- 1092,1098 -----
X  	for(xpos=0;xpos<MAPX;xpos++) for(ypos=0;ypos<MAPY;ypos++)
X  		if(sct[xpos][ypos].owner == country) count++;
X  	count = rand()%count;
X! 	for(xpos=0;xpos<MAPX;xpos++) for(ypos=0;ypos<MAPY;ypos++){
X  		if(sct[xpos][ypos].owner == country) count--;
X  		if(count==0) return(&sct[xpos][ypos]);
X  	}
X**************
X*** 1096,1101
X  		if(sct[xpos][ypos].owner == country) count--;
X  		if(count==0) return(&sct[xpos][ypos]);
X  	}
X  	abrt();
X  	return(NULL);	/* stop lint from complaining */
X  }
X--- 1096,1102 -----
X  		if(sct[xpos][ypos].owner == country) count--;
X  		if(count==0) return(&sct[xpos][ypos]);
X  	}
X+ 	fprintf(stderr,"could find no location for country %d\n",country);
X  	abrt();
X  	return(NULL);	/* stop lint from complaining */
X  }
X*** ocexecute.c
X--- cexecute.c
X**************
X*** 210,216
X  			/* if not own it, and if people there, problem */
X  			if((sct[x][y].owner!=country)
X  			&&( country!=0)
X! 			&&( sct[x][y].owner>0 )
X  			&&( sct[x][y].people>0 )
X  			&&( magic(country,SLAVER)==FALSE )
X  			&&( ntn[sct[x][y].owner].race!=curntn->race)){
X--- 210,216 -----
X  			/* if not own it, and if people there, problem */
X  			if((sct[x][y].owner!=country)
X  			&&( country!=0)
X! 			&&( sct[x][y].owner!=0 )
X  			&&( sct[x][y].people>0 )
X  			&&( magic(country,SLAVER)==FALSE )
X  			&&( ntn[sct[x][y].owner].race != curntn->race)){
X**************
X*** 213,219
X  			&&( sct[x][y].owner>0 )
X  			&&( sct[x][y].people>0 )
X  			&&( magic(country,SLAVER)==FALSE )
X! 			&&( ntn[sct[x][y].owner].race!=curntn->race)){
X  				sct[ntn[sct[x][y].owner].capx][ntn[sct[x][y].owner].capy].people+= sct[x][y].people;
X  				sct[x][y].people=0;
X  				fprintf(stderr,"ERROR: <%s> taking sector %d %d but civilians exist of other race - puting them in their capitol\n",curntn->name,x,y);
X--- 213,219 -----
X  			&&( sct[x][y].owner!=0 )
X  			&&( sct[x][y].people>0 )
X  			&&( magic(country,SLAVER)==FALSE )
X! 			&&( ntn[sct[x][y].owner].race != curntn->race)){
X  				sct[ntn[sct[x][y].owner].capx][ntn[sct[x][y].owner].capy].people+= sct[x][y].people;
X  				sct[x][y].people=0;
X  				fprintf(stderr,"ERROR: <%s> taking sector %d %d but civilians exist of other race - puting them in their capitol\n",curntn->name,x,y);
X*** oforms.c
X--- forms.c
X**************
X*** 275,281
X  			mvaddstr(j++,0,"6) WAR");
X  			mvprintw(j++,0,"7) JIHAD (%d talons to break):",BREAKJIHAD);
X  			j++;
X! 			for( i=1; i<=NTOTAL; i++ )
X  				if((isntnorp(ntn[i].active)) && (ntn[nation].dstatus[i]==TREATY))
X  				mvprintw(j++,10,"%s has treaty with %s",ntn[nation].name,ntn[i].name);
X  
X--- 275,281 -----
X  			mvaddstr(j++,0,"6) WAR");
X  			mvprintw(j++,0,"7) JIHAD (%d talons to break):",BREAKJIHAD);
X  			j++;
X! 			for( i=1; i<NTOTAL; i++ )
X  				if((isntnorp(ntn[i].active)) && (ntn[nation].dstatus[i]==TREATY))
X  				mvprintw(j++,10,"%s has treaty with %s",ntn[nation].name,ntn[i].name);
X  
X**************
X*** 315,321
X  			&&(ntn[nation].dstatus[country]<WAR)) {
X  				ntn[nation].dstatus[country]=WAR;
X  				EADJDIP(nation,country);
X! 				for( i=1; i<=NTOTAL; i++ )
X  				if(ntn[i].dstatus[nation]==TREATY){
X  					ntn[i].dstatus[country]=WAR;
X  					EADJDIP(i,country);
X--- 315,321 -----
X  			&&(ntn[nation].dstatus[country]<WAR)) {
X  				ntn[nation].dstatus[country]=WAR;
X  				EADJDIP(nation,country);
X! 				for( i=1; i<NTOTAL; i++ )
X  				if(ntn[i].dstatus[nation]==TREATY){
X  					ntn[i].dstatus[country]=WAR;
X  					EADJDIP(i,country);
X**************
X*** 657,663
X  				}
X  				destroy(country);
X  				fclose(fnews);
X! 				sprintf(command,"%s/%s",DEFAULTDIR, sortname);
X  				sprintf(command,"%s %s %s", command, filename, filename);
X  				system(command);
X  			}
X--- 657,663 -----
X  				}
X  				destroy(country);
X  				fclose(fnews);
X! 				sprintf(command,"%s/%s", EXEDIR, sortname);
X  				sprintf(command,"%s %s %s", command, filename, filename);
X  				system(command);
X  			}
X*** omisc.c
X--- misc.c
X**************
X*** 757,763
X  int country;
X  {
X  	struct s_nation *saventn=curntn;
X! 	int i,j,x,y,armynum,nation;
X  
X  	x = ntn[country].capx;
X  	y = ntn[country].capy;
X--- 757,763 -----
X  int country;
X  {
X  	struct s_nation *saventn=curntn;
X! 	int i,j,x,y,armynum;
X  
X  	x = ntn[country].capx;
X  	y = ntn[country].capy;
X**************
X*** 940,945
X  
X  	nptr = &ntn[country];
X  	if( ismonst(nptr->active) ) return;
X  	fprintf(fnews,"1.\tNation %s was destroyed ",nptr->name);
X  	if(country!=sct[nptr->capx][nptr->capy].owner){
X  		fprintf(fnews,"(their capitol is now owned by %s)\n",ntn[sct[nptr->capx][nptr->capy].owner].name);
X--- 940,946 -----
X  
X  	nptr = &ntn[country];
X  	if( ismonst(nptr->active) ) return;
X+ 	if( !isactive(nptr->active) ) return;
X  	fprintf(fnews,"1.\tNation %s was destroyed ",nptr->name);
X  	if(country!=sct[nptr->capx][nptr->capy].owner){
X  		fprintf(fnews,"(their capitol is now owned by %s)\n",ntn[sct[nptr->capx][nptr->capy].owner].name);
X*** omove.c
X--- move.c
X**************
X*** 385,391
X  				} else if(total>0) {
X  					/* remove proportion of starting move */
X  					P_AMOVE-= total * curntn->maxmove * *(unitmove+(P_ATYPE%UTYPE))/(10*(groupmen+othermen));
X! 					if( P_AMOVE<0 || P_AMOVE>100 )
X  						P_AMOVE=0;
X  					AADJMOV;
X  					if( P_AMOVE==0 )
X--- 385,391 -----
X  				} else if(total>0) {
X  					/* remove proportion of starting move */
X  					P_AMOVE-= total * curntn->maxmove * *(unitmove+(P_ATYPE%UTYPE))/(10*(groupmen+othermen));
X! 					if( P_AMOVE>150 )
X  						P_AMOVE=0;
X  					AADJMOV;
X  					if( P_AMOVE==0 )
X**************
X*** 475,480
X  		&&(P_ASOLD>0)){
X  			if((groupmen>=TAKESECTOR)&&(SOWN==0 )){
X  				mvaddstr(LINES-2,0,"Taking Unowned Sector");
X  				refresh();
X  				sleep(2);
X  				SOWN=country;
X--- 475,481 -----
X  		&&(P_ASOLD>0)){
X  			if((groupmen>=TAKESECTOR)&&(SOWN==0 )){
X  				mvaddstr(LINES-2,0,"Taking Unowned Sector");
X+ 				clrtoeol();
X  				refresh();
X  				sleep(2);
X  				SOWN=country;
X*** oupdate.c
X--- update.c
X**************
X*** 39,47
X  	check();
X  
X  #ifdef MONSTER
X- 	for( country=1;country<NTOTAL;country++)
X- 		if( ntn[country].active == NPC_LIZARD )
X- 			updlizards();	/* run lizard nations */
X  	check();
X  	monster();	/* update monster nations */
X  	check();
X--- 39,44 -----
X  	check();
X  
X  #ifdef MONSTER
X  	check();
X  	monster();	/* update monster nations */
X  	check();
X**************
X*** 670,676
X  }
X  
X  /****************************************************************/
X! /*	UPDLIZARDS() 						*/
X  /* update lizards	 					*/
X  /****************************************************************/
X  void
X--- 667,673 -----
X  }
X  
X  /****************************************************************/
X! /*	DO_LIZARD() 						*/
X  /* update lizards	 					*/
X  /****************************************************************/
X  void
X**************
X*** 674,680
X  /* update lizards	 					*/
X  /****************************************************************/
X  void
X! updlizards()
X  {
X  	register int i, j;
X  	int armynum;
X--- 671,677 -----
X  /* update lizards	 					*/
X  /****************************************************************/
X  void
X! do_lizard()
X  {
X  	register int i, j;
X  	int armynum;
X**************
X*** 679,685
X  	register int i, j;
X  	int armynum;
X  
X! 	printf("updating lizard (nation %d)\n ",country);
X  	curntn = &ntn[country];
X  	for(armynum=0;armynum<MAXARM;armynum++)
X  	if((P_ASOLD>0)) {
X--- 676,682 -----
X  	register int i, j;
X  	int armynum;
X  
X! 	printf("updating lizard (nation %d)\n",country);
X  	curntn = &ntn[country];
X  	for(armynum=0;armynum<MAXARM;armynum++)
X  	if((P_ASOLD>0)) {
X**************
X*** 684,689
X  	for(armynum=0;armynum<MAXARM;armynum++)
X  	if((P_ASOLD>0)) {
X  		P_AMOVE =20;	/* just in case god wants to move them */
X  		if(armynum%2==0) {
X  			if(P_ASTAT!=SIEGED) P_ASTAT=GARRISON;
X  		} else {
X--- 681,688 -----
X  	for(armynum=0;armynum<MAXARM;armynum++)
X  	if((P_ASOLD>0)) {
X  		P_AMOVE =20;	/* just in case god wants to move them */
X+ 		P_ASOLD*=102;	/* increase population */
X+ 		P_ASOLD/=100;
X  		if(armynum%2==0) {
X  			if(P_ASTAT!=SIEGED) P_ASTAT=GARRISON;
X  		} else {
X*** odata.c
X--- data.c
X**************
X*** 271,277
X  "rice", "wheat", "dairy", "peas", "bread", "cereal",
X  "pottery", "salt", "timber", "granite", "pine", "oak", "nails",
X  "papyrus","math","library","drama","paper","literature","law","philosophy",
X! "irregation", "oxen", "plows",
X  "stones",
X  "herbs", "medicine",
X  "torture", "prison",
X--- 271,277 -----
X  "rice", "wheat", "dairy", "peas", "bread", "cereal",
X  "pottery", "salt", "timber", "granite", "pine", "oak", "nails",
X  "papyrus","math","library","drama","paper","literature","law","philosophy",
X! "irrigation", "oxen", "plows",
X  "stones",
X  "herbs", "medicine",
X  "torture", "prison",
X*** omagic.c
X--- magic.c
X**************
X*** 600,606
X  		mvaddstr((*count)++,0,"  What orc nation:");
X  		refresh();
X  		i=get_country();
X! 		if(i<=0 || i>NTOTAL || !isntn(ntn[i].active) )
X  			mvaddstr((*count)++,0,"  Invalid Nation");
X  		else if((curntn->dstatus[i]<HOSTILE)
X  		&&(curntn->dstatus[i]!=UNMET)
X--- 600,606 -----
X  		mvaddstr((*count)++,0,"  What orc nation:");
X  		refresh();
X  		i=get_country();
X! 		if(i<=0 || i>=NTOTAL || !isntn(ntn[i].active) )
X  			mvaddstr((*count)++,0,"  Invalid Nation");
X  		else if((curntn->dstatus[i]<HOSTILE)
X  		&&(curntn->dstatus[i]!=UNMET)
X*** onewlogin.c
X--- newlogin.c
X**************
X*** 126,132
X  	register i;
X  
X  	printf("\nPreparing to add player\n");
X- 	printf("break at any time to abort\n");
X  
X  	while(more==TRUE) {
X  		points=MAXPTS;
X--- 126,131 -----
X  	register i;
X  
X  	printf("\nPreparing to add player\n");
X  
X  	while(more==TRUE) {
X  		points=MAXPTS;
X**************
X*** 130,135
X  
X  	while(more==TRUE) {
X  		points=MAXPTS;
X  		/*find valid nation number type*/
X  		for(i=1;i<NTOTAL;i++)
X  			if(ntn[i].active==INACTIVE) {
X--- 129,135 -----
X  
X  	while(more==TRUE) {
X  		points=MAXPTS;
X+ 		country=0;
X  		/*find valid nation number type*/
X  		for(i=1;i<NTOTAL;i++)
X  			if(ntn[i].active==INACTIVE) {
X**************
X*** 139,145
X  			}
X  		printf("first valid nation id is %d\n",country);
X  
X! 		if(i==NTOTAL) {
X  			beep();
X  			printf("error, cant add new nation\n");
X  			return;
X--- 139,145 -----
X  			}
X  		printf("first valid nation id is %d\n",country);
X  
X! 		if(country==0) {
X  			beep();
X  			printf("error, cant add new nation\n");
X  			return;
X**************
X*** 389,395
X  				printf("how many points to spend on population:");
X  				scanf("%d",&temp);
X  				putchar('\n');
X! 				if(points >= temp) {
X  					points -= temp;
X  					curntn->tciv+=temp*NLPOP;
X  				}
X--- 389,397 -----
X  				printf("how many points to spend on population:");
X  				scanf("%d",&temp);
X  				putchar('\n');
X! 				if(points <= 0) {
X! 					printf("Purchase aborted...");
X! 				} if(points >= temp) {
X  					points -= temp;
X  					curntn->tciv+=temp*NLPOP;
X  				}
X**************
X*** 401,408
X  				printf("how many points to spend on added gold talons:");
X  				scanf("%d",&temp);
X  				putchar('\n');
X! 				if(points>=temp)
X! 				{
X  					points-=temp;
X  					curntn->tgold+=temp*NLGOLD;
X  				}
X--- 403,411 -----
X  				printf("how many points to spend on added gold talons:");
X  				scanf("%d",&temp);
X  				putchar('\n');
X! 				if(points<=0) {
X! 					printf("Purchase aborted....");
X! 				} else if(points>=temp) {
X  					points-=temp;
X  					curntn->tgold+=temp*NLGOLD;
X  				}
X**************
X*** 429,435
X  				printf("how many points to spend?");
X  				scanf("%d",&temp);
X  				putchar('\n');
X! 				if(points >= temp) {
X  					points -= temp;
X  					curntn->tmil+=temp*NLSOLD;
X  				}
X--- 432,440 -----
X  				printf("how many points to spend?");
X  				scanf("%d",&temp);
X  				putchar('\n');
X! 				if (points <= 0) {
X! 					printf("Purchase aborted...");
X! 				} else if(points >= temp) {
X  					points -= temp;
X  					curntn->tmil+=temp*NLSOLD;
X  				}
X**************
X*** 445,451
X  				printf("how many points do you wish to spend?");
X  				scanf("%d",&temp);
X  				putchar('\n');
X! 				if(points >= temp) {
X  					points -= temp;
X  					if(curntn->race == ORC )
X  					curntn->aplus+=temp*NLATTACK/2;
X--- 450,458 -----
X  				printf("how many points do you wish to spend?");
X  				scanf("%d",&temp);
X  				putchar('\n');
X! 				if(points <= 0) {
X! 					printf("Purchase aborted...");
X! 				} else if(points >= temp) {
X  					points -= temp;
X  					if(curntn->race == ORC )
X  					curntn->aplus+=temp*NLATTACK/2;
X**************
X*** 468,474
X  				printf("how many points do you wish to spend?");
X  				scanf("%d",&temp);
X  				putchar('\n');
X! 				if(points >= temp) {
X  					points -= temp;
X  					if(curntn->race == ORC )
X  					curntn->dplus+=temp*NLDEFENCE/2;
X--- 475,483 -----
X  				printf("how many points do you wish to spend?");
X  				scanf("%d",&temp);
X  				putchar('\n');
X! 				if(points <= 0) {
X! 					printf("Purchase aborted...");
X! 				} else if(points >= temp) {
X  					points -= temp;
X  					if(curntn->race == ORC )
X  					curntn->dplus+=temp*NLDEFENCE/2;
X**************
X*** 492,498
X  					printf("you have the maximum rate");
X  					break;
X  				}
X! 				printf("how many percentage points to add?:");
X  				scanf("%d",&temp);
X  				putchar('\n');
X  				if((points >= (temp*NLREPCOST))
X--- 501,507 -----
X  					printf("you have the maximum rate");
X  					break;
X  				}
X! 				printf("how many purchasing points to spend?:");
X  				scanf("%d",&temp);
X  				putchar('\n');
X  				if(temp < points) {
X**************
X*** 495,506
X  				printf("how many percentage points to add?:");
X  				scanf("%d",&temp);
X  				putchar('\n');
X! 				if((points >= (temp*NLREPCOST))
X! 				||((curntn->race==ORC)
X! 					&&(points >= (temp*NLREPCOST/2)))) {
X! 					if((curntn->race!=ORC)
X! 					&&(curntn->repro+NLREPRO*temp>10)){
X! 					printf("that exceeds the 10%% limit");
X  					}
X  					else if((curntn->race==ORC)
X  					&&(curntn->repro>14-NLREPRO_ORC*temp)){
X--- 504,532 -----
X  				printf("how many purchasing points to spend?:");
X  				scanf("%d",&temp);
X  				putchar('\n');
X! 				if(temp < points) {
X! 					printf("You don't have enough points left");
X! 				} else if (temp < 0) {
X! 					printf("Negative, huh?  Who you trying to kid?");
X! 				} else if (temp%NLREPCOST != 0) {
X! 					printf("You must spend in multiples of %d",NLREPCOST);
X! 				} else {
X! 					if(curntn->race != ORC) {
X! 						temp = temp/NLREPCOST*NLREPRO;
X! 						if(curntn->repro+temp > 10) {
X! 							printf("That exceeds the 10% limit");
X! 						} else {
X! 							points -= (temp*NLREPCOST/NLREPRO);
X! 							curntn->repro += temp;
X! 						}
X! 					} else {
X! 						temp = temp/NLREPCOST*NLREPRO_ORC;
X! 						if(curntn->repro+temp > 14) {
X! 							printf("That exceeds the 14% limit");
X! 						} else {
X! 							points -= (temp*NLREPCOST/NLREPRO_ORC);
X! 							curntn->repro += temp;
X! 						}
X  					}
X  				}
X  				break;
X**************
X*** 502,519
X  					&&(curntn->repro+NLREPRO*temp>10)){
X  					printf("that exceeds the 10%% limit");
X  					}
X- 					else if((curntn->race==ORC)
X- 					&&(curntn->repro>14-NLREPRO_ORC*temp)){
X- 					printf("that exceeds the 14%% limit");
X- 					}
X- 					else {
X- 					if(curntn->race==ORC)
X- 						points -= (temp*NLREPCOST/2);
X- 					else	points -= temp*NLREPCOST;
X- 					if(curntn->race==ORC)
X- 						curntn->repro+=NLREPRO_ORC*temp;
X- 					else	curntn->repro+=NLREPRO*temp;
X- 					}
X  				}
X  				else printf("You dont have enough points left");
X  				break;
X--- 528,533 -----
X  							curntn->repro += temp;
X  						}
X  					}
X  				}
X  				break;
X  			case 8:
X**************
X*** 515,521
X  					else	curntn->repro+=NLREPRO*temp;
X  					}
X  				}
X- 				else printf("You dont have enough points left");
X  				break;
X  			case 8:
X  				if(curntn->race == ORC ) {
X--- 529,534 -----
X  						}
X  					}
X  				}
X  				break;
X  			case 8:
X  				if(curntn->race == ORC ) {
X*** odisplay.c
X--- display.c
X**************
X*** 315,322
X  	switch(hilmode){
X  	case HI_MOVE:	/* your armies w/ move left */
X  		for(armynum=0;armynum<MAXARM;armynum++)
X! 			if(( P_ASOLD>0 )
X! 			&&( P_AMOVE>0 )
X  			&&( P_AXLOC==(x+xoffset ))
X  			&&( P_AYLOC==(y+yoffset ))) break;
X  		if(armynum<MAXARM) standout();
X--- 315,322 -----
X  	switch(hilmode){
X  	case HI_MOVE:	/* your armies w/ move left */
X  		for(armynum=0;armynum<MAXARM;armynum++)
X! 			if(( P_ASOLD != 0 )
X! 			&&( P_AMOVE != 0 )
X  			&&( P_AXLOC==(x+xoffset ))
X  			&&( P_AYLOC==(y+yoffset ))) break;
X  		if(armynum<MAXARM) standout();
X**************
X*** 323,329
X  		break;
X  	case HI_YARM:	/* your armies */
X  		for(armynum=0;armynum<MAXARM;armynum++)
X! 			if(( P_ASOLD>0)
X  			&&( P_AXLOC==x+xoffset)
X  			&&( P_AYLOC==y+yoffset)) break;
X  		if(armynum<MAXARM) standout();
X--- 323,329 -----
X  		break;
X  	case HI_YARM:	/* your armies */
X  		for(armynum=0;armynum<MAXARM;armynum++)
X! 			if(( P_ASOLD != 0)
X  			&&( P_AXLOC==x+xoffset)
X  			&&( P_AYLOC==y+yoffset)) break;
X  		if(armynum<MAXARM) standout();
X*** omain.c
X--- main.c
X**************
X*** 68,74
X  #endif SYSMAIL
X  	int sflag=FALSE;
X  
X! 	char defaultdir[256];
X  	struct passwd *getpwnam();
X  	owneruid=getuid();
X  	strcpy(defaultdir, DEFAULTDIR);
X--- 68,74 -----
X  #endif SYSMAIL
X  	int sflag=FALSE;
X  
X! 	char defaultdir[256],tmppass[PASSLTH+1];
X  	struct passwd *getpwnam();
X  	owneruid=getuid();
X  	strcpy(defaultdir, DEFAULTDIR);
X**************
X*** 94,100
X  		putchar('\n');
X  		exit(SUCCESS);
X  	case 'd':
X! 		strcpy(defaultdir, optarg);
X  		break;
X  	case 'n':
X  		strcpy(name, optarg);
X--- 94,104 -----
X  		putchar('\n');
X  		exit(SUCCESS);
X  	case 'd':
X! 		if(optarg[0]!='/') {
X! 			sprintf(defaultdir, "%s/%s", DEFAULTDIR, optarg);
X! 		} else {
X! 			strcpy(defaultdir, optarg);
X! 		}
X  		break;
X  	case 'n':
X  		strcpy(name, optarg);
X**************
X*** 191,197
X  	curntn = &ntn[country];
X  
X  	/*get encrypted password*/
X! 	strncpy(passwd,crypt(getpass("\nwhat is your nation's password:"),SALT),PASSLTH);
X  	if((strncmp(passwd,curntn->passwd,PASSLTH)!=0)
X  	&&(strncmp(passwd,ntn[0].passwd,PASSLTH)!=0)) {
X  		strncpy(passwd,crypt(getpass("\nerror: reenter your nation's password:"),SALT),PASSLTH);
X--- 195,202 -----
X  	curntn = &ntn[country];
X  
X  	/*get encrypted password*/
X! 	strncpy(tmppass,getpass("\nwhat is your nation's password:"),PASSLTH);
X! 	strncpy(passwd,crypt(tmppass,SALT),PASSLTH);
X  	if((strncmp(passwd,curntn->passwd,PASSLTH)!=0)
X  	&&(strncmp(passwd,ntn[0].passwd,PASSLTH)!=0)) {
X  		strncpy(tmppass,getpass("\nerror: reenter your nation's password:"),PASSLTH);
X**************
X*** 194,200
X  	strncpy(passwd,crypt(getpass("\nwhat is your nation's password:"),SALT),PASSLTH);
X  	if((strncmp(passwd,curntn->passwd,PASSLTH)!=0)
X  	&&(strncmp(passwd,ntn[0].passwd,PASSLTH)!=0)) {
X! 		strncpy(passwd,crypt(getpass("\nerror: reenter your nation's password:"),SALT),PASSLTH);
X  		if((strncmp(passwd,curntn->passwd,PASSLTH)!=0)
X  		&&(strncmp(passwd,ntn[0].passwd,PASSLTH)!=0)) {
X  			printf("\nsorry:");
X--- 199,206 -----
X  	strncpy(passwd,crypt(tmppass,SALT),PASSLTH);
X  	if((strncmp(passwd,curntn->passwd,PASSLTH)!=0)
X  	&&(strncmp(passwd,ntn[0].passwd,PASSLTH)!=0)) {
X! 		strncpy(tmppass,getpass("\nerror: reenter your nation's password:"),PASSLTH);
X! 		strncpy(passwd,crypt(tmppass,SALT),PASSLTH);
X  		if((strncmp(passwd,curntn->passwd,PASSLTH)!=0)
X  		&&(strncmp(passwd,ntn[0].passwd,PASSLTH)!=0)) {
X  			printf("\nsorry:");
X**************
X*** 1013,1022
X  	mvaddstr(10,19, "Copyright (c) 1988 by Edward M Barlow");
X  	mvaddstr(11,18,"Written Edward M Barlow and Adam Bryant");
X  	mvaddstr(12,26,"All Rights Reserved");
X! 	mvaddstr(LINES-7,21,"This version is for personal use only");
X! 	mvaddstr(LINES-5,12,"It is expressly forbidden port this software to any form of");
X! 	mvaddstr(LINES-4,12,"Personal Computer or to redistribute this software without");
X! 	mvaddstr(LINES-3,18,"the permission of Edward Barlow or Adam Bryant");
X  	mvprintw(LINES-1, 60, "PRESS ANY KEY");
X  	refresh();
X  }
X--- 1019,1028 -----
X  	mvaddstr(10,19, "Copyright (c) 1988 by Edward M Barlow");
X  	mvaddstr(11,18,"Written Edward M Barlow and Adam Bryant");
X  	mvaddstr(12,26,"All Rights Reserved");
X! 	mvaddstr(LINES-7,19,"This version is for personal use only");
X! 	mvaddstr(LINES-5,8,"It is expressly forbidden port this software to any form of");
X! 	mvaddstr(LINES-4,8,"Personal Computer or to redistribute this software without");
X! 	mvaddstr(LINES-3,14,"the permission of Edward Barlow or Adam Bryant");
X  	mvprintw(LINES-1, 60, "PRESS ANY KEY");
X  	refresh();
X  }
X*** onpc.c
X--- npc.c
X**************
X*** 89,95
X  		if( curntn->active==NPC_NOMAD ) do_nomad();
X  		else if( curntn->active==NPC_PIRATE ) do_pirate();
X  		else if( curntn->active==NPC_BARBARIAN ) do_barbarian();
X! 		else if( curntn->active==NPC_LIZARD ) do_lizard();
X  	}
X  }
X  
X--- 89,95 -----
X  		if( curntn->active==NPC_NOMAD ) do_nomad();
X  		else if( curntn->active==NPC_PIRATE ) do_pirate();
X  		else if( curntn->active==NPC_BARBARIAN ) do_barbarian();
X! 		else if( curntn->active==NPC_LIZARD ) do_lizard(); /* update.c */
X  	}
X  }
X  
X**************
X*** 101,107
X  	int	x, y;
X  
X  	/*move nomads */
X! 	printf("updating nomad nation %d\n",country);
X  	for(armynum=0;armynum<MAXARM;armynum++) if(P_ASOLD>0){
X  		P_ASTAT=ATTACK;
X  		P_AMOVE=(curntn->maxmove * *(unitmove+P_ATYPE%UTYPE))/10;
X--- 101,107 -----
X  	int	x, y;
X  
X  	/*move nomads */
X! 	printf("updating nomad (nation %d)\n",country);
X  	for(armynum=0;armynum<MAXARM;armynum++) if(P_ASOLD>0){
X  		P_ASTAT=ATTACK;
X  		P_AMOVE=(curntn->maxmove * *(unitmove+P_ATYPE%UTYPE))/10;
X**************
X*** 159,165
X  	short armynum;
X  	int x, y;
X  
X! 	printf("updating barbarian nation %d\n",country);
X  	for(armynum=0;armynum<MAXARM;armynum++) if(P_ASOLD>0){
X  		P_ASTAT=ATTACK;
X  		if(P_ATYPE<MINLEADER) {
X--- 159,165 -----
X  	short armynum;
X  	int x, y;
X  
X! 	printf("updating barbarian (nation %d)\n",country);
X  	for(armynum=0;armynum<MAXARM;armynum++) if(P_ASOLD>0){
X  		P_ASTAT=ATTACK;
X  		if(P_ATYPE<MINLEADER) {
X**************
X*** 206,223
X  }
X  
X  void
X- do_lizard()
X- {
X- 	short armynum;
X- 
X- 	printf("updating lizard nation %d\n",country);
X- 	for(armynum=0;armynum<MAXARM;armynum++) if(P_ASOLD>0){
X- 		P_ASOLD*=102;
X- 		P_ASOLD/=100;
X- 	}
X- }
X- 
X- void
X  do_pirate()
X  {
X  	short nvynum,shipsize;
X--- 206,211 -----
X  }
X  
X  void
X  do_pirate()
X  {
X  	short nvynum,shipsize;
X**************
X*** 223,229
X  	short nvynum,shipsize;
X  	int x, y, campx, campy;
X  
X! 	printf("updating pirate nation %d\n",country);
X  
X  	/* if pirate fleet within 3 attack if outnumber any fleets */
X  	/* automatically find their base first */
X--- 211,217 -----
X  	short nvynum,shipsize;
X  	int x, y, campx, campy;
X  
X! 	printf("updating pirate (nation %d)\n",country);
X  
X  	/* if pirate fleet within 3 attack if outnumber any fleets */
X  	/* automatically find their base first */
X*** otxt0
X--- txt0
X**************
X*** 46,52
X  and resources (civilians, troops, metal, gold...).  Play involves building,
X  moving, and controlling armies and navies, diplomacy with other players,
X  and adjusting economic activity, which is primarily geared to the production
X! of gold for your treasury.  Metals are needed, however to build ships & armies,
X  and food is needed to prevent revolts and keep people alive.
X  
X  Command line format: conquer [-hs -nNAT -dDIR]
X--- 46,52 -----
X  and resources (civilians, troops, metal, gold...).  Play involves building,
X  moving, and controlling armies and navies, diplomacy with other players,
X  and adjusting economic activity, which is primarily geared to the production
X! of gold for your treasury.  Also, metals are needed to build ships & armies,
X  and food is needed to prevent revolts and keep people alive.
X  
X  Command line format: conquer [-hs -nNAT -dDIR]
X*** otxt1
X--- txt1
X**************
X*** 55,61
X  Orc nations are very special in Conquer.  The only thing an orc is good at is 
X  making other orcs.  They are slow, poor at combat, & bad in special abilities.
X  They can get reproduction of up to 14% per year (the normal limit is 10%) & 
X! can start with a large number of people as initial reproduction costs are less 
X  than normal.  Orcs are led by monsters (they start with MINOR MONSTER power),
X  and are always evil (the only good orc is a dead orc...).  They are so nasty,
X  EVERYBODY they meet start out hostile (50%) or at war (50%) with them.
X--- 55,61 -----
X  Orc nations are very special in Conquer.  The only thing an orc is good at is 
X  making other orcs.  They are slow, poor at combat, & bad in special abilities.
X  They can get reproduction of up to 14% per year (the normal limit is 10%) & 
X! can start with a large number of people as initial reproduction costs are less
X  than normal.  Orcs are led by monsters (they start with MINOR MONSTER power),
X  and are always evil (the only good orc is a dead orc...).  They are so nasty,
X  EVERYBODY they meet start out hostile (50%) or at war (50%) with them.
X
END_OF_FILE
if test 45250 -ne `wc -c <'patches01'`; then
    echo shar: \"'patches01'\" unpacked with wrong size!
fi
# end of 'patches01'
fi
echo shar: End of shell archive.
exit 0