Path: utzoo!attcan!uunet!tektronix!tekgen!tekred!games From: games@tekred.TEK.COM Newsgroups: comp.sources.games Subject: v05i005: conquer3 - middle earth multi-player game (V3), Patch2 Message-ID: <2814@tekred.TEK.COM> Date: 19 Jul 88 17:18:15 GMT Sender: billr@tekred.TEK.COM Lines: 1546 Approved: billr@saab.CNA.TEK.COM 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 '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;xNTOTAL) 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=0 && 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;j0)&&(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;i0)&&(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;i0)&&(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;i0)&&(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;i0)&&(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; i0)&&(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= 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