home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume6 / conquer4 / patch10 < prev    next >
Encoding:
Internet Message Format  |  1990-08-23  |  19.7 KB

  1. Path: uunet!zephyr.ens.tek.com!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v11i026:  conquer4 - middle earth multi-player game (V4), Patch10
  5. Message-ID: <6182@tekred.CNA.TEK.COM>
  6. Date: 22 Aug 90 18:37:30 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 564
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: Adam Bryant <adb@cs.bu.edu>
  12. Posting-number: Volume 11, Issue 26
  13. Archive-name: conquer4/Patch10
  14. Patch-To: conquer4: Volume 6, Issue 83-96
  15.  
  16. [[Okay, It has been a while since I have sent out or received anything
  17. concerning conquer version 4, so I guess it is about time that I post
  18. the last few fixes that I have made.
  19.  
  20. The patch is very small, so it just consists of the one file below.
  21. The one major thing that it fixes is the infamous password bug which
  22. prevented players from entering large passwords.  The rest of the
  23. patch just handles a few other fixes to the code.  The summary of
  24. changes is in the nots.v4 file.  [Second diff output below]
  25.  
  26. Hopefully, this will tide people over until version 5.x is released in
  27. a few months.  [It is currently undergoing construction and beta
  28. testing... this will be a greatly enhanced version.  Anyone interested
  29. in helping beta test (people who can use ftp are preferred), should
  30. send me mail at adb@cs.bu.edu or conquer-news-request@cs.bu.edu]]]
  31.  
  32. #! /bin/sh
  33. # This is a shell archive.  Remove anything before this line, then unpack
  34. # it by saving it into a file and typing "sh file".  To overwrite existing
  35. # files, type "sh file -c".  You can also feed this as standard input via
  36. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  37. # will see the following message at the end:
  38. #        "End of shell archive."
  39. # Contents:  patches10
  40. # Wrapped by billr@saab on Wed Aug 22 11:34:57 1990
  41. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  42. if test -f 'patches10' -a "${1}" != "-c" ; then 
  43.   echo shar: Will not clobber existing file \"'patches10'\"
  44. else
  45. echo shar: Extracting \"'patches10'\" \(17423 characters\)
  46. sed "s/^X//" >'patches10' <<'END_OF_FILE'
  47. X*** opatchlevel.h    Sat Aug 11 13:02:33 1990
  48. X--- patchlevel.h    Sat Aug 11 13:02:44 1990
  49. X***************
  50. X*** 1 ****
  51. X! #define PATCHLEVEL    9
  52. X--- 1 ----
  53. X! #define PATCHLEVEL    10
  54. X*** onotes.v4    Sat Aug 11 13:02:33 1990
  55. X--- notes.v4    Sat Aug 11 13:02:44 1990
  56. X***************
  57. X*** 378,383 ****
  58. X--- 378,396 ----
  59. X  312. gave god the ability to adjust navy move values.
  60. X  313. fixed bug in reporting side during newspaper for naval battles.
  61. X  314. gave god the ability to adjust an army status.
  62. X+ ===4.0 patch number nine released => 4.9 ===============================
  63. X+ 315. adjusted the combat code so a unit must be on attack to attack.
  64. X+ 316. "#ifdef __STDC__" to "#ifndef __STDC__" typo fix. [Charles C. Fu]
  65. X+ 317. fixed summon documentation for Heros and Superheros.
  66. X+ 318. adjusted test stat in tradeit function of trade.c [Charles C. Fu]
  67. X+ 319. fixed password length termination bugs.
  68. X+ 320. raised the limit of nation destruction to under 250 civs and 50 mil.
  69. X+ 321. adjusted method of i_people calculation to improve accounting. [D. Brooks]
  70. X+ 322. fixed check on limit in cities [D. Brooks]
  71. X+ 323. make nation destruction occur for <100 people and <TAKESECTOR mil.
  72. X+ 324. put a 500 men cap on the amount needed to capture a sector.
  73. X+ 325. added in a query as to how much purchase should be made from God trades.
  74. X+ 326. made sure to close the commerce file before removing it.
  75. X  
  76. X  -------------------------------------------------------------------------
  77. X  | 2.0 POSSIBLE SHORT-TERM ENHANCEMENTS/FIXES FOR CONQUER V5             |
  78. X*** oMakefile    Sat Aug 11 13:02:31 1990
  79. X--- Makefile    Sat Aug 11 13:02:44 1990
  80. X***************
  81. X*** 177,183 ****
  82. X      strip $(SORT)
  83. X  
  84. X  clobber:
  85. X!     -$(RM) *.o $(HELPOUT)[0-5] $(PSPROG) $(SORT) $(NULL)
  86. X      -$(RM) newhelp in$(GAME) in$(SORT) in$(ADMIN) in$(PSPROG) $(NULL)
  87. X      -$(RM) $(HELPSCR).[12] lint[ag] conquer.doc $(GAME) $(ADMIN) $(NULL)
  88. X  
  89. X--- 177,183 ----
  90. X      strip $(SORT)
  91. X  
  92. X  clobber:
  93. X!     -$(RM) *.o $(HELPOUT)[0-5] $(PSPROG) $(SORT) insthelp helpfile $(NULL)
  94. X      -$(RM) newhelp in$(GAME) in$(SORT) in$(ADMIN) in$(PSPROG) $(NULL)
  95. X      -$(RM) $(HELPSCR).[12] lint[ag] conquer.doc $(GAME) $(ADMIN) $(NULL)
  96. X  
  97. X*** oheader.h    Sat Aug 11 13:02:32 1990
  98. X--- header.h    Sat Aug 11 13:02:45 1990
  99. X***************
  100. X*** 154,160 ****
  101. X  #define LONGTRIP    100    /* navy trip lth for 100% attrition    */
  102. X  
  103. X  /* min soldiers to take sector - either 75 or based on your civilians    */
  104. X! #define TAKESECTOR    max(75,(ntn[country].tciv/350))
  105. X  
  106. X  #define MAXLOSS        60    /* maximum % of men lost in 1:1 battle    */
  107. X  #define    FINDPERCENT    1    /* percent to find gold/metal in sector    */
  108. X--- 154,160 ----
  109. X  #define LONGTRIP    100    /* navy trip lth for 100% attrition    */
  110. X  
  111. X  /* min soldiers to take sector - either 75 or based on your civilians    */
  112. X! #define TAKESECTOR    min(500,max(75,(ntn[country].tciv/350)))
  113. X  
  114. X  #define MAXLOSS        60    /* maximum % of men lost in 1:1 battle    */
  115. X  #define    FINDPERCENT    1    /* percent to find gold/metal in sector    */
  116. X*** oadmin.c    Sat Aug 11 13:02:31 1990
  117. X--- admin.c    Sat Aug 11 13:02:45 1990
  118. X***************
  119. X*** 75,81 ****
  120. X  
  121. X      /* check conquer options */
  122. X      if (getenv(ENVIRON_OPTS)!=NULL) {
  123. X!         strncpy(cq_opts, getenv(ENVIRON_OPTS), BIGLTH-1);
  124. X      }
  125. X      if (cq_opts[0] != '\0') {
  126. X          l = strlen(cq_opts);
  127. X--- 75,81 ----
  128. X  
  129. X      /* check conquer options */
  130. X      if (getenv(ENVIRON_OPTS)!=NULL) {
  131. X!         strncpy(cq_opts, getenv(ENVIRON_OPTS), BIGLTH);
  132. X      }
  133. X      if (cq_opts[0] != '\0') {
  134. X          l = strlen(cq_opts);
  135. X*** oextcmds.c    Sat Aug 11 13:02:32 1990
  136. X--- extcmds.c    Sat Aug 11 13:02:45 1990
  137. X***************
  138. X*** 125,130 ****
  139. X--- 125,131 ----
  140. X          || P_ASTAT == ONBOARD || P_ASTAT == TRADED) {
  141. X        if ((nocomb_stat(P_ASTAT) == TRUE) ||
  142. X          (nocomb_stat(curntn->arm[army2].stat) == TRUE) ||
  143. X+             curntn->arm[army2].stat == MARCH ||
  144. X          curntn->arm[army2].stat == SIEGE ||    /* may not jump out  */
  145. X          curntn->arm[army2].stat == SORTIE ||   /* of these statuses */
  146. X          P_ATYPE >= MINLEADER ||
  147. X*** ocexecute.c    Sat Aug 11 13:02:31 1990
  148. X--- cexecute.c    Sat Aug 11 13:02:46 1990
  149. X***************
  150. X*** 51,57 ****
  151. X  /* note: i_people is a short, so we must scale to allow for people >= 32K */
  152. X                  sct[x][y].i_people = sct[x][y].people/256;
  153. X              else
  154. X!                 sct[x][y].i_people = 0;
  155. X  
  156. X      /*open exefile file*/
  157. X      sprintf(line,"%s%d",exefile,country);
  158. X--- 51,57 ----
  159. X  /* note: i_people is a short, so we must scale to allow for people >= 32K */
  160. X                  sct[x][y].i_people = sct[x][y].people/256;
  161. X              else
  162. X!                 sct[x][y].i_people = -1;
  163. X  
  164. X      /*open exefile file*/
  165. X      sprintf(line,"%s%d",exefile,country);
  166. X*** oforms.c    Sat Aug 11 13:02:32 1990
  167. X--- forms.c    Sat Aug 11 13:02:46 1990
  168. X***************
  169. X*** 507,517 ****
  170. X              break;
  171. X          }
  172. X          /*check if already used*/
  173. X!         else for(i=1;i<(country-1);i++){
  174. X              if((strcmp(ntn[i].name,string)==0)&&(i!=country)) {
  175. X                  errormsg("Name already used");
  176. X                  break;
  177. X              }
  178. X          }
  179. X          errormsg("New name can be used following next update");
  180. X          strcpy(curntn->name,string);
  181. X--- 507,519 ----
  182. X              break;
  183. X          }
  184. X          /*check if already used*/
  185. X!         else for(i=1;i<NTOTAL;i++){
  186. X!             if (isactive(ntn[i].active)) {
  187. X              if((strcmp(ntn[i].name,string)==0)&&(i!=country)) {
  188. X                  errormsg("Name already used");
  189. X                  break;
  190. X              }
  191. X+             }
  192. X          }
  193. X          errormsg("New name can be used following next update");
  194. X          strcpy(curntn->name,string);
  195. X***************
  196. X*** 526,532 ****
  197. X              mvaddstr(0,0,"What is your current password:");
  198. X              refresh();
  199. X              (void) get_pass(command);
  200. X!             strncpy(passwd,crypt(command,SALT),PASSLTH);
  201. X              if((strncmp(passwd,ntn[0].passwd,PASSLTH)!=0)
  202. X              &&(strncmp(passwd,curntn->passwd,PASSLTH)!=0)){
  203. X                  break;
  204. X--- 528,534 ----
  205. X              mvaddstr(0,0,"What is your current password:");
  206. X              refresh();
  207. X              (void) get_pass(command);
  208. X!             strncpy(passwd,crypt(command,SALT),PASSLTH+1);
  209. X              if((strncmp(passwd,ntn[0].passwd,PASSLTH)!=0)
  210. X              &&(strncmp(passwd,curntn->passwd,PASSLTH)!=0)){
  211. X                  break;
  212. X*** ocombat.c    Sat Aug 11 13:02:31 1990
  213. X--- combat.c    Sat Aug 11 13:02:47 1990
  214. X***************
  215. X*** 41,46 ****
  216. X--- 41,48 ----
  217. X  #define COMBAT_X    0
  218. X  #define COMBAT_A    1
  219. X  #define COMBAT_N    2
  220. X+ #define FOUGHT_A    4
  221. X+ #define FOUGHT_N    8
  222. X  
  223. X  /************************************************************************/
  224. X  /*    COMBAT()    run all combat on the map            */
  225. X***************
  226. X*** 259,267 ****
  227. X              continue;
  228. X          }
  229. X          else if(side[i]==ATKR){
  230. X!             if((ntn[owner[i]].arm[unit[i]].stat!=RULE)
  231. X!             &&( ntn[owner[i]].arm[unit[i]].stat!=TRADED)
  232. X!             &&( ntn[owner[i]].arm[unit[i]].stat!=SCOUT)) {
  233. X                  asold += ntn[owner[i]].arm[unit[i]].sold;
  234. X              } else {
  235. X                  side[i]=NTRL;
  236. X--- 261,269 ----
  237. X              continue;
  238. X          }
  239. X          else if(side[i]==ATKR){
  240. X!             if ((ntn[owner[i]].arm[unit[i]].stat >= ATTACK)
  241. X!              &&(ntn[owner[i]].arm[unit[i]].stat <= SORTIE
  242. X!              ||ntn[owner[i]].arm[unit[i]].stat >= NUMSTATUS)) {
  243. X                  asold += ntn[owner[i]].arm[unit[i]].sold;
  244. X              } else {
  245. X                  side[i]=NTRL;
  246. X*** oupdate.c    Sat Aug 11 13:02:34 1990
  247. X--- update.c    Sat Aug 11 13:02:48 1990
  248. X***************
  249. X*** 82,89 ****
  250. X  
  251. X      /* check for destroyed nations */
  252. X      for(country=1;country<NTOTAL;country++)
  253. X!     if(isntn(ntn[country].active)) {
  254. X!         if(ntn[country].tciv + ntn[country].tmil < 50)
  255. X              destroy(country);
  256. X      }
  257. X  
  258. X--- 82,90 ----
  259. X  
  260. X      /* check for destroyed nations */
  261. X      for(country=1;country<NTOTAL;country++)
  262. X!     if (isntn(ntn[country].active)) {
  263. X!         if (ntn[country].tciv < 100 &&
  264. X!             ntn[country].tmil < TAKESECTOR)
  265. X              destroy(country);
  266. X      }
  267. X  
  268. X***************
  269. X*** 1295,1301 ****
  270. X                      if(armynum>=0&&armynum<MAXARM) {
  271. X                          P_ASOLD=0;
  272. X                      }
  273. X!                     P_NARMY=0;
  274. X                      P_NPEOP=0;
  275. X                      P_NCREW=0;
  276. X                  }
  277. X--- 1296,1302 ----
  278. X                      if(armynum>=0&&armynum<MAXARM) {
  279. X                          P_ASOLD=0;
  280. X                      }
  281. X!                     P_NARMY=MAXARM;
  282. X                      P_NPEOP=0;
  283. X                      P_NCREW=0;
  284. X                  }
  285. X*** ocommands.c    Sat Aug 11 13:02:31 1990
  286. X--- commands.c    Sat Aug 11 13:02:48 1990
  287. X***************
  288. X*** 751,764 ****
  289. X          return;
  290. X      }
  291. X      if(curntn->tgold <= 0){
  292. X!         errormsg("you are broke");
  293. X          if(isgod==TRUE) reset_god();
  294. X          return;
  295. X      }
  296. X  
  297. X!     if((sct[XREAL][YREAL].designation==DTOWN)
  298. X!     &&(sct[XREAL][YREAL].people*(2*CITYLIMIT+(curntn->tsctrs/2))<curntn->tciv)){
  299. X!         mvprintw(LINES-1,0,"need %d people in sector: hit any key",curntn->tciv/(2*CITYLIMIT+(curntn->tsctrs/2)));
  300. X          refresh();
  301. X          getch();
  302. X          if(isgod==TRUE) reset_god();
  303. X--- 751,764 ----
  304. X          return;
  305. X      }
  306. X      if(curntn->tgold <= 0){
  307. X!         errormsg("You are broke");
  308. X          if(isgod==TRUE) reset_god();
  309. X          return;
  310. X      }
  311. X  
  312. X!     if(ISCITY(sct[XREAL][YREAL].designation)
  313. X!     &&(sct[XREAL][YREAL].people*(3*CITYLIMIT+(curntn->tsctrs/2))<curntn->tciv)){
  314. X!         mvprintw(LINES-1,0,"Need %d people in sector: hit any key",curntn->tciv/(3*CITYLIMIT+(curntn->tsctrs/2)));
  315. X          refresh();
  316. X          getch();
  317. X          if(isgod==TRUE) reset_god();
  318. X***************
  319. X*** 844,852 ****
  320. X        /*          = imen/4 - ( imen - people)   */
  321. X        /*          = -3/4 * imen + people)      */
  322. X      /*    192 comes from 3*256/4             */
  323. X!     if((men > sct[XREAL][YREAL].people - (sct[XREAL][YREAL].i_people*192))
  324. X!       ||(sct[XREAL][YREAL].i_people <= 0)) {
  325. X!           if(sct[XREAL][YREAL].i_people <= 0)
  326. X            errormsg("error: sector wasn't city at beginning of turn");
  327. X          else errormsg("error: raising too many soldiers");
  328. X          if(isgod==TRUE) reset_god();
  329. X--- 844,852 ----
  330. X        /*          = imen/4 - ( imen - people)   */
  331. X        /*          = -3/4 * imen + people)      */
  332. X      /*    192 comes from 3*256/4             */
  333. X!     if( (newtype != A_MERCENARY && (men > sct[XREAL][YREAL].people - (sct[XREAL][YREAL].i_people*192) ) )
  334. X!       ||(sct[XREAL][YREAL].i_people < 0)) {
  335. X!           if(sct[XREAL][YREAL].i_people < 0)
  336. X            errormsg("error: sector wasn't city at beginning of turn");
  337. X          else errormsg("error: raising too many soldiers");
  338. X          if(isgod==TRUE) reset_god();
  339. X***************
  340. X*** 1345,1350 ****
  341. X--- 1345,1351 ----
  342. X      }
  343. X      if (people>sct[XREAL][YREAL].people) {
  344. X          errormsg("Sorry, not that many people live there.");
  345. X+         return;
  346. X      }
  347. X      if (people*50>curntn->tgold) {
  348. X          errormsg("Sorry, you do not have enough gold talons.");
  349. X*** onewlogin.c    Sat Aug 11 13:02:33 1990
  350. X--- newlogin.c    Sat Aug 11 13:02:49 1990
  351. X***************
  352. X*** 453,459 ****
  353. X                  newerror("Invalid Password Match");
  354. X              } else valid=TRUE;
  355. X          }
  356. X!         strncpy(curntn->passwd,crypt(tempc,SALT),PASSLTH);
  357. X  
  358. X          /*get your name*/
  359. X          valid=FALSE;
  360. X--- 453,459 ----
  361. X                  newerror("Invalid Password Match");
  362. X              } else valid=TRUE;
  363. X          }
  364. X!         strncpy(curntn->passwd,crypt(tempc,SALT),PASSLTH+1);
  365. X  
  366. X          /*get your name*/
  367. X          valid=FALSE;
  368. X*** omain.c    Sat Aug 11 13:02:32 1990
  369. X--- main.c    Sat Aug 11 13:02:49 1990
  370. X***************
  371. X*** 61,67 ****
  372. X      int geteuid(), getuid(), setuid();
  373. X      register int i,j;
  374. X      char name[NAMELTH+1],filename[FILELTH];
  375. X! #ifdef __STDC__
  376. X      void srand();
  377. X  #endif
  378. X      void init_hasseen(),mapprep();
  379. X--- 61,67 ----
  380. X      int geteuid(), getuid(), setuid();
  381. X      register int i,j;
  382. X      char name[NAMELTH+1],filename[FILELTH];
  383. X! #ifndef __STDC__
  384. X      void srand();
  385. X  #endif
  386. X      void init_hasseen(),mapprep();
  387. X***************
  388. X*** 86,92 ****
  389. X  
  390. X      /* check conquer options */
  391. X      if (getenv(ENVIRON_OPTS)!=NULL) {
  392. X!         strncpy(cq_opts, getenv(ENVIRON_OPTS), BIGLTH-1);
  393. X      }
  394. X      if (cq_opts[0] != '\0') {
  395. X          l = strlen(cq_opts);
  396. X--- 86,92 ----
  397. X  
  398. X      /* check conquer options */
  399. X      if (getenv(ENVIRON_OPTS)!=NULL) {
  400. X!         strncpy(cq_opts, getenv(ENVIRON_OPTS), BIGLTH);
  401. X      }
  402. X      if (cq_opts[0] != '\0') {
  403. X          l = strlen(cq_opts);
  404. X***************
  405. X*** 313,325 ****
  406. X  
  407. X      /*get encrypted password*/
  408. X      fprintf(stderr,"\nWhat is your Nation's Password: ");
  409. X!     strncpy(tmppass,getpass(""),PASSLTH);
  410. X!     strncpy(passwd,crypt(tmppass,SALT),PASSLTH);
  411. X      if((strncmp(passwd,curntn->passwd,PASSLTH)!=0)
  412. X      &&(strncmp(passwd,ntn[0].passwd,PASSLTH)!=0)) {
  413. X          fprintf(stderr,"\nError: Reenter your Nation's Password: ");
  414. X!         strncpy(tmppass,getpass(""),PASSLTH);
  415. X!         strncpy(passwd,crypt(tmppass,SALT),PASSLTH);
  416. X          if((strncmp(passwd,curntn->passwd,PASSLTH)!=0)
  417. X          &&(strncmp(passwd,ntn[0].passwd,PASSLTH)!=0)) {
  418. X              fprintf(stderr,"\nSorry:");
  419. X--- 313,325 ----
  420. X  
  421. X      /*get encrypted password*/
  422. X      fprintf(stderr,"\nWhat is your Nation's Password: ");
  423. X!     strncpy(tmppass,getpass(""),PASSLTH+1);
  424. X!     strncpy(passwd,crypt(tmppass,SALT),PASSLTH+1);
  425. X      if((strncmp(passwd,curntn->passwd,PASSLTH)!=0)
  426. X      &&(strncmp(passwd,ntn[0].passwd,PASSLTH)!=0)) {
  427. X          fprintf(stderr,"\nError: Reenter your Nation's Password: ");
  428. X!         strncpy(tmppass,getpass(""),PASSLTH+1);
  429. X!         strncpy(passwd,crypt(tmppass,SALT),PASSLTH+1);
  430. X          if((strncmp(passwd,curntn->passwd,PASSLTH)!=0)
  431. X          &&(strncmp(passwd,ntn[0].passwd,PASSLTH)!=0)) {
  432. X              fprintf(stderr,"\nSorry:");
  433. X*** otrade.c    Sat Aug 11 13:02:34 1990
  434. X--- trade.c    Sat Aug 11 13:02:50 1990
  435. X***************
  436. X*** 179,204 ****
  437. X              /* check for minor sales */
  438. X              if (holdint==GETFOOD || holdint==GETMETAL || holdint==GETJEWL) {
  439. X                  /* strange flow but less control needed */
  440. X!                 curntn->tgold-=GODPRICE;
  441. X                  if (curntn->tgold<0L) {
  442. X!                     curntn->tgold+=GODPRICE;
  443. X                      tradeerr("You do not have enough gold");
  444. X                  }
  445. X                  else switch (holdint) {
  446. X                  case GETFOOD:
  447. X!                     curntn->tfood+=GODFOOD;
  448. X                      if ( (tfile = fopen(tradefile,"a+"))==NULL) {
  449. X                          tradeerr("Error opening file for trading");
  450. X                          abrt();
  451. X                      }
  452. X!                     fprintf(tfile, "%d %d %d %d %ld %ld %d\n",BUY, country, GETFOOD, 0, 0, 0, 0);
  453. X                      fclose(tfile);
  454. X                      break;
  455. X                  case GETMETAL:
  456. X!                     curntn->metals+=GODMETAL;
  457. X                      break;
  458. X                  case GETJEWL:
  459. X!                     curntn->jewels+=GODJEWL;
  460. X                      break;
  461. X                  }
  462. X                  inloop=FALSE;
  463. X--- 179,207 ----
  464. X              /* check for minor sales */
  465. X              if (holdint==GETFOOD || holdint==GETMETAL || holdint==GETJEWL) {
  466. X                  /* strange flow but less control needed */
  467. X!                 mvaddstr(count++,0,"Spend how much gold? ");
  468. X!                 refresh();
  469. X!                 holdlong = get_number();
  470. X!                 curntn->tgold-=holdlong;
  471. X                  if (curntn->tgold<0L) {
  472. X!                     curntn->tgold+=holdlong;
  473. X                      tradeerr("You do not have enough gold");
  474. X                  }
  475. X                  else switch (holdint) {
  476. X                  case GETFOOD:
  477. X!                     curntn->tfood+= (long)(GODFOOD * ((double)holdlong / GODPRICE));
  478. X                      if ( (tfile = fopen(tradefile,"a+"))==NULL) {
  479. X                          tradeerr("Error opening file for trading");
  480. X                          abrt();
  481. X                      }
  482. X!                     fprintf(tfile, "%d %d %d %d %ld %ld %d\n",BUY, country, GETFOOD, 0, curntn->tfood, 0, 0);
  483. X                      fclose(tfile);
  484. X                      break;
  485. X                  case GETMETAL:
  486. X!                     curntn->metals+=(long)(GODMETAL * ((double)holdlong / GODPRICE));
  487. X                      break;
  488. X                  case GETJEWL:
  489. X!                     curntn->jewels+=(long)(GODMETAL * ((double)holdlong / GODPRICE));
  490. X                      break;
  491. X                  }
  492. X                  inloop=FALSE;
  493. X***************
  494. X*** 747,755 ****
  495. X          break;
  496. X      case TDSHIP:
  497. X          /* give navy to cntry1 */
  498. X!         if(!(ntn[cntry1].nvy[extra].merchant!=0
  499. X!            && ntn[cntry1].nvy[extra].warships!=0
  500. X!            && ntn[cntry1].nvy[extra].galleys!=0) ) return -1;
  501. X          while(unitnum==(-1)&&unitcount<MAXARM){
  502. X              if ((int)ntn[cntry2].nvy[unitcount].merchant+ntn[cntry2].nvy[unitcount].warships+ntn[cntry2].nvy[unitcount].galleys == 0) {
  503. X                  /* give navy to cntry2 */
  504. X--- 750,758 ----
  505. X          break;
  506. X      case TDSHIP:
  507. X          /* give navy to cntry1 */
  508. X!         if(ntn[cntry1].nvy[extra].merchant==0
  509. X!            && ntn[cntry1].nvy[extra].warships==0
  510. X!            && ntn[cntry1].nvy[extra].galleys==0) return -1;
  511. X          while(unitnum==(-1)&&unitcount<MAXARM){
  512. X              if ((int)ntn[cntry2].nvy[unitcount].merchant+ntn[cntry2].nvy[unitcount].warships+ntn[cntry2].nvy[unitcount].galleys == 0) {
  513. X                  /* give navy to cntry2 */
  514. X***************
  515. X*** 922,928 ****
  516. X              itemnum++;
  517. X          } else if (deal[itemnum]==BUY) {
  518. X              if (natn[itemnum]==country) {
  519. X!                 if (type1[itemnum]==GETFOOD) ntn[country].tfood+=GODFOOD;
  520. X                  else setaside(country,type2[type1[itemnum]],lvar1[itemnum],(int)lvar1[itemnum],TRUE);
  521. X              }
  522. X          }
  523. X--- 925,931 ----
  524. X              itemnum++;
  525. X          } else if (deal[itemnum]==BUY) {
  526. X              if (natn[itemnum]==country) {
  527. X!                 if (type1[itemnum]==GETFOOD) ntn[country].tfood=lvar1[itemnum];
  528. X                  else setaside(country,type2[type1[itemnum]],lvar1[itemnum],(int)lvar1[itemnum],TRUE);
  529. X              }
  530. X          }
  531. X***************
  532. X*** 990,995 ****
  533. X--- 993,999 ----
  534. X              }
  535. X          }
  536. X      }
  537. X+     fclose(tfile);
  538. X      unlink(tradefile);
  539. X      if (itemnum == 0) return;
  540. X      /* reopen the file for unsold commodities */
  541. X*** otxt3    Sat Aug 11 13:02:34 1990
  542. X--- txt3    Sat Aug 11 13:02:51 1990
  543. X***************
  544. X*** 131,140 ****
  545. X  Efreet        2      +10      x1.5    50      400      DERVISH
  546. X  Gargoyl       2      +10      x1      75      450      MI_MONST
  547. X  Wraith        2      +10      x1      75      450      VAMPIRE
  548. X! Hero          2       +0      x1      75      200      WARLORD
  549. X  Centaur       2      +10      x1.5    50      200      CAVALRY
  550. X  Giant         5       +0      x1     150     2100
  551. X! Suphero       5      +15      x1     150      450      WARRIOR
  552. X  Mummy         5      +15      x1     150     1000      VAMPIRE
  553. X  Elmentl       5       +5      x1.5   175     1900      SORCERER
  554. X  Mintaur       5      +20      x1     150     2100      DESTROYER
  555. X--- 131,140 ----
  556. X  Efreet        2      +10      x1.5    50      400      DERVISH
  557. X  Gargoyl       2      +10      x1      75      450      MI_MONST
  558. X  Wraith        2      +10      x1      75      450      VAMPIRE
  559. X! Hero          2       +0      x1      75      200      WARRIOR
  560. X  Centaur       2      +10      x1.5    50      200      CAVALRY
  561. X  Giant         5       +0      x1     150     2100
  562. X! Suphero       5      +15      x1     150      450      WARLORD
  563. X  Mummy         5      +15      x1     150     1000      VAMPIRE
  564. X  Elmentl       5       +5      x1.5   175     1900      SORCERER
  565. X  Mintaur       5      +20      x1     150     2100      DESTROYER
  566. X
  567. END_OF_FILE
  568. if test 17423 -ne `wc -c <'patches10'`; then
  569.     echo shar: \"'patches10'\" unpacked with wrong size!
  570. fi
  571. # end of 'patches10'
  572. fi
  573. echo shar: End of shell archive.
  574. exit 0
  575.