Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!amdahl!pacbell!att!whuts!homxb!homxc!smile
From: smile@homxc.UUCP (E.BARLOW)
Newsgroups: comp.sources.games.bugs
Subject: conquer v3 - patch 2
Message-ID: <2681@homxc.UUCP>
Date: 13 Jul 88 14:20:37 GMT
Organization: AT&T Bell Laboratories, Holmdel
Lines: 1513

Here is patch 2...

*** oldadmin.c	Wed Jul 13 09:55:58 1988
--- admin.c	Wed Jul 13 09:56:10 1988
*** oldextcmds.c	Wed Jul 13 09:55:59 1988
--- extcmds.c	Wed Jul 13 09:56:10 1988
***************
*** 78,83
  	if (armynum < 0 || armynum >= MAXARM ||
  		army2 < 0 || army2 >= MAXARM ||
  		armynum == army2 ||
  		ASTAT == SCOUT ||
  		ntn[country].arm[army2].stat == SCOUT ||
  		ATYPE >= MINMONSTER ||

--- 78,87 -----
  	if (armynum < 0 || armynum >= MAXARM ||
  		army2 < 0 || army2 >= MAXARM ||
  		armynum == army2 ||
+ #ifdef TRADE
+ 		ASTAT == TRADED ||
+ 		ntn[country].arm[army2].stat == TRADED ||
+ #endif TRADE
  		ASTAT == SCOUT ||
  		ntn[country].arm[army2].stat == SCOUT ||
  		ATYPE >= MINMONSTER ||
***************
*** 102,107
  change_status(armynum,new_stat)
  int armynum,new_stat;
  {
  	if (armynum < 0 || armynum >= MAXARM || ASTAT==SCOUT) {
  		errormsg("Selected army not legal");
  		return;

--- 106,114 -----
  change_status(armynum,new_stat)
  int armynum,new_stat;
  {
+ #ifdef TRADE
+ 	if (armynum < 0 || armynum >= MAXARM || ASTAT==SCOUT || ASTAT==TRADED) {
+ #else
  	if (armynum < 0 || armynum >= MAXARM || ASTAT==SCOUT) {
  #endif TRADE
  		errormsg("Selected army not legal");
***************
*** 103,108
  int armynum,new_stat;
  {
  	if (armynum < 0 || armynum >= MAXARM || ASTAT==SCOUT) {
  		errormsg("Selected army not legal");
  		return;
  	}

--- 110,116 -----
  	if (armynum < 0 || armynum >= MAXARM || ASTAT==SCOUT || ASTAT==TRADED) {
  #else
  	if (armynum < 0 || armynum >= MAXARM || ASTAT==SCOUT) {
+ #endif TRADE
  		errormsg("Selected army not legal");
  		return;
  	}
***************
*** 124,131
  		errormsg("sorry -- army is monster");
  		return;
  	}
! 
! 	if(men<0 || armynum < 0 || armynum >= MAXARM || ASOLD < men+25 ) {
  		errormsg("Selected army too small or illegal");
  		return;
  	}

--- 132,142 -----
  		errormsg("sorry -- army is monster");
  		return;
  	}
! #ifdef TRADE
! 	if(men<0 || armynum < 0 || armynum >= MAXARM || ASOLD < men+25 || ASTAT==TRADED) {
! #else 
! 	if(men<0 || armynum < 0 || armynum >= MAXARM || ASOLD < men+25) {
! #endif TRADE
  		errormsg("Selected army too small or illegal");
  		return;
  	}
*** oldmakeworld.c	Wed Jul 13 09:55:55 1988
--- makeworld.c	Wed Jul 13 09:56:11 1988
*** oldrandevent.c	Wed Jul 13 09:55:56 1988
--- randevent.c	Wed Jul 13 09:56:13 1988
*** oldcexecute.c	Wed Jul 13 09:56:02 1988
--- cexecute.c	Wed Jul 13 09:56:13 1988
***************
*** 15,21
  #include "data.h"
  extern long startgold;
  extern short country;
! extern FILE *fexe;
  
  int
  execute()

--- 15,21 -----
  #include "data.h"
  extern long startgold;
  extern short country;
! extern FILE *fexe,*fison;
  
  int
  execute()
***************
*** 36,42
  
  	/* initialize i_people */
  	for(x=0;xNTOTAL) return;
  	}
  	armynum=0;
  	/*new army screen*/

--- 48,54 -----
  		standend();
  		refresh();
  		country = get_number();
! 		if(country<0||country>NTOTAL) { country=0; return; }
  	}
  	armynum=0;
  	/*new army screen*/
***************
*** 104,110
  			clrtoeol();
  			refresh();
  			armynum = get_number();
! 			if((armynum<0)||(armynum>MAXARM)) return;
  			if(ATYPE<99)
  			mvaddstr(18,0,"1) CHANGE STATUS, 2) TRANSFER / MERGE, 3) SPLIT ARMY, 4) DISBAND ARMY");
  			else mvaddstr(18,0,"1) CHANGE STATUS, 4) DISBAND ARMY:");

--- 104,120 -----
  			clrtoeol();
  			refresh();
  			armynum = get_number();
! 			if((armynum<0)||(armynum>MAXARM)) {
! 				if (isgod==TRUE) country=0;
! 				return;
! 			}
! #ifdef TRADE
! 			if(ASTAT==TRADED) {
! 				errormsg("May not change traded army");
! 				if (isgod==TRUE) country=0;
! 				return;
! #endif TRADe
! 			}
  			if(ATYPE<99)
  			mvaddstr(18,0,"1) CHANGE STATUS, 2) TRANSFER / MERGE, 3) SPLIT ARMY, 4) DISBAND ARMY");
  			else mvaddstr(18,0,"1) CHANGE STATUS, 4) DISBAND ARMY:");
***************
*** 109,114
  			mvaddstr(18,0,"1) CHANGE STATUS, 2) TRANSFER / MERGE, 3) SPLIT ARMY, 4) DISBAND ARMY");
  			else mvaddstr(18,0,"1) CHANGE STATUS, 4) DISBAND ARMY:");
  			clrtoeol();
  			if(isgod==TRUE) mvaddstr(20,0,"5) LOCATION, 6) SOLDIERS:");
  			refresh();
  			switch(getch()){

--- 119,125 -----
  			mvaddstr(18,0,"1) CHANGE STATUS, 2) TRANSFER / MERGE, 3) SPLIT ARMY, 4) DISBAND ARMY");
  			else mvaddstr(18,0,"1) CHANGE STATUS, 4) DISBAND ARMY:");
  			clrtoeol();
+ #ifdef OGOD
  			if(isgod==TRUE) mvaddstr(20,0,"5) LOCATION, 6) SOLDIERS:");
  			refresh();
  			switch(getch()){
***************
*** 362,367
  		standend();
  		done=TRUE;
  		refresh();
  		if(isgod==TRUE) country=0;
  		return;
  	}

--- 373,379 -----
  		standend();
  		done=TRUE;
  		refresh();
+  		getch();
  		if(isgod==TRUE) country=0;
  		return;
  	}
***************
*** 378,384
  		mvaddstr(4,0, "merchant :");
  		mvaddstr(5,0, "x location:");
  		mvaddstr(6,0, "y location:");
! 		mvaddstr(7,0,"move left :");
  
  		position=5;
  		count=0;

--- 390,397 -----
  		mvaddstr(4,0, "merchant :");
  		mvaddstr(5,0, "x location:");
  		mvaddstr(6,0, "y location:");
!  		mvaddstr(7,0, "crew:");
! 		mvaddstr(8,0,"move left :");
  
  		position=5;
  		count=0;
***************
*** 393,399
  				mvprintw(4,position,"%d",NMER);
  				mvprintw(5,position,"%d",NXLOC);
  				mvprintw(6,position,"%d",NYLOC);
! 				mvprintw(7,position,"%d",NMOVE);
  			}
  			nvynum++;
  		}

--- 406,413 -----
  				mvprintw(4,position,"%d",NMER);
  				mvprintw(5,position,"%d",NXLOC);
  				mvprintw(6,position,"%d",NYLOC);
! 				mvprintw(7,position,"%d",NCREW/(NWAR+NMER));
! 				mvprintw(8,position,"%d",NMOVE);
  			}
  			nvynum++;
  		}
***************
*** 409,414
  		if (navy=='\n'){
  			mvaddstr(16,0,"WHAT NAVY DO YOU WANT TO CHANGE:");
  			clrtoeol();
  			refresh();
  			nvynum = get_number();
  			if((nvynum<0)||(nvynum>MAXNAVY)) return;

--- 423,429 -----
  		if (navy=='\n'){
  			mvaddstr(16,0,"WHAT NAVY DO YOU WANT TO CHANGE:");
  			clrtoeol();
+ #endif OGOD
  			refresh();
  			nvynum = get_number();
  #ifdef TRADE
***************
*** 411,416
  			clrtoeol();
  			refresh();
  			nvynum = get_number();
  			if((nvynum<0)||(nvynum>MAXNAVY)) return;
  			mvaddstr(18,0,"1) TRANSFER / MERGE, 2) SPLIT NAVY, 3) DISBAND NAVY:");
  			clrtoeol();

--- 426,440 -----
  #endif OGOD
  			refresh();
  			nvynum = get_number();
+ #ifdef TRADE
+ 			if (ntn[country].nvy[nvynum].armynum==TRADED) {
+ 				mvaddstr(23,0,"SORRY - THAT NAVY IS UP FOR TRADE");
+ 				refresh();
+ 				getch();
+ 				if (isgod==TRUE) country=0;
+ 				return;
+ 			}
+ #endif TRADE
  			if((nvynum<0)||(nvynum>MAXNAVY)) return;
  			mvaddstr(18,0,"1) TRANSFER / MERGE, 2) SPLIT NAVY, 3) DISBAND NAVY:");
    			clrtoeol();
***************
*** 413,418
  			nvynum = get_number();
  			if((nvynum<0)||(nvynum>MAXNAVY)) return;
  			mvaddstr(18,0,"1) TRANSFER / MERGE, 2) SPLIT NAVY, 3) DISBAND NAVY:");
  			clrtoeol();
  			refresh();
  			switch(getch()){

--- 437,445 -----
  #endif TRADE
  			if((nvynum<0)||(nvynum>MAXNAVY)) return;
  			mvaddstr(18,0,"1) TRANSFER / MERGE, 2) SPLIT NAVY, 3) DISBAND NAVY:");
+   			clrtoeol();
+ #ifdef OGOD
+ 			if(isgod==TRUE) mvaddstr(19,0,"4) ADJUST SHIPS, 5) LOCATION, 6) CREW");
  			clrtoeol();
  #endif OGOD
  			refresh();
***************
*** 414,419
  			if((nvynum<0)||(nvynum>MAXNAVY)) return;
  			mvaddstr(18,0,"1) TRANSFER / MERGE, 2) SPLIT NAVY, 3) DISBAND NAVY:");
  			clrtoeol();
  			refresh();
  			switch(getch()){
  			case '1':

--- 441,447 -----
  #ifdef OGOD
  			if(isgod==TRUE) mvaddstr(19,0,"4) ADJUST SHIPS, 5) LOCATION, 6) CREW");
  			clrtoeol();
+ #endif OGOD
  			refresh();
  			switch(getch()){
  			case '1':
***************
*** 424,429
  				clrtoeol();
  				refresh();
  				nvynum = get_number();
  				if(nvynum==oldnavy) {
  					mvprintw(23,0,"SORRY -- SAME NAVY (%d,%d)",nvynum,oldnavy);
  					refresh();

--- 452,464 -----
  				clrtoeol();
  				refresh();
  				nvynum = get_number();
+ #ifdef TRADE
+ 				if (ntn[country].nvy[nvynum].armynum==TRADED) {
+ 					mvaddstr(23,0,"SORRY - THAT NAVY IS UP FOR TRADE");
+ 					refresh();
+ 					getch();
+ 				} else
+ #endif TRADE
  				if(nvynum==oldnavy) {
  					mvprintw(23,0,"SORRY -- SAME NAVY (%d,%d)",nvynum,oldnavy);
  					refresh();
***************
*** 505,510
  				NMER=0;
  				NADJSHP;
  				break;
  			default:
  				mvaddstr(21,0,"ERROR : HIT ANY CHAR TO CONTINUE");
  				clrtoeol();

--- 540,589 -----
  				NMER=0;
  				NADJSHP;
  				break;
+ 			case '4':
+ 				if (isgod==TRUE) {
+ 					/* ADJUST SHIPS */
+ 					mvaddstr(21,0,"HOW MANY WAR SHIPS: ");
+ 					refresh();
+ 					wships = get_number();
+ 					NWAR = wships;
+ 					mvaddstr(22,0,"HOW MANY MERCHANT SHIPS: ");
+ 					refresh();
+ 					mships = get_number();
+ 					NMER = mships;
+ 					NADJSHP;
+ 				}
+ 				break;
+ #ifdef OGOD
+ 			case '5':
+ 				if (isgod==TRUE) {
+ 					/*X LOCATION*/
+ 					mvaddstr(21,0,"WHAT IS THE NEW X LOC: ");
+ 					refresh();
+ 					wships = get_number();
+ 					if (wships>=0 && wships=0 && wships=0 && wships<=SHIPCREW)
+ 						NCREW = wships*(NMER+NWAR);
+ 					NADJCRW;
+ 				}
+ 				break;
+ #endif OGOD
  			default:
  				mvaddstr(21,0,"ERROR : HIT ANY CHAR TO CONTINUE");
  				clrtoeol();
*** oldcombat.c	Wed Jul 13 09:55:53 1988
--- combat.c	Wed Jul 13 09:56:14 1988
***************
*** 611,617
  
  	for(x= xsctr-1; x<=xsctr+1; x++)
  	for(y= ysctr-1; y<=ysctr+1; y++) if(ONMAP){
! 		if(tofood(sct[x][y].vegetation,0)==0) continue;
  		if(((sct[x][y].owner == nation)
  		   ||(ntn[sct[x][y].owner].dstatus[nation] < NEUTRAL))
  		||(solds_in_sector( x, y, sct[x][y].owner) == 0)){

--- 611,618 -----
  
  	for(x= xsctr-1; x<=xsctr+1; x++)
  	for(y= ysctr-1; y<=ysctr+1; y++) if(ONMAP){
! 		if(tofood(sct[x][y].vegetation,
! 			sct[x][y].owner == country ? country : 0)==0) continue;
  		if(((sct[x][y].owner == nation)
  		   ||(ntn[sct[x][y].owner].dstatus[nation] < NEUTRAL))
  		||(solds_in_sector( x, y, sct[x][y].owner) == 0)){
***************
*** 653,658
  	int sailor;
  	char tempmsg[15];
  	int aship=0,dship=0;    /*a's and d's total war ships*/
  	int asunk=0,dsunk=0;    /*a's and d's losses for the round*/
  	int amsunk=0,dmsunk=0;  /*a's and d's msunks for the round*/
  	register int done,i,j,k;

--- 654,660 -----
  	int sailor;
  	char tempmsg[15];
  	int aship=0,dship=0;    /*a's and d's total war ships*/
+ 	int acrew=0,dcrew=0;    /*a's and d's warship crew*/
  	int asunk=0,dsunk=0;    /*a's and d's losses for the round*/
  	int amsunk=0,dmsunk=0;  /*a's and d's msunks for the round*/
  	int amcapt=0,dmcapt=0;  /*a's and d's mcaptures the the round*/
***************
*** 655,660
  	int aship=0,dship=0;    /*a's and d's total war ships*/
  	int asunk=0,dsunk=0;    /*a's and d's losses for the round*/
  	int amsunk=0,dmsunk=0;  /*a's and d's msunks for the round*/
  	register int done,i,j,k;
  
  	/* determine who is attacker & who is on defenders side?*/

--- 657,664 -----
  	int acrew=0,dcrew=0;    /*a's and d's warship crew*/
  	int asunk=0,dsunk=0;    /*a's and d's losses for the round*/
  	int amsunk=0,dmsunk=0;  /*a's and d's msunks for the round*/
+ 	int amcapt=0,dmcapt=0;  /*a's and d's mcaptures the the round*/
+ 	int akcrew=0,dkcrew=0;  /*a's and d's crew losses for the round*/
  	register int done,i,j,k;
  
  	/* determine who is attacker & who is on defenders side?*/
***************
*** 676,681
  	for(j=0;j0)&&(side[i]==ATKR)){

--- 755,771 -----
  	ntn[owner[0]].nvy[unit[0]].xloc,
  	ntn[owner[0]].nvy[unit[0]].yloc,max(0,dsunk-dship));
  #endif
+ 	/*calculate crew losses:  all on ships sunk plus percentage*/
+ 	if (asunk > aship) {
+ 		akcrew = asunk * SHIPCREW + SHIPCREW*(asunk-aship)*asunk/(asunk+dsunk);
+ 		amsunk = asunk -aship;
+ 	} else
+ 		akcrew = aship * SHIPCREW;
+ 	if (dsunk > dship) {
+ 		dkcrew = dsunk * SHIPCREW + SHIPCREW*(dsunk-dship)*dsunk/(dsunk+asunk);
+ 		dmsunk = dsunk -dship;
+ 	} else
+ 		dkcrew = dship * SHIPCREW;
  
  	/*work warship and crew losses per navy*/
  	for(i=0;i0)&&(side[i]==ATKR)){
  			if(asunk > aship ) {

--- 767,773 -----
  	} else
  		dkcrew = dship * SHIPCREW;
  
+ 	/*work warship and crew losses per navy*/
  	for(i=0;i0)&&(side[i]==ATKR)){
  			ntn[owner[i]].nvy[unit[i]].crew -= akcrew * ntn[owner[i]].nvy[unit[i]].warships/aship;
***************
*** 742,747
  
  	for(i=0;i0)&&(side[i]==ATKR)){
  			if(asunk > aship ) {
  				ntn[owner[i]].nvy[unit[i]].warships=0;
  				amsunk = asunk - aship;

--- 770,776 -----
  	/*work warship and crew losses per navy*/
  	for(i=0;i0)&&(side[i]==ATKR)){
+ 			ntn[owner[i]].nvy[unit[i]].crew -= akcrew * ntn[owner[i]].nvy[unit[i]].warships/aship;
  			if(asunk > aship ) {
  				ntn[owner[i]].nvy[unit[i]].warships=0;
  			} else  {
***************
*** 744,750
  		if((asunk>0)&&(side[i]==ATKR)){
  			if(asunk > aship ) {
  				ntn[owner[i]].nvy[unit[i]].warships=0;
- 				amsunk = asunk - aship;
  			} else  {
  				ntn[owner[i]].nvy[unit[i]].warships -= asunk * ntn[owner[i]].nvy[unit[i]].warships/aship;
  			}

--- 773,778 -----
  			ntn[owner[i]].nvy[unit[i]].crew -= akcrew * ntn[owner[i]].nvy[unit[i]].warships/aship;
  			if(asunk > aship ) {
  				ntn[owner[i]].nvy[unit[i]].warships=0;
  			} else  {
  				ntn[owner[i]].nvy[unit[i]].warships -= asunk * ntn[owner[i]].nvy[unit[i]].warships/aship;
  			}
***************
*** 750,755
  			}
  		}
  		else if((dsunk>0)&&(side[i]==DFND)){
  			if(dsunk > dship ) {
  				ntn[owner[i]].nvy[unit[i]].warships=0;
  				dmsunk = dsunk -dship;

--- 778,784 -----
  			}
  		}
  		else if((dsunk>0)&&(side[i]==DFND)){
+ 			ntn[owner[i]].nvy[unit[i]].crew -= dkcrew * ntn[owner[i]].nvy[unit[i]].warships/dship;
  			if(dsunk > dship ) {
  				ntn[owner[i]].nvy[unit[i]].warships=0;
  			} else  {
***************
*** 752,758
  		else if((dsunk>0)&&(side[i]==DFND)){
  			if(dsunk > dship ) {
  				ntn[owner[i]].nvy[unit[i]].warships=0;
- 				dmsunk = dsunk -dship;
  			} else  {
  				ntn[owner[i]].nvy[unit[i]].warships -= dsunk * ntn[owner[i]].nvy[unit[i]].warships / dship;
  			}

--- 781,786 -----
  			ntn[owner[i]].nvy[unit[i]].crew -= dkcrew * ntn[owner[i]].nvy[unit[i]].warships/dship;
  			if(dsunk > dship ) {
  				ntn[owner[i]].nvy[unit[i]].warships=0;
  			} else  {
  				ntn[owner[i]].nvy[unit[i]].warships -= dsunk * ntn[owner[i]].nvy[unit[i]].warships / dship;
  			}
***************
*** 763,768
  		if((amsunk>0)&&(side[i]==ATKR)){
  			if(amsunk >= ntn[owner[i]].nvy[unit[i]].merchant ) {
  				amsunk -= ntn[owner[i]].nvy[unit[i]].merchant;
  				ntn[owner[i]].nvy[unit[i]].merchant=0;
  			} else  {
  				ntn[owner[i]].nvy[unit[i]].merchant-=amsunk;

--- 791,797 -----
  		if((amsunk>0)&&(side[i]==ATKR)){
  			if(amsunk >= ntn[owner[i]].nvy[unit[i]].merchant ) {
  				amsunk -= ntn[owner[i]].nvy[unit[i]].merchant;
+ 				amcapt += ntn[owner[i]].nvy[unit[i]].merchant;
  				ntn[owner[i]].nvy[unit[i]].merchant=0;
  				ntn[owner[i]].nvy[unit[i]].crew=0;
  			} else  {
***************
*** 764,769
  			if(amsunk >= ntn[owner[i]].nvy[unit[i]].merchant ) {
  				amsunk -= ntn[owner[i]].nvy[unit[i]].merchant;
  				ntn[owner[i]].nvy[unit[i]].merchant=0;
  			} else  {
  				ntn[owner[i]].nvy[unit[i]].merchant-=amsunk;
  				amsunk=0;

--- 793,799 -----
  				amsunk -= ntn[owner[i]].nvy[unit[i]].merchant;
  				amcapt += ntn[owner[i]].nvy[unit[i]].merchant;
  				ntn[owner[i]].nvy[unit[i]].merchant=0;
+ 				ntn[owner[i]].nvy[unit[i]].crew=0;
  			} else  {
  				ntn[owner[i]].nvy[unit[i]].crew-=SHIPCREW*amsunk;
  				ntn[owner[i]].nvy[unit[i]].merchant-=amsunk;
***************
*** 765,770
  				amsunk -= ntn[owner[i]].nvy[unit[i]].merchant;
  				ntn[owner[i]].nvy[unit[i]].merchant=0;
  			} else  {
  				ntn[owner[i]].nvy[unit[i]].merchant-=amsunk;
  				amsunk=0;
  			}

--- 795,801 -----
  				ntn[owner[i]].nvy[unit[i]].merchant=0;
  				ntn[owner[i]].nvy[unit[i]].crew=0;
  			} else  {
+ 				ntn[owner[i]].nvy[unit[i]].crew-=SHIPCREW*amsunk;
  				ntn[owner[i]].nvy[unit[i]].merchant-=amsunk;
  				amcapt += amsunk;
  				amsunk=0;
***************
*** 766,771
  				ntn[owner[i]].nvy[unit[i]].merchant=0;
  			} else  {
  				ntn[owner[i]].nvy[unit[i]].merchant-=amsunk;
  				amsunk=0;
  			}
  		}

--- 797,803 -----
  			} else  {
  				ntn[owner[i]].nvy[unit[i]].crew-=SHIPCREW*amsunk;
  				ntn[owner[i]].nvy[unit[i]].merchant-=amsunk;
+ 				amcapt += amsunk;
  				amsunk=0;
  			}
  		}
***************
*** 772,777
  		else if((dmsunk>0)&&(side[i]==DFND)){
  			if(dmsunk >= ntn[owner[i]].nvy[unit[i]].merchant ) {
  				dmsunk -= ntn[owner[i]].nvy[unit[i]].merchant;
  				ntn[owner[i]].nvy[unit[i]].merchant=0;
  			} else  {
  				ntn[owner[i]].nvy[unit[i]].merchant-=dmsunk;

--- 804,810 -----
  		else if((dmsunk>0)&&(side[i]==DFND)){
  			if(dmsunk >= ntn[owner[i]].nvy[unit[i]].merchant ) {
  				dmsunk -= ntn[owner[i]].nvy[unit[i]].merchant;
+ 				dmcapt += ntn[owner[i]].nvy[unit[i]].merchant;
  				ntn[owner[i]].nvy[unit[i]].merchant=0;
  				ntn[owner[i]].nvy[unit[i]].crew=0;
  			} else  {
***************
*** 773,778
  			if(dmsunk >= ntn[owner[i]].nvy[unit[i]].merchant ) {
  				dmsunk -= ntn[owner[i]].nvy[unit[i]].merchant;
  				ntn[owner[i]].nvy[unit[i]].merchant=0;
  			} else  {
  				ntn[owner[i]].nvy[unit[i]].merchant-=dmsunk;
  				dmsunk=0;

--- 806,812 -----
  				dmsunk -= ntn[owner[i]].nvy[unit[i]].merchant;
  				dmcapt += ntn[owner[i]].nvy[unit[i]].merchant;
  				ntn[owner[i]].nvy[unit[i]].merchant=0;
+ 				ntn[owner[i]].nvy[unit[i]].crew=0;
  			} else  {
  				ntn[owner[i]].nvy[unit[i]].crew-=SHIPCREW*dmsunk;
  				ntn[owner[i]].nvy[unit[i]].merchant-=dmsunk;
***************
*** 774,779
  				dmsunk -= ntn[owner[i]].nvy[unit[i]].merchant;
  				ntn[owner[i]].nvy[unit[i]].merchant=0;
  			} else  {
  				ntn[owner[i]].nvy[unit[i]].merchant-=dmsunk;
  				dmsunk=0;
  			}

--- 808,814 -----
  				ntn[owner[i]].nvy[unit[i]].merchant=0;
  				ntn[owner[i]].nvy[unit[i]].crew=0;
  			} else  {
+ 				ntn[owner[i]].nvy[unit[i]].crew-=SHIPCREW*dmsunk;
  				ntn[owner[i]].nvy[unit[i]].merchant-=dmsunk;
  				dmcapt += dmsunk;
  				dmsunk=0;
***************
*** 775,780
  				ntn[owner[i]].nvy[unit[i]].merchant=0;
  			} else  {
  				ntn[owner[i]].nvy[unit[i]].merchant-=dmsunk;
  				dmsunk=0;
  			}
  		}

--- 810,816 -----
  			} else  {
  				ntn[owner[i]].nvy[unit[i]].crew-=SHIPCREW*dmsunk;
  				ntn[owner[i]].nvy[unit[i]].merchant-=dmsunk;
+ 				dmcapt += dmsunk;
  				dmsunk=0;
  			}
  		}
***************
*** 779,784
  			}
  		}
  	}
  
  	/*will round continue; does one side wish to withdraw*/
  

--- 815,831 -----
  			}
  		}
  	}
+ 	/*distribute captured ships according to navy sizes*/
+ 	if (asunk >= aship) dmcapt=0;
+ 	if (dsunk >= dship) amcapt=0;
+ 	for (i=0; i0)&&(side[i]==ATKR)){
+ 			ntn[owner[i]].nvy[unit[i]].merchant += dmcapt * ntn[owner[i]].nvy[unit[i]].warships / (aship - asunk);
+ 		}
+ 		if ((amcapt>0)&&(side[i]==DFND)){
+ 			ntn[owner[i]].nvy[unit[i]].merchant += amcapt * ntn[owner[i]].nvy[unit[i]].warships / (dship - dsunk);
+ 		}
+ 	}
  
  	/*will round continue; does one side wish to withdraw*/
  
***************
*** 814,820
  			}
  
  			fprintf(fpmsg,"%s RESULT: Attackers lose %d ships, Defenders lose %d ships\n",ntn[owner[j]].name, asunk,dsunk);
! 			fprintf(fpmsg,"%s         Attackers capture %d merchants, Defenders capture %d merchants\n",ntn[owner[j]].name, dmsunk,amsunk);
  			fprintf(fpmsg,"END\n");
  			fclose(fpmsg);
  		}

--- 861,867 -----
  			}
  
  			fprintf(fpmsg,"%s RESULT: Attackers lose %d ships, Defenders lose %d ships\n",ntn[owner[j]].name, asunk,dsunk);
! 			fprintf(fpmsg,"%s         Attackers capture %d merchants, Defenders capture %d merchants\n",ntn[owner[j]].name, dmcapt,amcapt);
  			fprintf(fpmsg,"END\n");
  			fclose(fpmsg);
  		}
*** oldgetopt.c	Wed Jul 13 09:55:58 1988
--- getopt.c	Wed Jul 13 09:56:14 1988
*** oldmove.c	Wed Jul 13 09:55:58 1988
--- move.c	Wed Jul 13 09:56:14 1988
*** oldupdate.c	Wed Jul 13 09:55:56 1988
--- update.c	Wed Jul 13 09:56:14 1988
***************
*** 33,39
  
  	/*run each nation in a random order*/
  	updexecs();
! 
  #ifdef LZARD
  	/* run lizard nations */
  	updlizards();

--- 33,41 -----
  
  	/*run each nation in a random order*/
  	updexecs();
! #ifdef TRADE
! 	uptrade();
! #endif
  #ifdef LZARD
  	/* run lizard nations */
  	updlizards();
***************
*** 714,720
  	char command[80];
  	long dead;
  
! 	fprintf(fnews,"2\tWORLD FOOD SUPPLY & DECLARATIONS OF WAR\n");
  	for(country=1;country= 2) return(0L);	/*npc nation*/
! 	else if((newpower==NINJA)
  	||(newpower==SLAVER)
  	||(newpower==SAILOR)
  	||(newpower==DEMOCRACY)

--- 144,152 -----
  		ntn[country].powers|=BREEDER;
  		return(BREEDER);
  	}
! 	else if(ntn[country].active >= 2) {
! 		return(0L);	/* remaining powers only for pc's */
! 	} else if((newpower==NINJA)
  	||(newpower==SLAVER)
  	||(newpower==SAILOR)
  	||(newpower==DEMOCRACY)
***************
*** 150,158
  	||(newpower==SAILOR)
  	||(newpower==DEMOCRACY)
  	||(newpower==ROADS)
- 	||(newpower==SUMMON)
- 	||(newpower==WYZARD)
- 	||(newpower==SORCERER)
  	||(newpower==SAPPER)
  	||(newpower==ARMOR)
  	||(newpower==AVIAN)){	/* these powers are only for pc's */

--- 151,156 -----
  	||(newpower==SAILOR)
  	||(newpower==DEMOCRACY)
  	||(newpower==ROADS)
  	||(newpower==SAPPER)
  	||(newpower==ARMOR)
  	||(newpower==AVIAN)){	
***************
*** 155,161
  	||(newpower==SORCERER)
  	||(newpower==SAPPER)
  	||(newpower==ARMOR)
! 	||(newpower==AVIAN)){	/* these powers are only for pc's */
  		if(magic(country,newpower)==TRUE) return(0L);
  		ntn[country].powers|=newpower;
  		return(newpower);

--- 153,159 -----
  	||(newpower==ROADS)
  	||(newpower==SAPPER)
  	||(newpower==ARMOR)
! 	||(newpower==AVIAN)){	
  		if(magic(country,newpower)==TRUE) return(0L);
  		ntn[country].powers|=newpower;
  		return(newpower);
***************
*** 160,166
  		ntn[country].powers|=newpower;
  		return(newpower);
  	}
! 	else return(0L);
  }
  #ifdef CONQUER
  /*form to interactively get a magic power*/

--- 158,175 -----
  		ntn[country].powers|=newpower;
  		return(newpower);
  	}
! 	else if((newpower==SUMMON)||(newpower==WYZARD)||(newpower==SORCERER)){
! 		if(magic(country,SUMMON)!=TRUE) {
! 			ntn[country].powers|=SUMMON;
! 			return(SUMMON);
! 		} else if(magic(country,WYZARD)!=TRUE) {
! 			ntn[country].powers|=WYZARD;
! 			return(WYZARD);
! 		} else if(magic(country,SORCERER)!=TRUE) {
! 			ntn[country].powers|=SORCERER;
! 			return(SORCERER);
! 		} else return(0L);
! 	} else return(0L);
  }
  #ifdef CONQUER
  /*form to interactively get a magic power*/
***************
*** 599,605
  orctake(count)
  int *count;
  {
! 	int chance=0;
  	if((*count)>20) {
  		(*count)=2;
  		clear();

--- 608,614 -----
  orctake(count)
  int *count;
  {
! 	int chance=0,done=TRUE,i;
  	if((*count)>20) {
  		(*count)=2;
  		clear();
***************
*** 604,611
  		(*count)=2;
  		clear();
  	}
! 	if(magic((*count)ry,MA_MONST)==TRUE) {
! 	mvaddstr((*count)++,0,"  You have a 10 percent chance for %ld Jewels take over other orcs",TAKEPRICE);
  	chance=10;
  	} else if(magic((*count)ry,AV_MONST)==TRUE) {
  	mvaddstr((*count)++,0,"  You have a 6 percent chance for %ld Jewels take over other orcs",TAKEPRICE);

--- 613,620 -----
  		(*count)=2;
  		clear();
  	}
! 	if(magic(country,MA_MONST)==TRUE) {
! 	mvprintw((*count)++,0,"  You have a 10 percent chance for %ld Jewels take over other orcs",TAKEPRICE);
  	chance=10;
  	} else if(magic(country,AV_MONST)==TRUE) {
  	mvprintw((*count)++,0,"  You have a 6 percent chance for %ld Jewels take over other orcs",TAKEPRICE);
***************
*** 607,614
  	if(magic((*count)ry,MA_MONST)==TRUE) {
  	mvaddstr((*count)++,0,"  You have a 10 percent chance for %ld Jewels take over other orcs",TAKEPRICE);
  	chance=10;
! 	} else if(magic((*count)ry,AV_MONST)==TRUE) {
! 	mvaddstr((*count)++,0,"  You have a 6 percent chance for %ld Jewels take over other orcs",TAKEPRICE);
  	chance=6;
  	} else if(magic((*count)ry,MI_MONST)==TRUE){
  	mvaddstr((*count)++,0,"  You have a 3 percent chance for %ld Jewels to take over other orcs",TAKEPRICE);

--- 616,623 -----
  	if(magic(country,MA_MONST)==TRUE) {
  	mvprintw((*count)++,0,"  You have a 10 percent chance for %ld Jewels take over other orcs",TAKEPRICE);
  	chance=10;
! 	} else if(magic(country,AV_MONST)==TRUE) {
! 	mvprintw((*count)++,0,"  You have a 6 percent chance for %ld Jewels take over other orcs",TAKEPRICE);
  	chance=6;
  	} else if(magic(country,MI_MONST)==TRUE){
  	mvprintw((*count)++,0,"  You have a 3 percent chance for %ld Jewels to take over other orcs",TAKEPRICE);
***************
*** 610,617
  	} else if(magic((*count)ry,AV_MONST)==TRUE) {
  	mvaddstr((*count)++,0,"  You have a 6 percent chance for %ld Jewels take over other orcs",TAKEPRICE);
  	chance=6;
! 	} else if(magic((*count)ry,MI_MONST)==TRUE){
! 	mvaddstr((*count)++,0,"  You have a 3 percent chance for %ld Jewels to take over other orcs",TAKEPRICE);
  	chance=3;
  	}
  	if(chance==0) return(1);

--- 619,626 -----
  	} else if(magic(country,AV_MONST)==TRUE) {
  	mvprintw((*count)++,0,"  You have a 6 percent chance for %ld Jewels take over other orcs",TAKEPRICE);
  	chance=6;
! 	} else if(magic(country,MI_MONST)==TRUE){
! 	mvprintw((*count)++,0,"  You have a 3 percent chance for %ld Jewels to take over other orcs",TAKEPRICE);
  	chance=3;
  	}
  	if(chance==0) return(TRUE);
***************
*** 614,620
  	mvaddstr((*count)++,0,"  You have a 3 percent chance for %ld Jewels to take over other orcs",TAKEPRICE);
  	chance=3;
  	}
! 	if(chance==0) return(1);
  
  	mvprintw((*count)++,0,"DO YOU WISH TO TAKE OVER AN ORC NPC NATION (enter y or n):");
  	refresh();

--- 623,629 -----
  	mvprintw((*count)++,0,"  You have a 3 percent chance for %ld Jewels to take over other orcs",TAKEPRICE);
  	chance=3;
  	}
! 	if(chance==0) return(TRUE);
  
  	mvaddstr((*count)++,0,"DO YOU WISH TO TAKE OVER AN ORC NPC NATION (enter y or n):");
  	refresh();
***************
*** 616,622
  	}
  	if(chance==0) return(1);
  
! 	mvprintw((*count)++,0,"DO YOU WISH TO TAKE OVER AN ORC NPC NATION (enter y or n):");
  	refresh();
  	if(getch()=='y'){
  		done=FALSE;

--- 625,631 -----
  	}
  	if(chance==0) return(TRUE);
  
! 	mvaddstr((*count)++,0,"DO YOU WISH TO TAKE OVER AN ORC NPC NATION (enter y or n):");
  	refresh();
  	if(getch()=='y'){
  		done=FALSE;
***************
*** 624,630
  		refresh();
  		i=get_number();
  		if(ntn[i].race==ORC){
! 			ntn[(*count)ry].jewels-=TAKEPRICE;
  			if((i=takeover(chance,i))==1)
  			mvprintw((*count)++,0," Successful: %d",i);
  		}

--- 633,639 -----
  		refresh();
  		i=get_number();
  		if(ntn[i].race==ORC){
! 			ntn[country].jewels-=TAKEPRICE;
  			if((i=takeover(chance,i))==1)
  			mvprintw((*count)++,0," Successful: %d",i);
  		}