[comp.sources.games] v05i005: conquer3 - middle earth multi-player game

games@tekred.TEK.COM (07/20/88)

Submitted by: ihnp4!homxc!smile
Comp.sources.games: Volume 5, Issue 5
Archive-name: conquer3/Patch2

	[This has already been posted to comp.sources.games.bugs and is
	 posted here for archival purposes. If you have the latest version
	 of patch you can feed this file directly to patch, otherwise you
	 will have to unshar it first.	-br]

#! /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:  patches02
# Wrapped by billr@saab on Tue Jul 19 09:50:37 1988
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'patches02' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'patches02'\"
else
echo shar: Extracting \"'patches02'\" \(41742 characters\)
sed "s/^X//" >'patches02' <<'END_OF_FILE'
X*** oldadmin.c	Wed Jul 13 09:55:58 1988
X--- admin.c	Wed Jul 13 09:56:10 1988
X*** oldextcmds.c	Wed Jul 13 09:55:59 1988
X--- extcmds.c	Wed Jul 13 09:56:10 1988
X***************
X*** 78,83
X  	if (armynum < 0 || armynum >= MAXARM ||
X  		army2 < 0 || army2 >= MAXARM ||
X  		armynum == army2 ||
X  		ASTAT == SCOUT ||
X  		ntn[country].arm[army2].stat == SCOUT ||
X  		ATYPE >= MINMONSTER ||
X
X--- 78,87 -----
X  	if (armynum < 0 || armynum >= MAXARM ||
X  		army2 < 0 || army2 >= MAXARM ||
X  		armynum == army2 ||
X+ #ifdef TRADE
X+ 		ASTAT == TRADED ||
X+ 		ntn[country].arm[army2].stat == TRADED ||
X+ #endif TRADE
X  		ASTAT == SCOUT ||
X  		ntn[country].arm[army2].stat == SCOUT ||
X  		ATYPE >= MINMONSTER ||
X***************
X*** 102,107
X  change_status(armynum,new_stat)
X  int armynum,new_stat;
X  {
X  	if (armynum < 0 || armynum >= MAXARM || ASTAT==SCOUT) {
X  		errormsg("Selected army not legal");
X  		return;
X
X--- 106,114 -----
X  change_status(armynum,new_stat)
X  int armynum,new_stat;
X  {
X+ #ifdef TRADE
X+ 	if (armynum < 0 || armynum >= MAXARM || ASTAT==SCOUT || ASTAT==TRADED) {
X+ #else
X  	if (armynum < 0 || armynum >= MAXARM || ASTAT==SCOUT) {
X  #endif TRADE
X  		errormsg("Selected army not legal");
X***************
X*** 103,108
X  int armynum,new_stat;
X  {
X  	if (armynum < 0 || armynum >= MAXARM || ASTAT==SCOUT) {
X  		errormsg("Selected army not legal");
X  		return;
X  	}
X
X--- 110,116 -----
X  	if (armynum < 0 || armynum >= MAXARM || ASTAT==SCOUT || ASTAT==TRADED) {
X  #else
X  	if (armynum < 0 || armynum >= MAXARM || ASTAT==SCOUT) {
X+ #endif TRADE
X  		errormsg("Selected army not legal");
X  		return;
X  	}
X***************
X*** 124,131
X  		errormsg("sorry -- army is monster");
X  		return;
X  	}
X! 
X! 	if(men<0 || armynum < 0 || armynum >= MAXARM || ASOLD < men+25 ) {
X  		errormsg("Selected army too small or illegal");
X  		return;
X  	}
X
X--- 132,142 -----
X  		errormsg("sorry -- army is monster");
X  		return;
X  	}
X! #ifdef TRADE
X! 	if(men<0 || armynum < 0 || armynum >= MAXARM || ASOLD < men+25 || ASTAT==TRADED) {
X! #else 
X! 	if(men<0 || armynum < 0 || armynum >= MAXARM || ASOLD < men+25) {
X! #endif TRADE
X  		errormsg("Selected army too small or illegal");
X  		return;
X  	}
X*** oldmakeworld.c	Wed Jul 13 09:55:55 1988
X--- makeworld.c	Wed Jul 13 09:56:11 1988
X*** oldrandevent.c	Wed Jul 13 09:55:56 1988
X--- randevent.c	Wed Jul 13 09:56:13 1988
X*** oldcexecute.c	Wed Jul 13 09:56:02 1988
X--- cexecute.c	Wed Jul 13 09:56:13 1988
X***************
X*** 15,21
X  #include "data.h"
X  extern long startgold;
X  extern short country;
X! extern FILE *fexe;
X  
X  int
X  execute()
X
X--- 15,21 -----
X  #include "data.h"
X  extern long startgold;
X  extern short country;
X! extern FILE *fexe,*fison;
X  
X  int
X  execute()
X***************
X*** 36,42
X  
X  	/* initialize i_people */
X  	for(x=0;x<MAPX;x++)
X! 		for(y=0;y<MAPX;y++)
X  			if(( sct[x][y].owner == country)&&
X  			((sct[x][y].designation == DCITY)
X  			||( sct[x][y].designation == DCAPITOL)))
X
X--- 36,42 -----
X  
X  	/* initialize i_people */
X  	for(x=0;x<MAPX;x++)
X! 		for(y=0;y<MAPY;y++)
X  			if(( sct[x][y].owner == country)&&
X  			((sct[x][y].designation == DCITY)
X  			||( sct[x][y].designation == DCAPITOL)))
X***************
X*** 200,205
X  	fputs("END\n",fp);
X  
X  	fclose(fp);
X  	/* exit program */
X  	exit(FAIL);
X  }
X
X--- 200,207 -----
X  	fputs("END\n",fp);
X  
X  	fclose(fp);
X+ 	/* remove the lock file */
X+ 	unlink(fison);
X  	/* exit program */
X  	exit(FAIL);
X  }
X*** oldforms.c	Wed Jul 13 09:55:57 1988
X--- forms.c	Wed Jul 13 09:56:13 1988
X***************
X*** 252,258
X  void
X  change()
X  {
X! 	char string[10];
X  	int i, cbonus;
X  	short armynum;
X  	char passwd[8];
X
X--- 252,258 -----
X  void
X  change()
X  {
X! 	char string[10], command[80];
X  	int i, cbonus;
X  	short armynum;
X  	char passwd[8];
X***************
X*** 284,291
X  	mvprintw(5,(COLS/2), "defense bonus..........+%2d",ntn[country].dplus);
X  	mvprintw(6,(COLS/2), "maximum move rate.......%2d",ntn[country].maxmove);
X  	mvprintw(7,(COLS/2), "reproduction rate......%2d%%",ntn[country].repro);
X! 	mvprintw(9,(COLS/2), "gold talons.....$%8ld",ntn[country].tgold);
X! 	mvprintw(10,(COLS/2),"jewels .........$%8ld",ntn[country].jewels);
X  	mvprintw(11,(COLS/2),"iron & minerals...%8ld",ntn[country].tiron);
X  	if(ntn[country].tfood<2*ntn[country].tciv) standout();
X  	mvprintw(12,(COLS/2),"food in granary...%8ld",ntn[country].tfood);
X
X--- 284,291 -----
X  	mvprintw(5,(COLS/2), "defense bonus..........+%2d",ntn[country].dplus);
X  	mvprintw(6,(COLS/2), "maximum move rate.......%2d",ntn[country].maxmove);
X  	mvprintw(7,(COLS/2), "reproduction rate......%2d%%",ntn[country].repro);
X! 	mvprintw(9,(COLS/2), "gold talons......$%8ld",ntn[country].tgold);
X! 	mvprintw(10,(COLS/2),"jewels ..........$%8ld",ntn[country].jewels);
X  	mvprintw(11,(COLS/2),"iron & minerals...%8ld",ntn[country].tiron);
X  	if(ntn[country].tfood<2*ntn[country].tciv) standout();
X  	mvprintw(12,(COLS/2),"food in granary...%8ld",ntn[country].tfood);
X***************
X*** 303,309
X  	if(magic(country,VAMPIRE)!=1)
X  		mvaddstr(21,(COLS/2)-14,"HIT 3 TO ADD TO YOUR COMBAT BONUS");
X  	else	mvaddstr(21,(COLS/2)-17,"( VAMPIRES MAY NOT ADD TO COMBAT BONUS )");
X- 	if(isgod==TRUE) mvaddstr(22,(COLS/2)-9,"HIT 4 TO DESTROY NATION");
X  
X  	standend();
X  	refresh();
X
X--- 303,308 -----
X  	if(magic(country,VAMPIRE)!=1)
X  		mvaddstr(21,(COLS/2)-14,"HIT 3 TO ADD TO YOUR COMBAT BONUS");
X  	else	mvaddstr(21,(COLS/2)-17,"( VAMPIRES MAY NOT ADD TO COMBAT BONUS )");
X  
X  #ifdef OGOD
X   	if(isgod==TRUE) mvaddstr(22,(COLS/2)-21,"HIT 4 TO DESTROY NATION OR 5 TO CHANGE TREASURY");
X***************
X*** 305,310
X  	else	mvaddstr(21,(COLS/2)-17,"( VAMPIRES MAY NOT ADD TO COMBAT BONUS )");
X  	if(isgod==TRUE) mvaddstr(22,(COLS/2)-9,"HIT 4 TO DESTROY NATION");
X  
X  	standend();
X  	refresh();
X  	switch(getch()){
X
X--- 304,314 -----
X  		mvaddstr(21,(COLS/2)-14,"HIT 3 TO ADD TO YOUR COMBAT BONUS");
X  	else	mvaddstr(21,(COLS/2)-17,"( VAMPIRES MAY NOT ADD TO COMBAT BONUS )");
X  
X+ #ifdef OGOD
X+  	if(isgod==TRUE) mvaddstr(22,(COLS/2)-21,"HIT 4 TO DESTROY NATION OR 5 TO CHANGE TREASURY");
X+ #else OGOD
X+   	if(isgod==TRUE) mvaddstr(22,(COLS/2)-9,"HIT 4 TO DESTROY NATION");
X+ #endif OGOD
X  	standend();
X  	refresh();
X  	switch(getch()){
X***************
X*** 437,443
X  			refresh();
X  
X  			if(getch()=='y') {
X! 				if ((fnews=fopen(newsfile,"w"))==NULL) {
X  					printf("error opening news file\n");
X  					exit(FAIL);
X  				}
X
X--- 441,447 -----
X  			refresh();
X  
X  			if(getch()=='y') {
X! 				if ((fnews=fopen(newsfile,"a+"))==NULL) {
X  					printf("error opening news file\n");
X  					exit(FAIL);
X  				}
X***************
X*** 443,448
X  				}
X  				destroy(country);
X  				fclose(fnews);
X  			}
X  		}
X  		break;
X
X--- 447,455 -----
X  				}
X  				destroy(country);
X  				fclose(fnews);
X+ 				sprintf(command,"sort -n -o %s %s ",
X+ 					newsfile, newsfile);
X+ 				system(command);
X  			}
X  		}
X  		break;
X***************
X*** 446,451
X  			}
X  		}
X  		break;
X  	default:
X  		if(isgod==TRUE) country=0;
X  		return;
X
X--- 453,470 -----
X  			}
X  		}
X  		break;
X+ #ifdef OGOD
X+ 	case '5':
X+ 		if (isgod==TRUE) {
X+ 			/* adjust treasury */
X+ 			mvaddstr(0,0,"WHAT IS NEW TOTAL OF TREASURY?");
X+ 			refresh();
X+ 			i = get_number();
X+ 			/* as god it will be saved nothing else needed */
X+ 			ntn[country].tgold = (long) i;
X+ 		}
X+ 		break;
X+ #endif OGOD
X  	default:
X  		if(isgod==TRUE) country=0;
X  		return;
X*** oldmisc.c	Wed Jul 13 09:55:54 1988
X--- misc.c	Wed Jul 13 09:56:13 1988
X***************
X*** 943,949
X  		} /* switch */
X  	} /* for */
X  
X! 	for(x=0;x<MAPX;x++) for(y=0;y<MAPX;y++){
X  		sptr = &sct[x][y];
X  
X  		if(race==GOD) movecost[x][y] = 0;
X
X--- 943,949 -----
X  		} /* switch */
X  	} /* for */
X  
X! 	for(x=0;x<MAPX;x++) for(y=0;y<MAPY;y++){
X  		sptr = &sct[x][y];
X  
X  		if(race==GOD) movecost[x][y] = 0;
X*** oldreports.c	Wed Jul 13 09:55:58 1988
X--- reports.c	Wed Jul 13 09:56:13 1988
X***************
X*** 48,54
X  		standend();
X  		refresh();
X  		country = get_number();
X! 		if(country<0||country>NTOTAL) return;
X  	}
X  	armynum=0;
X  	/*new army screen*/
X
X--- 48,54 -----
X  		standend();
X  		refresh();
X  		country = get_number();
X! 		if(country<0||country>NTOTAL) { country=0; return; }
X  	}
X  	armynum=0;
X  	/*new army screen*/
X***************
X*** 104,110
X  			clrtoeol();
X  			refresh();
X  			armynum = get_number();
X! 			if((armynum<0)||(armynum>MAXARM)) return;
X  			if(ATYPE<99)
X  			mvaddstr(18,0,"1) CHANGE STATUS, 2) TRANSFER / MERGE, 3) SPLIT ARMY, 4) DISBAND ARMY");
X  			else mvaddstr(18,0,"1) CHANGE STATUS, 4) DISBAND ARMY:");
X
X--- 104,120 -----
X  			clrtoeol();
X  			refresh();
X  			armynum = get_number();
X! 			if((armynum<0)||(armynum>MAXARM)) {
X! 				if (isgod==TRUE) country=0;
X! 				return;
X! 			}
X! #ifdef TRADE
X! 			if(ASTAT==TRADED) {
X! 				errormsg("May not change traded army");
X! 				if (isgod==TRUE) country=0;
X! 				return;
X! #endif TRADe
X! 			}
X  			if(ATYPE<99)
X  			mvaddstr(18,0,"1) CHANGE STATUS, 2) TRANSFER / MERGE, 3) SPLIT ARMY, 4) DISBAND ARMY");
X  			else mvaddstr(18,0,"1) CHANGE STATUS, 4) DISBAND ARMY:");
X***************
X*** 109,114
X  			mvaddstr(18,0,"1) CHANGE STATUS, 2) TRANSFER / MERGE, 3) SPLIT ARMY, 4) DISBAND ARMY");
X  			else mvaddstr(18,0,"1) CHANGE STATUS, 4) DISBAND ARMY:");
X  			clrtoeol();
X  			if(isgod==TRUE) mvaddstr(20,0,"5) LOCATION, 6) SOLDIERS:");
X  			refresh();
X  			switch(getch()){
X
X--- 119,125 -----
X  			mvaddstr(18,0,"1) CHANGE STATUS, 2) TRANSFER / MERGE, 3) SPLIT ARMY, 4) DISBAND ARMY");
X  			else mvaddstr(18,0,"1) CHANGE STATUS, 4) DISBAND ARMY:");
X  			clrtoeol();
X+ #ifdef OGOD
X  			if(isgod==TRUE) mvaddstr(20,0,"5) LOCATION, 6) SOLDIERS:");
X  			refresh();
X  			switch(getch()){
X***************
X*** 362,367
X  		standend();
X  		done=TRUE;
X  		refresh();
X  		if(isgod==TRUE) country=0;
X  		return;
X  	}
X
X--- 373,379 -----
X  		standend();
X  		done=TRUE;
X  		refresh();
X+  		getch();
X  		if(isgod==TRUE) country=0;
X  		return;
X  	}
X***************
X*** 378,384
X  		mvaddstr(4,0, "merchant :");
X  		mvaddstr(5,0, "x location:");
X  		mvaddstr(6,0, "y location:");
X! 		mvaddstr(7,0,"move left :");
X  
X  		position=5;
X  		count=0;
X
X--- 390,397 -----
X  		mvaddstr(4,0, "merchant :");
X  		mvaddstr(5,0, "x location:");
X  		mvaddstr(6,0, "y location:");
X!  		mvaddstr(7,0, "crew:");
X! 		mvaddstr(8,0,"move left :");
X  
X  		position=5;
X  		count=0;
X***************
X*** 393,399
X  				mvprintw(4,position,"%d",NMER);
X  				mvprintw(5,position,"%d",NXLOC);
X  				mvprintw(6,position,"%d",NYLOC);
X! 				mvprintw(7,position,"%d",NMOVE);
X  			}
X  			nvynum++;
X  		}
X
X--- 406,413 -----
X  				mvprintw(4,position,"%d",NMER);
X  				mvprintw(5,position,"%d",NXLOC);
X  				mvprintw(6,position,"%d",NYLOC);
X! 				mvprintw(7,position,"%d",NCREW/(NWAR+NMER));
X! 				mvprintw(8,position,"%d",NMOVE);
X  			}
X  			nvynum++;
X  		}
X***************
X*** 409,414
X  		if (navy=='\n'){
X  			mvaddstr(16,0,"WHAT NAVY DO YOU WANT TO CHANGE:");
X  			clrtoeol();
X  			refresh();
X  			nvynum = get_number();
X  			if((nvynum<0)||(nvynum>MAXNAVY)) return;
X
X--- 423,429 -----
X  		if (navy=='\n'){
X  			mvaddstr(16,0,"WHAT NAVY DO YOU WANT TO CHANGE:");
X  			clrtoeol();
X+ #endif OGOD
X  			refresh();
X  			nvynum = get_number();
X  #ifdef TRADE
X***************
X*** 411,416
X  			clrtoeol();
X  			refresh();
X  			nvynum = get_number();
X  			if((nvynum<0)||(nvynum>MAXNAVY)) return;
X  			mvaddstr(18,0,"1) TRANSFER / MERGE, 2) SPLIT NAVY, 3) DISBAND NAVY:");
X  			clrtoeol();
X
X--- 426,440 -----
X  #endif OGOD
X  			refresh();
X  			nvynum = get_number();
X+ #ifdef TRADE
X+ 			if (ntn[country].nvy[nvynum].armynum==TRADED) {
X+ 				mvaddstr(23,0,"SORRY - THAT NAVY IS UP FOR TRADE");
X+ 				refresh();
X+ 				getch();
X+ 				if (isgod==TRUE) country=0;
X+ 				return;
X+ 			}
X+ #endif TRADE
X  			if((nvynum<0)||(nvynum>MAXNAVY)) return;
X  			mvaddstr(18,0,"1) TRANSFER / MERGE, 2) SPLIT NAVY, 3) DISBAND NAVY:");
X    			clrtoeol();
X***************
X*** 413,418
X  			nvynum = get_number();
X  			if((nvynum<0)||(nvynum>MAXNAVY)) return;
X  			mvaddstr(18,0,"1) TRANSFER / MERGE, 2) SPLIT NAVY, 3) DISBAND NAVY:");
X  			clrtoeol();
X  			refresh();
X  			switch(getch()){
X
X--- 437,445 -----
X  #endif TRADE
X  			if((nvynum<0)||(nvynum>MAXNAVY)) return;
X  			mvaddstr(18,0,"1) TRANSFER / MERGE, 2) SPLIT NAVY, 3) DISBAND NAVY:");
X+   			clrtoeol();
X+ #ifdef OGOD
X+ 			if(isgod==TRUE) mvaddstr(19,0,"4) ADJUST SHIPS, 5) LOCATION, 6) CREW");
X  			clrtoeol();
X  #endif OGOD
X  			refresh();
X***************
X*** 414,419
X  			if((nvynum<0)||(nvynum>MAXNAVY)) return;
X  			mvaddstr(18,0,"1) TRANSFER / MERGE, 2) SPLIT NAVY, 3) DISBAND NAVY:");
X  			clrtoeol();
X  			refresh();
X  			switch(getch()){
X  			case '1':
X
X--- 441,447 -----
X  #ifdef OGOD
X  			if(isgod==TRUE) mvaddstr(19,0,"4) ADJUST SHIPS, 5) LOCATION, 6) CREW");
X  			clrtoeol();
X+ #endif OGOD
X  			refresh();
X  			switch(getch()){
X  			case '1':
X***************
X*** 424,429
X  				clrtoeol();
X  				refresh();
X  				nvynum = get_number();
X  				if(nvynum==oldnavy) {
X  					mvprintw(23,0,"SORRY -- SAME NAVY (%d,%d)",nvynum,oldnavy);
X  					refresh();
X
X--- 452,464 -----
X  				clrtoeol();
X  				refresh();
X  				nvynum = get_number();
X+ #ifdef TRADE
X+ 				if (ntn[country].nvy[nvynum].armynum==TRADED) {
X+ 					mvaddstr(23,0,"SORRY - THAT NAVY IS UP FOR TRADE");
X+ 					refresh();
X+ 					getch();
X+ 				} else
X+ #endif TRADE
X  				if(nvynum==oldnavy) {
X  					mvprintw(23,0,"SORRY -- SAME NAVY (%d,%d)",nvynum,oldnavy);
X  					refresh();
X***************
X*** 505,510
X  				NMER=0;
X  				NADJSHP;
X  				break;
X  			default:
X  				mvaddstr(21,0,"ERROR : HIT ANY CHAR TO CONTINUE");
X  				clrtoeol();
X
X--- 540,589 -----
X  				NMER=0;
X  				NADJSHP;
X  				break;
X+ 			case '4':
X+ 				if (isgod==TRUE) {
X+ 					/* ADJUST SHIPS */
X+ 					mvaddstr(21,0,"HOW MANY WAR SHIPS: ");
X+ 					refresh();
X+ 					wships = get_number();
X+ 					NWAR = wships;
X+ 					mvaddstr(22,0,"HOW MANY MERCHANT SHIPS: ");
X+ 					refresh();
X+ 					mships = get_number();
X+ 					NMER = mships;
X+ 					NADJSHP;
X+ 				}
X+ 				break;
X+ #ifdef OGOD
X+ 			case '5':
X+ 				if (isgod==TRUE) {
X+ 					/*X LOCATION*/
X+ 					mvaddstr(21,0,"WHAT IS THE NEW X LOC: ");
X+ 					refresh();
X+ 					wships = get_number();
X+ 					if (wships>=0 && wships<MAPX)
X+ 						NXLOC=wships;
X+ 					/*Y LOCATION*/
X+ 					mvaddstr(22,0,"WHAT IS THE NEW Y LOC: ");
X+ 					refresh();
X+ 					wships = get_number();
X+ 					if (wships>=0 && wships<MAPY)
X+ 						NYLOC=wships;
X+ 					NADJLOC;
X+ 				}
X+ 				break;
X+ 			case '6':
X+ 				if (isgod==TRUE) {
X+ 					/* ADJUST CREWSIZE */
X+ 					mvaddstr(21,0,"WHAT VALUE FOR CREW PER SHIP: ");
X+ 					refresh();
X+ 					wships = get_number();
X+ 					if (wships>=0 && wships<=SHIPCREW)
X+ 						NCREW = wships*(NMER+NWAR);
X+ 					NADJCRW;
X+ 				}
X+ 				break;
X+ #endif OGOD
X  			default:
X  				mvaddstr(21,0,"ERROR : HIT ANY CHAR TO CONTINUE");
X  				clrtoeol();
X*** oldcombat.c	Wed Jul 13 09:55:53 1988
X--- combat.c	Wed Jul 13 09:56:14 1988
X***************
X*** 611,617
X  
X  	for(x= xsctr-1; x<=xsctr+1; x++)
X  	for(y= ysctr-1; y<=ysctr+1; y++) if(ONMAP){
X! 		if(tofood(sct[x][y].vegetation,0)==0) continue;
X  		if(((sct[x][y].owner == nation)
X  		   ||(ntn[sct[x][y].owner].dstatus[nation] < NEUTRAL))
X  		||(solds_in_sector( x, y, sct[x][y].owner) == 0)){
X
X--- 611,618 -----
X  
X  	for(x= xsctr-1; x<=xsctr+1; x++)
X  	for(y= ysctr-1; y<=ysctr+1; y++) if(ONMAP){
X! 		if(tofood(sct[x][y].vegetation,
X! 			sct[x][y].owner == country ? country : 0)==0) continue;
X  		if(((sct[x][y].owner == nation)
X  		   ||(ntn[sct[x][y].owner].dstatus[nation] < NEUTRAL))
X  		||(solds_in_sector( x, y, sct[x][y].owner) == 0)){
X***************
X*** 653,658
X  	int sailor;
X  	char tempmsg[15];
X  	int aship=0,dship=0;    /*a's and d's total war ships*/
X  	int asunk=0,dsunk=0;    /*a's and d's losses for the round*/
X  	int amsunk=0,dmsunk=0;  /*a's and d's msunks for the round*/
X  	register int done,i,j,k;
X
X--- 654,660 -----
X  	int sailor;
X  	char tempmsg[15];
X  	int aship=0,dship=0;    /*a's and d's total war ships*/
X+ 	int acrew=0,dcrew=0;    /*a's and d's warship crew*/
X  	int asunk=0,dsunk=0;    /*a's and d's losses for the round*/
X  	int amsunk=0,dmsunk=0;  /*a's and d's msunks for the round*/
X  	int amcapt=0,dmcapt=0;  /*a's and d's mcaptures the the round*/
X***************
X*** 655,660
X  	int aship=0,dship=0;    /*a's and d's total war ships*/
X  	int asunk=0,dsunk=0;    /*a's and d's losses for the round*/
X  	int amsunk=0,dmsunk=0;  /*a's and d's msunks for the round*/
X  	register int done,i,j,k;
X  
X  	/* determine who is attacker & who is on defenders side?*/
X
X--- 657,664 -----
X  	int acrew=0,dcrew=0;    /*a's and d's warship crew*/
X  	int asunk=0,dsunk=0;    /*a's and d's losses for the round*/
X  	int amsunk=0,dmsunk=0;  /*a's and d's msunks for the round*/
X+ 	int amcapt=0,dmcapt=0;  /*a's and d's mcaptures the the round*/
X+ 	int akcrew=0,dkcrew=0;  /*a's and d's crew losses for the round*/
X  	register int done,i,j,k;
X  
X  	/* determine who is attacker & who is on defenders side?*/
X***************
X*** 676,681
X  	for(j=0;j<MGKNUM;j++) if(owner[j]!=(-1)){
X  		if(side[j]==DFND) {
X  			dship+=ntn[owner[j]].nvy[unit[j]].warships;
X  		}
X  		else if(side[j]==ATKR) {
X  			aship+=ntn[owner[j]].nvy[unit[j]].warships;
X
X--- 680,689 -----
X  	for(j=0;j<MGKNUM;j++) if(owner[j]!=(-1)){
X  		if(side[j]==DFND) {
X  			dship+=ntn[owner[j]].nvy[unit[j]].warships;
X+ 			dcrew+=ntn[owner[j]].nvy[unit[j]].crew *
X+ 				ntn[owner[j]].nvy[unit[j]].warships /
X+ 				(ntn[owner[j]].nvy[unit[j]].warships+
X+ 				ntn[owner[j]].nvy[unit[j]].merchant);
X  		}
X  		else if(side[j]==ATKR) {
X  			aship+=ntn[owner[j]].nvy[unit[j]].warships;
X***************
X*** 679,684
X  		}
X  		else if(side[j]==ATKR) {
X  			aship+=ntn[owner[j]].nvy[unit[j]].warships;
X  		}
X  	}
X  
X
X--- 687,696 -----
X  		}
X  		else if(side[j]==ATKR) {
X  			aship+=ntn[owner[j]].nvy[unit[j]].warships;
X+ 			acrew+=ntn[owner[j]].nvy[unit[j]].crew *
X+ 				ntn[owner[j]].nvy[unit[j]].warships /
X+ 				(ntn[owner[j]].nvy[unit[j]].warships+
X+ 				ntn[owner[j]].nvy[unit[j]].merchant);
X  		}
X  	}
X  
X***************
X*** 684,689
X  
X  	/*no bonus currently included in this combat*/
X  
X  	/*each warship can do damage 40%; once all warships sunk then all*/
X  	/*sunk are captured merchant*/
X  	sailor=FALSE;
X
X--- 696,705 -----
X  
X  	/*no bonus currently included in this combat*/
X  
X+ 	/*calculate ability of crew*/
X+ 	acrew = 100*acrew/aship*SHIPCREW;
X+ 	dcrew = 100*dcrew/dship*SHIPCREW;
X+ 
X  	/*each warship can do damage 40%; once all warships sunk then all*/
X  	/*sunk are captured merchant*/
X  	sailor=FALSE;
X***************
X*** 689,696
X  	sailor=FALSE;
X  	for(j=0;j<MGKNUM;j++) if(owner[j]!=(-1)) if(side[j]==ATKR)
X  		if(magic(owner[j],SAILOR)==TRUE) sailor=TRUE;
X! 	if(sailor==TRUE) for(i=0;i<aship;i++) if(rand()%10<=5) dsunk++;
X! 	else for(i=0;i<aship;i++) if(rand()%10<=3) dsunk++;
X  
X  	sailor=FALSE;
X  	for(j=0;j<MGKNUM;j++) if(owner[j]!=(-1)) if(side[j]==DFND)
X
X--- 705,712 -----
X  	sailor=FALSE;
X  	for(j=0;j<MGKNUM;j++) if(owner[j]!=(-1)) if(side[j]==ATKR)
X  		if(magic(owner[j],SAILOR)==TRUE) sailor=TRUE;
X! 	if(sailor==TRUE) for(i=0;i<aship;i++) if(acrew*(rand()%100)/100<=50) dsunk++;
X! 	else for(i=0;i<aship;i++) if(acrew*(rand()%100)/100<=30) dsunk++;
X  
X  	sailor=FALSE;
X  	for(j=0;j<MGKNUM;j++) if(owner[j]!=(-1)) if(side[j]==DFND)
X***************
X*** 695,702
X  	sailor=FALSE;
X  	for(j=0;j<MGKNUM;j++) if(owner[j]!=(-1)) if(side[j]==DFND)
X  		if(magic(owner[j],SAILOR)==TRUE) sailor=TRUE;
X! 	if(sailor==TRUE) for(i=0;i<dship;i++) if(rand()%10<=4) asunk++;
X! 	else for(i=0;i<dship;i++) if(rand()%10<=3) asunk++;
X  
X  #ifdef HIDELOC
X  	fprintf(fnews,"4.\tNaval Battle occurs");
X
X--- 711,718 -----
X  	sailor=FALSE;
X  	for(j=0;j<MGKNUM;j++) if(owner[j]!=(-1)) if(side[j]==DFND)
X  		if(magic(owner[j],SAILOR)==TRUE) sailor=TRUE;
X! 	if(sailor==TRUE) for(i=0;i<dship;i++) if(dcrew*(rand()%100)/100<=40) asunk++;
X! 	else for(i=0;i<dship;i++) if(dcrew*(rand()%100)/100<=30) asunk++;
X  
X  #ifdef HIDELOC
X  	fprintf(fnews,"4.\tNaval Battle occurs");
X***************
X*** 739,744
X  	ntn[owner[0]].nvy[unit[0]].xloc,
X  	ntn[owner[0]].nvy[unit[0]].yloc,max(0,dsunk-dship));
X  #endif
X  
X  	for(i=0;i<MGKNUM;i++) if(owner[i]!=(-1)){
X  		if((asunk>0)&&(side[i]==ATKR)){
X
X--- 755,771 -----
X  	ntn[owner[0]].nvy[unit[0]].xloc,
X  	ntn[owner[0]].nvy[unit[0]].yloc,max(0,dsunk-dship));
X  #endif
X+ 	/*calculate crew losses:  all on ships sunk plus percentage*/
X+ 	if (asunk > aship) {
X+ 		akcrew = asunk * SHIPCREW + SHIPCREW*(asunk-aship)*asunk/(asunk+dsunk);
X+ 		amsunk = asunk -aship;
X+ 	} else
X+ 		akcrew = aship * SHIPCREW;
X+ 	if (dsunk > dship) {
X+ 		dkcrew = dsunk * SHIPCREW + SHIPCREW*(dsunk-dship)*dsunk/(dsunk+asunk);
X+ 		dmsunk = dsunk -dship;
X+ 	} else
X+ 		dkcrew = dship * SHIPCREW;
X  
X  	/*work warship and crew losses per navy*/
X  	for(i=0;i<MGKNUM;i++) if(owner[i]!=(-1)){
X***************
X*** 740,745
X  	ntn[owner[0]].nvy[unit[0]].yloc,max(0,dsunk-dship));
X  #endif
X  
X  	for(i=0;i<MGKNUM;i++) if(owner[i]!=(-1)){
X  		if((asunk>0)&&(side[i]==ATKR)){
X  			if(asunk > aship ) {
X
X--- 767,773 -----
X  	} else
X  		dkcrew = dship * SHIPCREW;
X  
X+ 	/*work warship and crew losses per navy*/
X  	for(i=0;i<MGKNUM;i++) if(owner[i]!=(-1)){
X  		if((asunk>0)&&(side[i]==ATKR)){
X  			ntn[owner[i]].nvy[unit[i]].crew -= akcrew * ntn[owner[i]].nvy[unit[i]].warships/aship;
X***************
X*** 742,747
X  
X  	for(i=0;i<MGKNUM;i++) if(owner[i]!=(-1)){
X  		if((asunk>0)&&(side[i]==ATKR)){
X  			if(asunk > aship ) {
X  				ntn[owner[i]].nvy[unit[i]].warships=0;
X  				amsunk = asunk - aship;
X
X--- 770,776 -----
X  	/*work warship and crew losses per navy*/
X  	for(i=0;i<MGKNUM;i++) if(owner[i]!=(-1)){
X  		if((asunk>0)&&(side[i]==ATKR)){
X+ 			ntn[owner[i]].nvy[unit[i]].crew -= akcrew * ntn[owner[i]].nvy[unit[i]].warships/aship;
X  			if(asunk > aship ) {
X  				ntn[owner[i]].nvy[unit[i]].warships=0;
X  			} else  {
X***************
X*** 744,750
X  		if((asunk>0)&&(side[i]==ATKR)){
X  			if(asunk > aship ) {
X  				ntn[owner[i]].nvy[unit[i]].warships=0;
X- 				amsunk = asunk - aship;
X  			} else  {
X  				ntn[owner[i]].nvy[unit[i]].warships -= asunk * ntn[owner[i]].nvy[unit[i]].warships/aship;
X  			}
X
X--- 773,778 -----
X  			ntn[owner[i]].nvy[unit[i]].crew -= akcrew * ntn[owner[i]].nvy[unit[i]].warships/aship;
X  			if(asunk > aship ) {
X  				ntn[owner[i]].nvy[unit[i]].warships=0;
X  			} else  {
X  				ntn[owner[i]].nvy[unit[i]].warships -= asunk * ntn[owner[i]].nvy[unit[i]].warships/aship;
X  			}
X***************
X*** 750,755
X  			}
X  		}
X  		else if((dsunk>0)&&(side[i]==DFND)){
X  			if(dsunk > dship ) {
X  				ntn[owner[i]].nvy[unit[i]].warships=0;
X  				dmsunk = dsunk -dship;
X
X--- 778,784 -----
X  			}
X  		}
X  		else if((dsunk>0)&&(side[i]==DFND)){
X+ 			ntn[owner[i]].nvy[unit[i]].crew -= dkcrew * ntn[owner[i]].nvy[unit[i]].warships/dship;
X  			if(dsunk > dship ) {
X  				ntn[owner[i]].nvy[unit[i]].warships=0;
X  			} else  {
X***************
X*** 752,758
X  		else if((dsunk>0)&&(side[i]==DFND)){
X  			if(dsunk > dship ) {
X  				ntn[owner[i]].nvy[unit[i]].warships=0;
X- 				dmsunk = dsunk -dship;
X  			} else  {
X  				ntn[owner[i]].nvy[unit[i]].warships -= dsunk * ntn[owner[i]].nvy[unit[i]].warships / dship;
X  			}
X
X--- 781,786 -----
X  			ntn[owner[i]].nvy[unit[i]].crew -= dkcrew * ntn[owner[i]].nvy[unit[i]].warships/dship;
X  			if(dsunk > dship ) {
X  				ntn[owner[i]].nvy[unit[i]].warships=0;
X  			} else  {
X  				ntn[owner[i]].nvy[unit[i]].warships -= dsunk * ntn[owner[i]].nvy[unit[i]].warships / dship;
X  			}
X***************
X*** 763,768
X  		if((amsunk>0)&&(side[i]==ATKR)){
X  			if(amsunk >= ntn[owner[i]].nvy[unit[i]].merchant ) {
X  				amsunk -= ntn[owner[i]].nvy[unit[i]].merchant;
X  				ntn[owner[i]].nvy[unit[i]].merchant=0;
X  			} else  {
X  				ntn[owner[i]].nvy[unit[i]].merchant-=amsunk;
X
X--- 791,797 -----
X  		if((amsunk>0)&&(side[i]==ATKR)){
X  			if(amsunk >= ntn[owner[i]].nvy[unit[i]].merchant ) {
X  				amsunk -= ntn[owner[i]].nvy[unit[i]].merchant;
X+ 				amcapt += ntn[owner[i]].nvy[unit[i]].merchant;
X  				ntn[owner[i]].nvy[unit[i]].merchant=0;
X  				ntn[owner[i]].nvy[unit[i]].crew=0;
X  			} else  {
X***************
X*** 764,769
X  			if(amsunk >= ntn[owner[i]].nvy[unit[i]].merchant ) {
X  				amsunk -= ntn[owner[i]].nvy[unit[i]].merchant;
X  				ntn[owner[i]].nvy[unit[i]].merchant=0;
X  			} else  {
X  				ntn[owner[i]].nvy[unit[i]].merchant-=amsunk;
X  				amsunk=0;
X
X--- 793,799 -----
X  				amsunk -= ntn[owner[i]].nvy[unit[i]].merchant;
X  				amcapt += ntn[owner[i]].nvy[unit[i]].merchant;
X  				ntn[owner[i]].nvy[unit[i]].merchant=0;
X+ 				ntn[owner[i]].nvy[unit[i]].crew=0;
X  			} else  {
X  				ntn[owner[i]].nvy[unit[i]].crew-=SHIPCREW*amsunk;
X  				ntn[owner[i]].nvy[unit[i]].merchant-=amsunk;
X***************
X*** 765,770
X  				amsunk -= ntn[owner[i]].nvy[unit[i]].merchant;
X  				ntn[owner[i]].nvy[unit[i]].merchant=0;
X  			} else  {
X  				ntn[owner[i]].nvy[unit[i]].merchant-=amsunk;
X  				amsunk=0;
X  			}
X
X--- 795,801 -----
X  				ntn[owner[i]].nvy[unit[i]].merchant=0;
X  				ntn[owner[i]].nvy[unit[i]].crew=0;
X  			} else  {
X+ 				ntn[owner[i]].nvy[unit[i]].crew-=SHIPCREW*amsunk;
X  				ntn[owner[i]].nvy[unit[i]].merchant-=amsunk;
X  				amcapt += amsunk;
X  				amsunk=0;
X***************
X*** 766,771
X  				ntn[owner[i]].nvy[unit[i]].merchant=0;
X  			} else  {
X  				ntn[owner[i]].nvy[unit[i]].merchant-=amsunk;
X  				amsunk=0;
X  			}
X  		}
X
X--- 797,803 -----
X  			} else  {
X  				ntn[owner[i]].nvy[unit[i]].crew-=SHIPCREW*amsunk;
X  				ntn[owner[i]].nvy[unit[i]].merchant-=amsunk;
X+ 				amcapt += amsunk;
X  				amsunk=0;
X  			}
X  		}
X***************
X*** 772,777
X  		else if((dmsunk>0)&&(side[i]==DFND)){
X  			if(dmsunk >= ntn[owner[i]].nvy[unit[i]].merchant ) {
X  				dmsunk -= ntn[owner[i]].nvy[unit[i]].merchant;
X  				ntn[owner[i]].nvy[unit[i]].merchant=0;
X  			} else  {
X  				ntn[owner[i]].nvy[unit[i]].merchant-=dmsunk;
X
X--- 804,810 -----
X  		else if((dmsunk>0)&&(side[i]==DFND)){
X  			if(dmsunk >= ntn[owner[i]].nvy[unit[i]].merchant ) {
X  				dmsunk -= ntn[owner[i]].nvy[unit[i]].merchant;
X+ 				dmcapt += ntn[owner[i]].nvy[unit[i]].merchant;
X  				ntn[owner[i]].nvy[unit[i]].merchant=0;
X  				ntn[owner[i]].nvy[unit[i]].crew=0;
X  			} else  {
X***************
X*** 773,778
X  			if(dmsunk >= ntn[owner[i]].nvy[unit[i]].merchant ) {
X  				dmsunk -= ntn[owner[i]].nvy[unit[i]].merchant;
X  				ntn[owner[i]].nvy[unit[i]].merchant=0;
X  			} else  {
X  				ntn[owner[i]].nvy[unit[i]].merchant-=dmsunk;
X  				dmsunk=0;
X
X--- 806,812 -----
X  				dmsunk -= ntn[owner[i]].nvy[unit[i]].merchant;
X  				dmcapt += ntn[owner[i]].nvy[unit[i]].merchant;
X  				ntn[owner[i]].nvy[unit[i]].merchant=0;
X+ 				ntn[owner[i]].nvy[unit[i]].crew=0;
X  			} else  {
X  				ntn[owner[i]].nvy[unit[i]].crew-=SHIPCREW*dmsunk;
X  				ntn[owner[i]].nvy[unit[i]].merchant-=dmsunk;
X***************
X*** 774,779
X  				dmsunk -= ntn[owner[i]].nvy[unit[i]].merchant;
X  				ntn[owner[i]].nvy[unit[i]].merchant=0;
X  			} else  {
X  				ntn[owner[i]].nvy[unit[i]].merchant-=dmsunk;
X  				dmsunk=0;
X  			}
X
X--- 808,814 -----
X  				ntn[owner[i]].nvy[unit[i]].merchant=0;
X  				ntn[owner[i]].nvy[unit[i]].crew=0;
X  			} else  {
X+ 				ntn[owner[i]].nvy[unit[i]].crew-=SHIPCREW*dmsunk;
X  				ntn[owner[i]].nvy[unit[i]].merchant-=dmsunk;
X  				dmcapt += dmsunk;
X  				dmsunk=0;
X***************
X*** 775,780
X  				ntn[owner[i]].nvy[unit[i]].merchant=0;
X  			} else  {
X  				ntn[owner[i]].nvy[unit[i]].merchant-=dmsunk;
X  				dmsunk=0;
X  			}
X  		}
X
X--- 810,816 -----
X  			} else  {
X  				ntn[owner[i]].nvy[unit[i]].crew-=SHIPCREW*dmsunk;
X  				ntn[owner[i]].nvy[unit[i]].merchant-=dmsunk;
X+ 				dmcapt += dmsunk;
X  				dmsunk=0;
X  			}
X  		}
X***************
X*** 779,784
X  			}
X  		}
X  	}
X  
X  	/*will round continue; does one side wish to withdraw*/
X  
X
X--- 815,831 -----
X  			}
X  		}
X  	}
X+ 	/*distribute captured ships according to navy sizes*/
X+ 	if (asunk >= aship) dmcapt=0;
X+ 	if (dsunk >= dship) amcapt=0;
X+ 	for (i=0; i<MGKNUM; i++) if (owner[i]!=(-1)){
X+ 		if ((dmcapt>0)&&(side[i]==ATKR)){
X+ 			ntn[owner[i]].nvy[unit[i]].merchant += dmcapt * ntn[owner[i]].nvy[unit[i]].warships / (aship - asunk);
X+ 		}
X+ 		if ((amcapt>0)&&(side[i]==DFND)){
X+ 			ntn[owner[i]].nvy[unit[i]].merchant += amcapt * ntn[owner[i]].nvy[unit[i]].warships / (dship - dsunk);
X+ 		}
X+ 	}
X  
X  	/*will round continue; does one side wish to withdraw*/
X  
X***************
X*** 814,820
X  			}
X  
X  			fprintf(fpmsg,"%s RESULT: Attackers lose %d ships, Defenders lose %d ships\n",ntn[owner[j]].name, asunk,dsunk);
X! 			fprintf(fpmsg,"%s         Attackers capture %d merchants, Defenders capture %d merchants\n",ntn[owner[j]].name, dmsunk,amsunk);
X  			fprintf(fpmsg,"END\n");
X  			fclose(fpmsg);
X  		}
X
X--- 861,867 -----
X  			}
X  
X  			fprintf(fpmsg,"%s RESULT: Attackers lose %d ships, Defenders lose %d ships\n",ntn[owner[j]].name, asunk,dsunk);
X! 			fprintf(fpmsg,"%s         Attackers capture %d merchants, Defenders capture %d merchants\n",ntn[owner[j]].name, dmcapt,amcapt);
X  			fprintf(fpmsg,"END\n");
X  			fclose(fpmsg);
X  		}
X*** oldgetopt.c	Wed Jul 13 09:55:58 1988
X--- getopt.c	Wed Jul 13 09:56:14 1988
X*** oldmove.c	Wed Jul 13 09:55:58 1988
X--- move.c	Wed Jul 13 09:56:14 1988
X*** oldupdate.c	Wed Jul 13 09:55:56 1988
X--- update.c	Wed Jul 13 09:56:14 1988
X***************
X*** 33,39
X  
X  	/*run each nation in a random order*/
X  	updexecs();
X! 
X  #ifdef LZARD
X  	/* run lizard nations */
X  	updlizards();
X
X--- 33,41 -----
X  
X  	/*run each nation in a random order*/
X  	updexecs();
X! #ifdef TRADE
X! 	uptrade();
X! #endif
X  #ifdef LZARD
X  	/* run lizard nations */
X  	updlizards();
X***************
X*** 714,720
X  	char command[80];
X  	long dead;
X  
X! 	fprintf(fnews,"2\tWORLD FOOD SUPPLY & DECLARATIONS OF WAR\n");
X  	for(country=1;country<MAXNTN;country++) if(ntn[country].active!=0){
X  		/*soldiers eat  2*/
X  		ntn[country].tfood-=ntn[country].tmil*2;
X
X--- 716,722 -----
X  	char command[80];
X  	long dead;
X  
X! 	fprintf(fnews,"2\tWORLD ECONOMY & DECLARATIONS OF WAR\n");
X  	for(country=1;country<MAXNTN;country++) if(ntn[country].active!=0){
X  		/*soldiers eat  2*/
X  		ntn[country].tfood-=ntn[country].tmil*2;
X*** oldcommands.c	Wed Jul 13 09:56:04 1988
X--- commands.c	Wed Jul 13 09:56:15 1988
X***************
X*** 295,300
X  			}
X  
X  			NCREW += (NWAR+NMER) * mnumber;
X  			if(isgod==TRUE) country=0;
X  			return;
X  		}
X
X--- 295,301 -----
X  			}
X  
X  			NCREW += (NWAR+NMER) * mnumber;
X+ 			NADJCRW;
X  			if(isgod==TRUE) country=0;
X  			return;
X  		}
X*** oldio.c	Wed Jul 13 09:55:56 1988
X--- io.c	Wed Jul 13 09:56:15 1988
X***************
X*** 108,115
X  		abrt();
X  	}
X  	close(fd);
X- 	verifydata( __FILE__, __LINE__ );
X- 
X  } /* readdata() */
X  
X  #ifdef ADMIN
X
X--- 108,113 -----
X  		abrt();
X  	}
X  	close(fd);
X  } /* readdata() */
X  
X  #ifdef ADMIN
X*** oldnewhelp.c	Wed Jul 13 09:55:59 1988
X--- newhelp.c	Wed Jul 13 09:56:15 1988
X***************
X*** 100,105
X  #else
X  	fprintf(fp,"s/XORCTAKE/(False)/g\n");
X  #endif
X  	/* map sectors */
X  	fprintf(fp,"s/ZMOUNTAIN/MOUNTAIN (%c)/g\n",MOUNTAIN);
X  	fprintf(fp,"s/ZHILL/HILL (%c)/g\n",HILL);
X
X--- 100,115 -----
X  #else
X  	fprintf(fp,"s/XORCTAKE/(False)/g\n");
X  #endif
X+ #ifdef HIDELOC
X+ 	fprintf(fp,"s/XHIDELOC/(True) /g\n");
X+ #else
X+ 	fprintf(fp,"s/XHIDELOC/(False)/g\n");
X+ #endif
X+ #ifdef TRADE
X+ 	fprintf(fp,"s/XTRADE/(True) /g\n");
X+ #else
X+ 	fprintf(fp,"s/XTRADE/(False)/g\n");
X+ #endif
X  	/* map sectors */
X  	fprintf(fp,"s/ZMOUNTAIN/MOUNTAIN (%c)/g\n",MOUNTAIN);
X  	fprintf(fp,"s/ZHILL/HILL (%c)/g\n",HILL);
X***************
X*** 143,148
X  	fprintf(fp,"s/XFORTCOST/%ld/g\n",FORTCOST);
X  	fprintf(fp,"s/XWARSHPCOST/%ld/g\n",WARSHPCOST);
X  	fprintf(fp,"s/XMERSHPCOST/%ld/g\n",MERSHPCOST);
X  	fprintf(fp,"s/XSHIPHOLD/%d/g\n",SHIPHOLD);
X  	fprintf(fp,"s/XCITYLIMIT/%d/g\n",CITYLIMIT);
X  	fprintf(fp,"s/XMILRATIO/%d/g\n",MILRATIO);
X
X--- 153,159 -----
X  	fprintf(fp,"s/XFORTCOST/%ld/g\n",FORTCOST);
X  	fprintf(fp,"s/XWARSHPCOST/%ld/g\n",WARSHPCOST);
X  	fprintf(fp,"s/XMERSHPCOST/%ld/g\n",MERSHPCOST);
X+ 	fprintf(fp,"s/XSHIPCREW/%ld/g\n",SHIPCREW);
X  	fprintf(fp,"s/XSHIPHOLD/%d/g\n",SHIPHOLD);
X  	fprintf(fp,"s/XCITYLIMIT/%d/g\n",CITYLIMIT);
X  	fprintf(fp,"s/XMILRATIO/%d/g\n",MILRATIO);
X*** olddata.c	Wed Jul 13 09:55:59 1988
X--- data.c	Wed Jul 13 09:56:15 1988
X***************
X*** 43,49
X  "trader", "tyrant", "demon", "dragon", "shadow"};
X  char *races[]= { "GOD","ORC","ELF","DWARF","LIZARD",
X  "HUMAN","PIRATE","BARBARIAN","NOMAD","UNKNOWN"};
X! char *diploname[]= { "UNMET", "CONFEDERACY", "ALLIED", "FRIENDLY",
X  "NEUTRAL", "HOSTILE", "WAR", "JIHAD"};
X  char *soldname[]= { "","MARCH","SCOUT","ATTACK","DEFEND","GARRISON"};
X  
X
X--- 43,49 -----
X  "trader", "tyrant", "demon", "dragon", "shadow"};
X  char *races[]= { "GOD","ORC","ELF","DWARF","LIZARD",
X  "HUMAN","PIRATE","BARBARIAN","NOMAD","UNKNOWN"};
X! char *diploname[]= { "UNMET", "CONFDRCY", "ALLIED", "FRIENDLY",
X  "NEUTRAL", "HOSTILE", "WAR", "JIHAD"};
X  char *soldname[]= { "","MARCH","SCOUT","ATTACK","DEFEND","GARRISON","TRADED"};
X  
X***************
X*** 45,51
X  "HUMAN","PIRATE","BARBARIAN","NOMAD","UNKNOWN"};
X  char *diploname[]= { "UNMET", "CONFEDERACY", "ALLIED", "FRIENDLY",
X  "NEUTRAL", "HOSTILE", "WAR", "JIHAD"};
X! char *soldname[]= { "","MARCH","SCOUT","ATTACK","DEFEND","GARRISON"};
X  
X  char *unittype[]= {
X  "Militia", "Goblin", "Orc", "Infantry", "Sailor", "Marines", "Archer",
X
X--- 45,51 -----
X  "HUMAN","PIRATE","BARBARIAN","NOMAD","UNKNOWN"};
X  char *diploname[]= { "UNMET", "CONFDRCY", "ALLIED", "FRIENDLY",
X  "NEUTRAL", "HOSTILE", "WAR", "JIHAD"};
X! char *soldname[]= { "","MARCH","SCOUT","ATTACK","DEFEND","GARRISON","TRADED"};
X  
X  char *unittype[]= {
X  "Militia", "Goblin", "Orc", "Infantry", "Sailor", "Marines", "Archer",
X***************
X*** 81,87
X  175, 150, 500, 500, 1000
X  };
X  
X- #ifdef ADMIN
X  int unitattack[]=
X  { -25, -15,   0,   0,   0,  25,   0,
X  5,  20,  10,  15,  20,  10,  20,
X
X--- 81,86 -----
X  175, 150, 500, 500, 1000
X  };
X  
X  int unitattack[]=
X  { -25, -15,   0,   0,   0,  25,   0,
X  5,  20,  10,  15,  20,  10,  20,
X***************
X*** 93,99
X  5, 20, 50, 40, 50
X  };
X  #ifdef ADMIN
X- #endif ADMIN
X  int unitdefend[]=
X  {
X  -25, -15,   0,   0,   0,  25,  10,
X
X--- 92,97 -----
X  5, 20, 50, 40, 50
X  };
X  #ifdef ADMIN
X  int unitdefend[]=
X  {
X  -25, -15,   0,   0,   0,  25,  10,
X***************
X*** 105,112
X  0, 10, 0, 15, 15,
X  5, 20, 50, 40, 50
X  };
X- #ifdef ADMIN
X- #endif ADMIN
X  /*ten times the move rate of a unit*/
X  int unitmove[]=
X  {
X
X--- 103,108 -----
X  0, 10, 0, 15, 15,
X  5, 20, 50, 40, 50
X  };
X  /*ten times the move rate of a unit*/
X  int unitmove[]=
X  {
X***************
X*** 165,170
X  char	*helpfile = "help";
X  char	*newsfile = "news";
X  char	*isonfile = "lock";
X  
X  char	*pwrname[] = {
X  "WARRIOR", "CAPTAIN", "WARLORD", "ARCHER", "CAVALRY", "SAPPER",
X
X--- 161,169 -----
X  char	*helpfile = "help";
X  char	*newsfile = "news";
X  char	*isonfile = "lock";
X+ #ifdef TRADE
X+ char	*tradefile = "commerce";
X+ #endif TRADE
X  
X  char	*pwrname[] = {
X  "WARRIOR", "CAPTAIN", "WARLORD", "ARCHER", "CAVALRY", "SAPPER",
X***************
X*** 174,180
X  "BREEDER", "URBAN", "STEEL", "NINJA", "SAILOR", "DEMOCRACY", "ROADS",
X  /* MAGICAL SKILLS */
X  "THE_VOID", "KNOWALL", "DESTROYER", "VAMPIRE",
X! "SUMMON", "SUGGEST", "WYZARD", "SORCERER"
X  };
X  
X  long	powers[] = {
X
X--- 173,179 -----
X  "BREEDER", "URBAN", "STEEL", "NINJA", "SAILOR", "DEMOCRACY", "ROADS",
X  /* MAGICAL SKILLS */
X  "THE_VOID", "KNOWALL", "DESTROYER", "VAMPIRE",
X! "SUMMON", "WYZARD", "SORCERER", "ERROR"
X  };
X  
X  long	powers[] = {
X*** oldmagic.c	Wed Jul 13 09:55:57 1988
X--- magic.c	Wed Jul 13 09:56:16 1988
X***************
X*** 144,151
X  		ntn[country].powers|=BREEDER;
X  		return(BREEDER);
X  	}
X! 	else if(ntn[country].active >= 2) return(0L);	/*npc nation*/
X! 	else if((newpower==NINJA)
X  	||(newpower==SLAVER)
X  	||(newpower==SAILOR)
X  	||(newpower==DEMOCRACY)
X
X--- 144,152 -----
X  		ntn[country].powers|=BREEDER;
X  		return(BREEDER);
X  	}
X! 	else if(ntn[country].active >= 2) {
X! 		return(0L);	/* remaining powers only for pc's */
X! 	} else if((newpower==NINJA)
X  	||(newpower==SLAVER)
X  	||(newpower==SAILOR)
X  	||(newpower==DEMOCRACY)
X***************
X*** 150,158
X  	||(newpower==SAILOR)
X  	||(newpower==DEMOCRACY)
X  	||(newpower==ROADS)
X- 	||(newpower==SUMMON)
X- 	||(newpower==WYZARD)
X- 	||(newpower==SORCERER)
X  	||(newpower==SAPPER)
X  	||(newpower==ARMOR)
X  	||(newpower==AVIAN)){	/* these powers are only for pc's */
X
X--- 151,156 -----
X  	||(newpower==SAILOR)
X  	||(newpower==DEMOCRACY)
X  	||(newpower==ROADS)
X  	||(newpower==SAPPER)
X  	||(newpower==ARMOR)
X  	||(newpower==AVIAN)){	
X***************
X*** 155,161
X  	||(newpower==SORCERER)
X  	||(newpower==SAPPER)
X  	||(newpower==ARMOR)
X! 	||(newpower==AVIAN)){	/* these powers are only for pc's */
X  		if(magic(country,newpower)==TRUE) return(0L);
X  		ntn[country].powers|=newpower;
X  		return(newpower);
X
X--- 153,159 -----
X  	||(newpower==ROADS)
X  	||(newpower==SAPPER)
X  	||(newpower==ARMOR)
X! 	||(newpower==AVIAN)){	
X  		if(magic(country,newpower)==TRUE) return(0L);
X  		ntn[country].powers|=newpower;
X  		return(newpower);
X***************
X*** 160,166
X  		ntn[country].powers|=newpower;
X  		return(newpower);
X  	}
X! 	else return(0L);
X  }
X  #ifdef CONQUER
X  /*form to interactively get a magic power*/
X
X--- 158,175 -----
X  		ntn[country].powers|=newpower;
X  		return(newpower);
X  	}
X! 	else if((newpower==SUMMON)||(newpower==WYZARD)||(newpower==SORCERER)){
X! 		if(magic(country,SUMMON)!=TRUE) {
X! 			ntn[country].powers|=SUMMON;
X! 			return(SUMMON);
X! 		} else if(magic(country,WYZARD)!=TRUE) {
X! 			ntn[country].powers|=WYZARD;
X! 			return(WYZARD);
X! 		} else if(magic(country,SORCERER)!=TRUE) {
X! 			ntn[country].powers|=SORCERER;
X! 			return(SORCERER);
X! 		} else return(0L);
X! 	} else return(0L);
X  }
X  #ifdef CONQUER
X  /*form to interactively get a magic power*/
X***************
X*** 599,605
X  orctake(count)
X  int *count;
X  {
X! 	int chance=0;
X  	if((*count)>20) {
X  		(*count)=2;
X  		clear();
X
X--- 608,614 -----
X  orctake(count)
X  int *count;
X  {
X! 	int chance=0,done=TRUE,i;
X  	if((*count)>20) {
X  		(*count)=2;
X  		clear();
X***************
X*** 604,611
X  		(*count)=2;
X  		clear();
X  	}
X! 	if(magic((*count)ry,MA_MONST)==TRUE) {
X! 	mvaddstr((*count)++,0,"  You have a 10 percent chance for %ld Jewels take over other orcs",TAKEPRICE);
X  	chance=10;
X  	} else if(magic((*count)ry,AV_MONST)==TRUE) {
X  	mvaddstr((*count)++,0,"  You have a 6 percent chance for %ld Jewels take over other orcs",TAKEPRICE);
X
X--- 613,620 -----
X  		(*count)=2;
X  		clear();
X  	}
X! 	if(magic(country,MA_MONST)==TRUE) {
X! 	mvprintw((*count)++,0,"  You have a 10 percent chance for %ld Jewels take over other orcs",TAKEPRICE);
X  	chance=10;
X  	} else if(magic(country,AV_MONST)==TRUE) {
X  	mvprintw((*count)++,0,"  You have a 6 percent chance for %ld Jewels take over other orcs",TAKEPRICE);
X***************
X*** 607,614
X  	if(magic((*count)ry,MA_MONST)==TRUE) {
X  	mvaddstr((*count)++,0,"  You have a 10 percent chance for %ld Jewels take over other orcs",TAKEPRICE);
X  	chance=10;
X! 	} else if(magic((*count)ry,AV_MONST)==TRUE) {
X! 	mvaddstr((*count)++,0,"  You have a 6 percent chance for %ld Jewels take over other orcs",TAKEPRICE);
X  	chance=6;
X  	} else if(magic((*count)ry,MI_MONST)==TRUE){
X  	mvaddstr((*count)++,0,"  You have a 3 percent chance for %ld Jewels to take over other orcs",TAKEPRICE);
X
X--- 616,623 -----
X  	if(magic(country,MA_MONST)==TRUE) {
X  	mvprintw((*count)++,0,"  You have a 10 percent chance for %ld Jewels take over other orcs",TAKEPRICE);
X  	chance=10;
X! 	} else if(magic(country,AV_MONST)==TRUE) {
X! 	mvprintw((*count)++,0,"  You have a 6 percent chance for %ld Jewels take over other orcs",TAKEPRICE);
X  	chance=6;
X  	} else if(magic(country,MI_MONST)==TRUE){
X  	mvprintw((*count)++,0,"  You have a 3 percent chance for %ld Jewels to take over other orcs",TAKEPRICE);
X***************
X*** 610,617
X  	} else if(magic((*count)ry,AV_MONST)==TRUE) {
X  	mvaddstr((*count)++,0,"  You have a 6 percent chance for %ld Jewels take over other orcs",TAKEPRICE);
X  	chance=6;
X! 	} else if(magic((*count)ry,MI_MONST)==TRUE){
X! 	mvaddstr((*count)++,0,"  You have a 3 percent chance for %ld Jewels to take over other orcs",TAKEPRICE);
X  	chance=3;
X  	}
X  	if(chance==0) return(1);
X
X--- 619,626 -----
X  	} else if(magic(country,AV_MONST)==TRUE) {
X  	mvprintw((*count)++,0,"  You have a 6 percent chance for %ld Jewels take over other orcs",TAKEPRICE);
X  	chance=6;
X! 	} else if(magic(country,MI_MONST)==TRUE){
X! 	mvprintw((*count)++,0,"  You have a 3 percent chance for %ld Jewels to take over other orcs",TAKEPRICE);
X  	chance=3;
X  	}
X  	if(chance==0) return(TRUE);
X***************
X*** 614,620
X  	mvaddstr((*count)++,0,"  You have a 3 percent chance for %ld Jewels to take over other orcs",TAKEPRICE);
X  	chance=3;
X  	}
X! 	if(chance==0) return(1);
X  
X  	mvprintw((*count)++,0,"DO YOU WISH TO TAKE OVER AN ORC NPC NATION (enter y or n):");
X  	refresh();
X
X--- 623,629 -----
X  	mvprintw((*count)++,0,"  You have a 3 percent chance for %ld Jewels to take over other orcs",TAKEPRICE);
X  	chance=3;
X  	}
X! 	if(chance==0) return(TRUE);
X  
X  	mvaddstr((*count)++,0,"DO YOU WISH TO TAKE OVER AN ORC NPC NATION (enter y or n):");
X  	refresh();
X***************
X*** 616,622
X  	}
X  	if(chance==0) return(1);
X  
X! 	mvprintw((*count)++,0,"DO YOU WISH TO TAKE OVER AN ORC NPC NATION (enter y or n):");
X  	refresh();
X  	if(getch()=='y'){
X  		done=FALSE;
X
X--- 625,631 -----
X  	}
X  	if(chance==0) return(TRUE);
X  
X! 	mvaddstr((*count)++,0,"DO YOU WISH TO TAKE OVER AN ORC NPC NATION (enter y or n):");
X  	refresh();
X  	if(getch()=='y'){
X  		done=FALSE;
X***************
X*** 624,630
X  		refresh();
X  		i=get_number();
X  		if(ntn[i].race==ORC){
X! 			ntn[(*count)ry].jewels-=TAKEPRICE;
X  			if((i=takeover(chance,i))==1)
X  			mvprintw((*count)++,0," Successful: %d",i);
X  		}
X
X--- 633,639 -----
X  		refresh();
X  		i=get_number();
X  		if(ntn[i].race==ORC){
X! 			ntn[country].jewels-=TAKEPRICE;
X  			if((i=takeover(chance,i))==1)
X  			mvprintw((*count)++,0," Successful: %d",i);
X  		}
X
X
END_OF_FILE
if test 41742 -ne `wc -c <'patches02'`; then
    echo shar: \"'patches02'\" unpacked with wrong size!
fi
# end of 'patches02'
fi
echo shar: End of shell archive.
exit 0