home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume6 / conquer4 / patch1 < prev    next >
Encoding:
Internet Message Format  |  1989-07-06  |  47.8 KB

  1. Path: uunet!zephyr!tektronix!tekgen!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v06i097:  conquer4 - middle earth multi-player game (V4), Patch1
  5. Message-ID: <4189@tekred.CNA.TEK.COM>
  6. Date: 5 Jul 89 21:54:23 GMT
  7. Sender: nobody@tekred.CNA.TEK.COM
  8. Lines: 1577
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: adb@bu-it.bu.edu (Adam Bryant)
  12. Posting-number: Volume 6, Issue 97
  13. Archive-name: conquer4/Patch1
  14. Patch-To: conquer4: Volume 6, Issue 83-96
  15.  
  16.     [Note that one report on comp.sources.games.bugs states that
  17.      this patch introduces a new bug (see article
  18.      <948@auvax.AthabascaU.CA>). I'm sure Adam will have an official
  19.      fix for this in the next official patch. -br]
  20.  
  21. Okay... here is the first patch.  Look in notes.v4 for
  22. a list of what it fixes.  Please apply it to the original
  23. distribution source.  [For those who gave me addresses: I
  24. am sending a test message today.... let me know if you
  25. do not receive it by monday.]
  26.  
  27. adam
  28.  
  29.     Adam Bryant                     ||  ARPANET: adb@bu-it.bu.edu
  30.     40 Chester Street  Apt. 9       ||  BITNET: adb@buenga
  31.     Allston, MA  02134              ||  UUCP: ..!harvard!bu-cs!bucsf!adb
  32.     (617) 353-9249                  ||  CSNET: adb%bucsf@bu-it
  33. ----------
  34.  
  35. #! /bin/sh
  36. # This is a shell archive.  Remove anything before this line, then unpack
  37. # it by saving it into a file and typing "sh file".  To overwrite existing
  38. # files, type "sh file -c".  You can also feed this as standard input via
  39. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  40. # will see the following message at the end:
  41. #        "End of shell archive."
  42. # Contents:  patches01
  43. # Wrapped by billr@saab on Wed Jul  5 14:50:47 1989
  44. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  45. if test -f 'patches01' -a "${1}" != "-c" ; then 
  46.   echo shar: Will not clobber existing file \"'patches01'\"
  47. else
  48. echo shar: Extracting \"'patches01'\" \(45250 characters\)
  49. sed "s/^X//" >'patches01' <<'END_OF_FILE'
  50. X*** opatchlevel.h
  51. X--- patchlevel.h
  52. X**************
  53. X*** 1
  54. X! #define PATCHLEVEL    0
  55. X--- 1 -----
  56. X! #define PATCHLEVEL    1
  57. X*** onotes.v4
  58. X--- notes.v4
  59. X**************
  60. X*** 1,7
  61. X  ------------------------------------------------------------------------------
  62. X  | THIS FILE CONTAINS RELEASE NOTES FOR CONQUER V4.0                  |
  63. X! | It is broken into 3 sections.  Section 1 reflects changes from v3.5 to v4. |
  64. X! | Section 2 reflects bugs in v4.0.  Section 3 reflects. Future ideas.        |
  65. X  ------------------------------------------------------------------------------
  66. X  
  67. X  -------------------------------------------------------------------------
  68. X--- 1,7 -----
  69. X  ------------------------------------------------------------------------------
  70. X  | THIS FILE CONTAINS RELEASE NOTES FOR CONQUER V4.0                  |
  71. X! | It is broken into 3 sections.  Section 3 reflects changes from v3.5 to v4. |
  72. X! | Section 1 reflects bugs in v4.0.  Section 2 reflects. Future ideas.        |
  73. X  ------------------------------------------------------------------------------
  74. X  -------------------------------------------------------------------------
  75. X  | == Bugs Fixed From Conquer Version 4.0 ============================== |
  76. X**************
  77. X*** 3,8
  78. X  | It is broken into 3 sections.  Section 1 reflects changes from v3.5 to v4. |
  79. X  | Section 2 reflects bugs in v4.0.  Section 3 reflects. Future ideas.        |
  80. X  ------------------------------------------------------------------------------
  81. X  
  82. X  -------------------------------------------------------------------------
  83. X  | 1.0 POSSIBLE SHORT-TERM ENHANCEMENTS/FIXES FOR CONQUER V4        |
  84. X--- 3,23 -----
  85. X  | It is broken into 3 sections.  Section 3 reflects changes from v3.5 to v4. |
  86. X  | Section 1 reflects bugs in v4.0.  Section 2 reflects. Future ideas.        |
  87. X  ------------------------------------------------------------------------------
  88. X+ -------------------------------------------------------------------------
  89. X+ | == Bugs Fixed From Conquer Version 4.0 ============================== |
  90. X+ -------------------------------------------------------------------------
  91. X+   1. increased newstring[] array from 40 to 100 in makeworl.c.
  92. X+   2. corrected a mispelling of irrigation.
  93. X+   3. line 830 of makeworl.c, added a y=(rand()%20); statement.
  94. X+   4. corrected some bugs in newlogin() routine.  Fixed orc repro buying.
  95. X+   5. made the -d flag be a subdirectory of DEFAULTDIR if not beginning
  96. X+     with a '/'.
  97. X+   6. fixed overruns of NTOTAL throughout the game.
  98. X+   7. new function to decrease size of a test statement in extcmds.c.
  99. X+   8. changed newlogin routine for detection of available countries.
  100. X+   9. merged do_lizard() and updlizard().  [used name do_lizard()].
  101. X+  10. fixed bug with getchar querys in makeworl.c.
  102. X+  11. fixed bug with y < MAPX mistype in randeven.c.
  103. X  
  104. X  -------------------------------------------------------------------------
  105. X  | 1.0 POSSIBLE SHORT-TERM ENHANCEMENTS/FIXES FOR CONQUER V4        |
  106. X*** oMakefile
  107. X--- Makefile
  108. X*** oREADME
  109. X--- README
  110. X*** oheader.h
  111. X--- header.h
  112. X*** odata.h
  113. X--- data.h
  114. X**************
  115. X*** 179,188
  116. X  
  117. X  struct s_sector
  118. X  {
  119. X!     char    designation;        /* designation of sector    */
  120. X!     char    altitude;        /* sector altitude        */
  121. X!     char    vegetation;        /* sector vegetation        */
  122. X!     char    owner;            /* nation id of owner        */
  123. X      long    people;            /* civilians in sector        */
  124. X      short    i_people;        /* initial civilians in sector    */
  125. X      unsigned char    jewels;        /* jewel production ability    */
  126. X--- 179,188 -----
  127. X  
  128. X  struct s_sector
  129. X  {
  130. X!     unsigned char    designation;    /* designation of sector    */
  131. X!     unsigned char    altitude;    /* sector altitude        */
  132. X!     unsigned char    vegetation;    /* sector vegetation        */
  133. X!     unsigned char    owner;        /* nation id of owner        */
  134. X      long    people;            /* civilians in sector        */
  135. X      short    i_people;        /* initial civilians in sector    */
  136. X      unsigned char    jewels;        /* jewel production ability    */
  137. X**************
  138. X*** 200,208
  139. X      unsigned short warships;
  140. X      unsigned short merchant;
  141. X      unsigned short galleys;
  142. X!     char xloc;
  143. X!     char yloc;
  144. X!     char smove;            /* movement ability of ship */
  145. X      unsigned char crew;        /* crew on ship */
  146. X      unsigned char people;        /* people carried */
  147. X      unsigned char commodity;    /* future commodities */
  148. X--- 200,208 -----
  149. X      unsigned short warships;
  150. X      unsigned short merchant;
  151. X      unsigned short galleys;
  152. X!     unsigned char xloc;
  153. X!     unsigned char yloc;
  154. X!     unsigned char smove;        /* movement ability of ship */
  155. X      unsigned char crew;        /* crew on ship */
  156. X      unsigned char people;        /* people carried */
  157. X      unsigned char commodity;    /* future commodities */
  158. X**************
  159. X*** 206,212
  160. X      unsigned char crew;        /* crew on ship */
  161. X      unsigned char people;        /* people carried */
  162. X      unsigned char commodity;    /* future commodities */
  163. X!     char armynum;            /* army carried */
  164. X  };
  165. X  
  166. X  
  167. X--- 206,212 -----
  168. X      unsigned char crew;        /* crew on ship */
  169. X      unsigned char people;        /* people carried */
  170. X      unsigned char commodity;    /* future commodities */
  171. X!     unsigned char armynum;        /* army carried */
  172. X  };
  173. X  
  174. X  
  175. X**************
  176. X*** 342,350
  177. X  struct army
  178. X  {
  179. X      unsigned char unittyp;
  180. X!     char xloc;
  181. X!     char yloc;
  182. X!     char smove;
  183. X      long sold;
  184. X      char stat;
  185. X  };
  186. X--- 342,350 -----
  187. X  struct army
  188. X  {
  189. X      unsigned char unittyp;
  190. X!     unsigned char xloc;
  191. X!     unsigned char yloc;
  192. X!     unsigned char smove;
  193. X      long sold;
  194. X      unsigned char stat;
  195. X  };
  196. X**************
  197. X*** 346,352
  198. X      char yloc;
  199. X      char smove;
  200. X      long sold;
  201. X!     char stat;
  202. X  };
  203. X  
  204. X  struct    s_nation        /* player nation stats    */
  205. X--- 346,352 -----
  206. X      unsigned char yloc;
  207. X      unsigned char smove;
  208. X      long sold;
  209. X!     unsigned char stat;
  210. X  };
  211. X  
  212. X  struct    s_nation        /* player nation stats    */
  213. X**************
  214. X*** 357,366
  215. X      char    race;        /* national race (integer--see header.h)*/
  216. X      char    location;    /* location variable (gfr)    */
  217. X      char    mark;        /* unique mark for nation    */
  218. X!     char    capx;        /* Capitol x coordinate        */
  219. X!     char    capy;        /* Capitol y coordinate        */
  220. X!     char    active;        /* nation type and strategy    */
  221. X!     char    maxmove;    /* maximum movement of soldiers */
  222. X      char    repro;        /* reproduction rate of nation    */
  223. X      long    score;        /* score            */
  224. X      long    tgold;        /* gold in treasury        */
  225. X--- 357,366 -----
  226. X      char    race;        /* national race (integer--see header.h)*/
  227. X      char    location;    /* location variable (gfr)    */
  228. X      char    mark;        /* unique mark for nation    */
  229. X!     unsigned char    capx;    /* Capitol x coordinate        */
  230. X!     unsigned char    capy;    /* Capitol y coordinate        */
  231. X!     unsigned char    active;    /* nation type and strategy    */
  232. X!     unsigned char    maxmove;/* maximum movement of soldiers */
  233. X      char    repro;        /* reproduction rate of nation    */
  234. X      long    score;        /* score            */
  235. X      long    tgold;        /* gold in treasury        */
  236. X**************
  237. X*** 384,400
  238. X      unsigned char    tax_rate;    /* taxrate populace    */
  239. X      unsigned char    prestige;    /* nations prestige    */
  240. X      unsigned char    popularity;    /* governments popularity    */
  241. X!     unsigned char    power;            /* nation power    */
  242. X!     unsigned char    communications;        /* leader communication    */
  243. X!     unsigned char    wealth;            /* per capita income    */
  244. X!     unsigned char    eatrate;        /* food eaten / 10 people*/
  245. X!     unsigned char    spoilrate;        /* food spoilage rate    */
  246. X!     unsigned char    knowledge;        /* general knowledge    */
  247. X!     unsigned char    farm_ability;        /* farming ability    */
  248. X!     unsigned char    mine_ability;        /* mine ability        */
  249. X!     unsigned char    poverty;        /* % poor people    */
  250. X!     unsigned char    terror;            /* peoples terror of you*/
  251. X!     unsigned char    reputation;        /* reputation of nation    */
  252. X  };
  253. X  #define    P_NTNCOM    ((((float) curntn->communications)/ 50.0 ))
  254. X  #define    P_EATRATE    ((((float) curntn->eatrate) / 25.0 ))
  255. X--- 384,400 -----
  256. X      unsigned char    tax_rate;    /* taxrate populace    */
  257. X      unsigned char    prestige;    /* nations prestige    */
  258. X      unsigned char    popularity;    /* governments popularity    */
  259. X!     unsigned char    power;        /* nation power        */
  260. X!     unsigned char    communications;    /* leader communication    */
  261. X!     unsigned char    wealth;        /* per capita income    */
  262. X!     unsigned char    eatrate;    /* food eaten / 10 people*/
  263. X!     unsigned char    spoilrate;    /* food spoilage rate    */
  264. X!     unsigned char    knowledge;    /* general knowledge    */
  265. X!     unsigned char    farm_ability;    /* farming ability    */
  266. X!     unsigned char    mine_ability;    /* mine ability        */
  267. X!     unsigned char    poverty;    /* % poor people    */
  268. X!     unsigned char    terror;        /* peoples terror of you*/
  269. X!     unsigned char    reputation;    /* reputation of nation    */
  270. X  };
  271. X  #define    P_NTNCOM    ((((float) curntn->communications)/ 50.0 ))
  272. X  #define    P_EATRATE    ((((float) curntn->eatrate) / 25.0 ))
  273. X**************
  274. X*** 623,629
  275. X  extern void    randomevent(), wdisaster(), weather(), deplete();
  276. X  extern void    verify_ntn(), verify_sct(), verifydata(), prep();
  277. X  extern void    destroy(), updmove(), spreadsheet(), mailopen(), mailclose();
  278. X! extern void    updexecs(), updlizards(), updcapture(), updsectors();
  279. X  extern void    updmil(), updcomodities(), updleader();
  280. X  extern void    nationrun(), n_atpeace(), n_trespass(), n_people();
  281. X  extern void    n_toofar(), n_unowned(), pceattr(), checkout();
  282. X--- 623,629 -----
  283. X  extern void    randomevent(), wdisaster(), weather(), deplete();
  284. X  extern void    verify_ntn(), verify_sct(), verifydata(), prep();
  285. X  extern void    destroy(), updmove(), spreadsheet(), mailopen(), mailclose();
  286. X! extern void    updexecs(), updcapture(), updsectors();
  287. X  extern void    updmil(), updcomodities(), updleader();
  288. X  extern void    nationrun(), n_atpeace(), n_trespass(), n_people();
  289. X  extern void    n_toofar(), n_unowned(), pceattr(), checkout();
  290. X**************
  291. X*** 935,941
  292. X  #define GODJEWL        3000L        /* " */
  293. X  #define GODPRICE    25000L
  294. X  
  295. X! #ifdef 0
  296. X  /* THE FOLLOWING DEFINES ARE NOT IMPLEMENTED YET        */
  297. X  /* THEY DEFINE THE ATTRIBUTES OF A (TO BE IMPLEMENTED) REGION    */
  298. X  
  299. X--- 935,941 -----
  300. X  #define GODJEWL        3000L        /* " */
  301. X  #define GODPRICE    25000L
  302. X  
  303. X! #ifdef XYZ
  304. X  /* THE FOLLOWING DEFINES ARE NOT IMPLEMENTED YET        */
  305. X  /* THEY DEFINE THE ATTRIBUTES OF A (TO BE IMPLEMENTED) REGION    */
  306. X  
  307. X*** oadmin.c
  308. X--- admin.c
  309. X**************
  310. X*** 90,96
  311. X          strcpy(scenario, optarg);
  312. X          break;
  313. X      case 'd':
  314. X!         strcpy(defaultdir, optarg);
  315. X          break;
  316. X      case '?': /*  print out command line arguments */
  317. X          printf("Command line format: %s [-maxp -dDIR -rSCENARIO]\n",argv[0]);
  318. X--- 90,100 -----
  319. X          strcpy(scenario, optarg);
  320. X          break;
  321. X      case 'd':
  322. X!         if(optarg[0]!='/') {
  323. X!             sprintf(defaultdir, "%s/%s", DEFAULTDIR, optarg);
  324. X!         } else {
  325. X!             strcpy(defaultdir, optarg);
  326. X!         }
  327. X          break;
  328. X      case '?': /*  print out command line arguments */
  329. X          printf("Command line format: %s [-maxp -dDIR -rSCENARIO]\n",argv[0]);
  330. X**************
  331. X*** 122,128
  332. X          exit(FAIL);
  333. X      }
  334. X      if((mflag)||(rflag)) {
  335. X-         makeworld(rflag);
  336. X          sprintf(string,"%sup",isonfile);
  337. X          unlink(string);
  338. X          exit(SUCCESS);
  339. X--- 126,131 -----
  340. X          exit(FAIL);
  341. X      }
  342. X      if((mflag)||(rflag)) {
  343. X          sprintf(string,"%sup",isonfile);
  344. X          unlink(string);
  345. X          makeworld(rflag);
  346. X**************
  347. X*** 125,130
  348. X          makeworld(rflag);
  349. X          sprintf(string,"%sup",isonfile);
  350. X          unlink(string);
  351. X          exit(SUCCESS);
  352. X      }
  353. X  
  354. X--- 128,134 -----
  355. X      if((mflag)||(rflag)) {
  356. X          sprintf(string,"%sup",isonfile);
  357. X          unlink(string);
  358. X+         makeworld(rflag);
  359. X          exit(SUCCESS);
  360. X      }
  361. X  
  362. X**************
  363. X*** 162,168
  364. X          /* prevent more than one addition */
  365. X          sprintf(string,"%sadd",isonfile);
  366. X          if(check_lock(string,TRUE)==TRUE) {
  367. X!             printf("Some else is adding\n");
  368. X              printf("Please try again later.\n");
  369. X              exit(FAIL);
  370. X          }
  371. X--- 166,172 -----
  372. X          /* prevent more than one addition */
  373. X          sprintf(string,"%sadd",isonfile);
  374. X          if(check_lock(string,TRUE)==TRUE) {
  375. X!             printf("Someone else is adding\n");
  376. X              printf("Please try again later.\n");
  377. X              exit(FAIL);
  378. X          }
  379. X*** oextcmds.c
  380. X--- extcmds.c
  381. X**************
  382. X*** 84,89
  383. X      refresh();
  384. X  }
  385. X  
  386. X  void
  387. X  combinearmies(armynum,army2)
  388. X  int armynum, army2;
  389. X--- 84,114 -----
  390. X      refresh();
  391. X  }
  392. X  
  393. X+ /* returns TRUE if uncombinable FALSE if combinable */
  394. X+ int
  395. X+ nocomb_stat(astat)
  396. X+     unsigned char astat;
  397. X+ {
  398. X+     int hold;
  399. X+ 
  400. X+     switch(astat) {
  401. X+ #ifdef TRADE
  402. X+     case TRADED:
  403. X+ #endif TRADE
  404. X+     case FLIGHT:
  405. X+     case MAGATT:
  406. X+     case MAGDEF:
  407. X+     case SCOUT:
  408. X+     case ONBOARD:
  409. X+         hold = TRUE;
  410. X+         break;
  411. X+     default:
  412. X+         hold = FALSE;
  413. X+         break;
  414. X+     }
  415. X+     return(hold);
  416. X+ }
  417. X+ 
  418. X  void
  419. X  combinearmies(armynum,army2)
  420. X  int armynum, army2;
  421. X**************
  422. X*** 88,93
  423. X  combinearmies(armynum,army2)
  424. X  int armynum, army2;
  425. X  {
  426. X      if (armynum < 0 || armynum >= MAXARM ||
  427. X          army2 < 0 || army2 >= MAXARM ||
  428. X          armynum == army2 ||
  429. X--- 113,120 -----
  430. X  combinearmies(armynum,army2)
  431. X  int armynum, army2;
  432. X  {
  433. X+     int nocomb_stat();
  434. X+ 
  435. X      if (armynum < 0 || armynum >= MAXARM ||
  436. X          army2 < 0 || army2 >= MAXARM ||
  437. X          armynum == army2 ||
  438. X**************
  439. X*** 91,110
  440. X      if (armynum < 0 || armynum >= MAXARM ||
  441. X          army2 < 0 || army2 >= MAXARM ||
  442. X          armynum == army2 ||
  443. X! #ifdef TRADE
  444. X!         P_ASTAT == TRADED ||
  445. X!         curntn->arm[army2].stat == TRADED ||
  446. X! #endif TRADE
  447. X!         P_ASTAT == FLIGHT ||
  448. X!         curntn->arm[army2].stat == FLIGHT ||
  449. X!         P_ASTAT == MAGATT ||
  450. X!         curntn->arm[army2].stat == MAGATT ||
  451. X!         P_ASTAT == MAGDEF ||
  452. X!         curntn->arm[army2].stat == MAGDEF ||
  453. X!         P_ASTAT == SCOUT ||
  454. X!         curntn->arm[army2].stat == SCOUT ||
  455. X!         P_ASTAT == ONBOARD ||
  456. X!         curntn->arm[army2].stat == ONBOARD ||
  457. X          curntn->arm[army2].stat == SIEGE ||    /* may not jump out  */
  458. X          curntn->arm[army2].stat == SORTIE ||   /* of these statuses */
  459. X          P_ATYPE >= MINLEADER ||
  460. X--- 118,125 -----
  461. X      if (armynum < 0 || armynum >= MAXARM ||
  462. X          army2 < 0 || army2 >= MAXARM ||
  463. X          armynum == army2 ||
  464. X!         (nocomb_stat(P_ASTAT) == TRUE) ||
  465. X!         (nocomb_stat(curntn->arm[army2].stat) == TRUE) ||
  466. X          curntn->arm[army2].stat == SIEGE ||    /* may not jump out  */
  467. X          curntn->arm[army2].stat == SORTIE ||   /* of these statuses */
  468. X          P_ATYPE >= MINLEADER ||
  469. X**************
  470. X*** 221,227
  471. X      }
  472. X      P_ASTAT = new_stat;
  473. X      AADJSTAT;
  474. X!     if( P_AMOVE>0 ) P_AMOVE--;
  475. X      AADJMOV;
  476. X  }
  477. X  
  478. X--- 236,242 -----
  479. X      }
  480. X      P_ASTAT = new_stat;
  481. X      AADJSTAT;
  482. X!     if( P_AMOVE != 0 ) P_AMOVE--;
  483. X      AADJMOV;
  484. X  }
  485. X  
  486. X*** omakeworl.c
  487. X--- makeworl.c
  488. X**************
  489. X*** 45,51
  490. X  int    rflag;        /* TRUE if you wish to read in a map from mapfiles */
  491. X  {
  492. X      char passwd[PASSLTH+1],*getpass();
  493. X!     char newstring[40];
  494. X      FILE *fopen();
  495. X  
  496. X      /*abort if datafile currently exists*/
  497. X--- 45,51 -----
  498. X  int    rflag;        /* TRUE if you wish to read in a map from mapfiles */
  499. X  {
  500. X      char passwd[PASSLTH+1],*getpass();
  501. X!     char newstring[100];
  502. X      FILE *fopen();
  503. X  
  504. X      /*abort if datafile currently exists*/
  505. X**************
  506. X*** 711,717
  507. X      short    npirates=0,nbarbarians=0,nnomads=0,nlizards=0;
  508. X  
  509. X      FILE *fp, *fopen();
  510. X-     int done=FALSE;
  511. X      char line[80],allign;
  512. X      char fname[80];
  513. X  
  514. X--- 711,716 -----
  515. X      short    npirates=0,nbarbarians=0,nnomads=0,nlizards=0;
  516. X  
  517. X      FILE *fp, *fopen();
  518. X      char line[80],allign;
  519. X      char fname[80];
  520. X  
  521. X**************
  522. X*** 739,746
  523. X          curntn->mark='-';
  524. X      }
  525. X  
  526. X!     for( country=1; country<NTOTAL; country++ ) {
  527. X!         for(i=country+1;i<NTOTAL;i++) {
  528. X              ntn[country].dstatus[i]=UNMET;
  529. X              ntn[i].dstatus[country]=UNMET;
  530. X          }
  531. X--- 738,745 -----
  532. X          curntn->mark='-';
  533. X      }
  534. X  
  535. X!     for( country=0; country<NTOTAL; country++ ) {
  536. X!         for(i=country;i<NTOTAL;i++) {
  537. X              ntn[country].dstatus[i]=UNMET;
  538. X              ntn[i].dstatus[country]=UNMET;
  539. X          }
  540. X**************
  541. X*** 828,833
  542. X          if((rand()%2==0)&&(curntn->active!=NPC_LIZARD)){
  543. X              if(rand()%2==0) {
  544. X                  x=(rand()%20);
  545. X              } else {
  546. X                  x=(MAPX-(rand()%20)-1);
  547. X                  y=(MAPY-(rand()%20)-1);
  548. X--- 827,833 -----
  549. X          if((rand()%2==0)&&(curntn->active!=NPC_LIZARD)){
  550. X              if(rand()%2==0) {
  551. X                  x=(rand()%20);
  552. X+                 y=(rand()%20);
  553. X              } else {
  554. X                  x=(MAPX-(rand()%20)-1);
  555. X                  y=(MAPY-(rand()%20)-1);
  556. X**************
  557. X*** 949,955
  558. X          if( ntn[country].active != NPC_BARBARIAN ) continue;
  559. X          curntn = &ntn[country];
  560. X          armynum=barbarmy;
  561. X!         if( country!=NTOTAL ) while(armynum<MAXARM) {
  562. X              x = rand()%MAPX;
  563. X              y = rand()%MAPY;
  564. X              if (is_habitable(x,y)&&sct[x][y].owner==0) {
  565. X--- 949,955 -----
  566. X          if( ntn[country].active != NPC_BARBARIAN ) continue;
  567. X          curntn = &ntn[country];
  568. X          armynum=barbarmy;
  569. X!         while(armynum<MAXARM) {
  570. X              x = rand()%MAPX;
  571. X              y = rand()%MAPY;
  572. X              if (is_habitable(x,y)&&sct[x][y].owner==0) {
  573. X**************
  574. X*** 979,986
  575. X      }
  576. X  
  577. X  #ifdef NPC
  578. X!     printf("\nDo you want NPC nations in this campaign?");
  579. X!     if( getchar()!='y' ) return;
  580. X      if((fp=fopen(npcsfile,"r"))==NULL) {
  581. X          printf("error on read of %s file\n",npcsfile);
  582. X          printf("Do you wish to use default NPC nations file (y or n)?");
  583. X--- 979,987 -----
  584. X      }
  585. X  
  586. X  #ifdef NPC
  587. X!     printf("\nDo you want NPC nations in this campaign? (y or n)");
  588. X!     while( ((i=getchar()) != 'y')&&(i != 'n') ) ;
  589. X!     if( i!='y' ) return;
  590. X      if((fp=fopen(npcsfile,"r"))==NULL) {
  591. X          printf("error on read of %s file\n",npcsfile);
  592. X          printf("Do you wish to use default NPC nations file (y or n)?");
  593. X**************
  594. X*** 984,995
  595. X      if((fp=fopen(npcsfile,"r"))==NULL) {
  596. X          printf("error on read of %s file\n",npcsfile);
  597. X          printf("Do you wish to use default NPC nations file (y or n)?");
  598. X!         if(getchar()=='y'){
  599. X!         sprintf(line,"%s/%s",DEFAULTDIR,npcsfile);
  600. X!         if ((fp=fopen(line,"r"))==NULL) {
  601. X!             printf("\nsorry; error on read of %s file\n",line);
  602. X!             return;
  603. X!         } else printf("\nOK; default nations used\n");
  604. X          } else {
  605. X              printf("\nOK; no NPC nations used\n");
  606. X              return;
  607. X--- 985,997 -----
  608. X      if((fp=fopen(npcsfile,"r"))==NULL) {
  609. X          printf("error on read of %s file\n",npcsfile);
  610. X          printf("Do you wish to use default NPC nations file (y or n)?");
  611. X!         while( ((i=getchar()) != 'y')&&(i != 'n') ) ;
  612. X!         if( i=='y'){
  613. X!             sprintf(line,"%s/%s",DEFAULTDIR,npcsfile);
  614. X!             if ((fp=fopen(line,"r"))==NULL) {
  615. X!                 printf("\nsorry; error on read of %s file\n",line);
  616. X!                 return;
  617. X!             } else printf("\nOK; default nations used\n");
  618. X          } else {
  619. X              printf("\nOK; no NPC nations used\n");
  620. X              return;
  621. X**************
  622. X*** 1072,1078
  623. X              curntn->tfood= curntn->tciv * 3;
  624. X              curntn->metals=10000L;
  625. X              curntn->jewels=10000L;
  626. X!             cnum++;
  627. X              place(xloc,yloc);
  628. X              att_setup(country);    /* nation attributes */
  629. X          }
  630. X--- 1074,1080 -----
  631. X              curntn->tfood= curntn->tciv * 3;
  632. X              curntn->metals=10000L;
  633. X              curntn->jewels=10000L;
  634. X!             if (cnum < NTOTAL) cnum++;
  635. X              place(xloc,yloc);
  636. X              att_setup(country);    /* nation attributes */
  637. X          }
  638. X*** osort.c
  639. X--- sort.c
  640. X**************
  641. X*** 25,32
  642. X   *      as it comes in.
  643. X   *
  644. X   * Initial Revision:        (adb@bucsf.bu.edu)
  645. X!  *    Tuesday March 21th, 1989 - Began the program at 23:26 EST
  646. X!  *      Wednesday March 22nd, 1989 - Finished the initial version 11:29 EST
  647. X   */
  648. X  
  649. X  #include <stdio.h>
  650. X--- 25,32 -----
  651. X   *      as it comes in.
  652. X   *
  653. X   * Initial Revision:        (adb@bucsf.bu.edu)
  654. X!  *     Tuesday March 21th, 1989 - Began the program at 23:26 EST
  655. X!  *     Wednesday March 22nd, 1989 - Finished the initial version 11:29 EST
  656. X   */
  657. X  
  658. X  #include <stdio.h>
  659. X**************
  660. X*** 30,36
  661. X   */
  662. X  
  663. X  #include <stdio.h>
  664. X- #include "header.h"
  665. X  #ifndef HPUX
  666. X  #include <sysexits.h>
  667. X  #endif HPUX
  668. X--- 30,35 -----
  669. X   */
  670. X  
  671. X  #include <stdio.h>
  672. X  #ifndef HPUX
  673. X  #include <sysexits.h>
  674. X  #endif HPUX
  675. X**************
  676. X*** 181,187
  677. X  
  678. X      }
  679. X  
  680. X!      /* ==== end of main processing loop ==== */
  681. X  
  682. X      /* close input file if not stdin */
  683. X      if (infile!=stdin) {
  684. X--- 180,186 -----
  685. X  
  686. X      }
  687. X  
  688. X!     /* ==== end of main processing loop ==== */
  689. X  
  690. X      /* close input file if not stdin */
  691. X      if (infile!=stdin) {
  692. X**************
  693. X*** 317,320
  694. X      temp->next = nptr;
  695. X      return(temp);
  696. X  }
  697. X- 
  698. X--- 316,318 -----
  699. X      temp->next = nptr;
  700. X      return(temp);
  701. X  }
  702. X*** orandeven.c
  703. X--- randeven.c
  704. X**************
  705. X*** 70,76
  706. X  findnew()
  707. X  {
  708. X      int newntn=0,nationis;
  709. X!     for ( nationis=NTOTAL; nationis >= 1; nationis--)
  710. X          if(ntn[nationis].active == INACTIVE) newntn=nationis;
  711. X      if (newntn == 0) return (0);
  712. X      strcpy(ntn[newntn].leader,"rebel");
  713. X--- 70,76 -----
  714. X  findnew()
  715. X  {
  716. X      int newntn=0,nationis;
  717. X!     for ( nationis=NTOTAL-1; nationis >= 1; nationis--)
  718. X          if(ntn[nationis].active == INACTIVE) newntn=nationis;
  719. X      if (newntn == 0) return (0);
  720. X      strcpy(ntn[newntn].leader,"rebel");
  721. X**************
  722. X*** 1089,1095
  723. X  *rand_sector()
  724. X  {
  725. X      int count=0;
  726. X!     for(xpos=0;xpos<MAPX;xpos++) for(ypos=0;ypos<MAPX;ypos++)
  727. X          if(sct[xpos][ypos].owner == country) count++;
  728. X      count = rand()%count;
  729. X      for(xpos=0;xpos<MAPX;xpos++) for(ypos=0;ypos<MAPX;ypos++){
  730. X--- 1089,1095 -----
  731. X  *rand_sector()
  732. X  {
  733. X      int count=0;
  734. X!     for(xpos=0;xpos<MAPX;xpos++) for(ypos=0;ypos<MAPY;ypos++)
  735. X          if(sct[xpos][ypos].owner == country) count++;
  736. X      count = rand()%count;
  737. X      for(xpos=0;xpos<MAPX;xpos++) for(ypos=0;ypos<MAPY;ypos++){
  738. X**************
  739. X*** 1092,1098
  740. X      for(xpos=0;xpos<MAPX;xpos++) for(ypos=0;ypos<MAPX;ypos++)
  741. X          if(sct[xpos][ypos].owner == country) count++;
  742. X      count = rand()%count;
  743. X!     for(xpos=0;xpos<MAPX;xpos++) for(ypos=0;ypos<MAPX;ypos++){
  744. X          if(sct[xpos][ypos].owner == country) count--;
  745. X          if(count==0) return(&sct[xpos][ypos]);
  746. X      }
  747. X--- 1092,1098 -----
  748. X      for(xpos=0;xpos<MAPX;xpos++) for(ypos=0;ypos<MAPY;ypos++)
  749. X          if(sct[xpos][ypos].owner == country) count++;
  750. X      count = rand()%count;
  751. X!     for(xpos=0;xpos<MAPX;xpos++) for(ypos=0;ypos<MAPY;ypos++){
  752. X          if(sct[xpos][ypos].owner == country) count--;
  753. X          if(count==0) return(&sct[xpos][ypos]);
  754. X      }
  755. X**************
  756. X*** 1096,1101
  757. X          if(sct[xpos][ypos].owner == country) count--;
  758. X          if(count==0) return(&sct[xpos][ypos]);
  759. X      }
  760. X      abrt();
  761. X      return(NULL);    /* stop lint from complaining */
  762. X  }
  763. X--- 1096,1102 -----
  764. X          if(sct[xpos][ypos].owner == country) count--;
  765. X          if(count==0) return(&sct[xpos][ypos]);
  766. X      }
  767. X+     fprintf(stderr,"could find no location for country %d\n",country);
  768. X      abrt();
  769. X      return(NULL);    /* stop lint from complaining */
  770. X  }
  771. X*** ocexecute.c
  772. X--- cexecute.c
  773. X**************
  774. X*** 210,216
  775. X              /* if not own it, and if people there, problem */
  776. X              if((sct[x][y].owner!=country)
  777. X              &&( country!=0)
  778. X!             &&( sct[x][y].owner>0 )
  779. X              &&( sct[x][y].people>0 )
  780. X              &&( magic(country,SLAVER)==FALSE )
  781. X              &&( ntn[sct[x][y].owner].race!=curntn->race)){
  782. X--- 210,216 -----
  783. X              /* if not own it, and if people there, problem */
  784. X              if((sct[x][y].owner!=country)
  785. X              &&( country!=0)
  786. X!             &&( sct[x][y].owner!=0 )
  787. X              &&( sct[x][y].people>0 )
  788. X              &&( magic(country,SLAVER)==FALSE )
  789. X              &&( ntn[sct[x][y].owner].race != curntn->race)){
  790. X**************
  791. X*** 213,219
  792. X              &&( sct[x][y].owner>0 )
  793. X              &&( sct[x][y].people>0 )
  794. X              &&( magic(country,SLAVER)==FALSE )
  795. X!             &&( ntn[sct[x][y].owner].race!=curntn->race)){
  796. X                  sct[ntn[sct[x][y].owner].capx][ntn[sct[x][y].owner].capy].people+= sct[x][y].people;
  797. X                  sct[x][y].people=0;
  798. X                  fprintf(stderr,"ERROR: <%s> taking sector %d %d but civilians exist of other race - puting them in their capitol\n",curntn->name,x,y);
  799. X--- 213,219 -----
  800. X              &&( sct[x][y].owner!=0 )
  801. X              &&( sct[x][y].people>0 )
  802. X              &&( magic(country,SLAVER)==FALSE )
  803. X!             &&( ntn[sct[x][y].owner].race != curntn->race)){
  804. X                  sct[ntn[sct[x][y].owner].capx][ntn[sct[x][y].owner].capy].people+= sct[x][y].people;
  805. X                  sct[x][y].people=0;
  806. X                  fprintf(stderr,"ERROR: <%s> taking sector %d %d but civilians exist of other race - puting them in their capitol\n",curntn->name,x,y);
  807. X*** oforms.c
  808. X--- forms.c
  809. X**************
  810. X*** 275,281
  811. X              mvaddstr(j++,0,"6) WAR");
  812. X              mvprintw(j++,0,"7) JIHAD (%d talons to break):",BREAKJIHAD);
  813. X              j++;
  814. X!             for( i=1; i<=NTOTAL; i++ )
  815. X                  if((isntnorp(ntn[i].active)) && (ntn[nation].dstatus[i]==TREATY))
  816. X                  mvprintw(j++,10,"%s has treaty with %s",ntn[nation].name,ntn[i].name);
  817. X  
  818. X--- 275,281 -----
  819. X              mvaddstr(j++,0,"6) WAR");
  820. X              mvprintw(j++,0,"7) JIHAD (%d talons to break):",BREAKJIHAD);
  821. X              j++;
  822. X!             for( i=1; i<NTOTAL; i++ )
  823. X                  if((isntnorp(ntn[i].active)) && (ntn[nation].dstatus[i]==TREATY))
  824. X                  mvprintw(j++,10,"%s has treaty with %s",ntn[nation].name,ntn[i].name);
  825. X  
  826. X**************
  827. X*** 315,321
  828. X              &&(ntn[nation].dstatus[country]<WAR)) {
  829. X                  ntn[nation].dstatus[country]=WAR;
  830. X                  EADJDIP(nation,country);
  831. X!                 for( i=1; i<=NTOTAL; i++ )
  832. X                  if(ntn[i].dstatus[nation]==TREATY){
  833. X                      ntn[i].dstatus[country]=WAR;
  834. X                      EADJDIP(i,country);
  835. X--- 315,321 -----
  836. X              &&(ntn[nation].dstatus[country]<WAR)) {
  837. X                  ntn[nation].dstatus[country]=WAR;
  838. X                  EADJDIP(nation,country);
  839. X!                 for( i=1; i<NTOTAL; i++ )
  840. X                  if(ntn[i].dstatus[nation]==TREATY){
  841. X                      ntn[i].dstatus[country]=WAR;
  842. X                      EADJDIP(i,country);
  843. X**************
  844. X*** 657,663
  845. X                  }
  846. X                  destroy(country);
  847. X                  fclose(fnews);
  848. X!                 sprintf(command,"%s/%s",DEFAULTDIR, sortname);
  849. X                  sprintf(command,"%s %s %s", command, filename, filename);
  850. X                  system(command);
  851. X              }
  852. X--- 657,663 -----
  853. X                  }
  854. X                  destroy(country);
  855. X                  fclose(fnews);
  856. X!                 sprintf(command,"%s/%s", EXEDIR, sortname);
  857. X                  sprintf(command,"%s %s %s", command, filename, filename);
  858. X                  system(command);
  859. X              }
  860. X*** omisc.c
  861. X--- misc.c
  862. X**************
  863. X*** 757,763
  864. X  int country;
  865. X  {
  866. X      struct s_nation *saventn=curntn;
  867. X!     int i,j,x,y,armynum,nation;
  868. X  
  869. X      x = ntn[country].capx;
  870. X      y = ntn[country].capy;
  871. X--- 757,763 -----
  872. X  int country;
  873. X  {
  874. X      struct s_nation *saventn=curntn;
  875. X!     int i,j,x,y,armynum;
  876. X  
  877. X      x = ntn[country].capx;
  878. X      y = ntn[country].capy;
  879. X**************
  880. X*** 940,945
  881. X  
  882. X      nptr = &ntn[country];
  883. X      if( ismonst(nptr->active) ) return;
  884. X      fprintf(fnews,"1.\tNation %s was destroyed ",nptr->name);
  885. X      if(country!=sct[nptr->capx][nptr->capy].owner){
  886. X          fprintf(fnews,"(their capitol is now owned by %s)\n",ntn[sct[nptr->capx][nptr->capy].owner].name);
  887. X--- 940,946 -----
  888. X  
  889. X      nptr = &ntn[country];
  890. X      if( ismonst(nptr->active) ) return;
  891. X+     if( !isactive(nptr->active) ) return;
  892. X      fprintf(fnews,"1.\tNation %s was destroyed ",nptr->name);
  893. X      if(country!=sct[nptr->capx][nptr->capy].owner){
  894. X          fprintf(fnews,"(their capitol is now owned by %s)\n",ntn[sct[nptr->capx][nptr->capy].owner].name);
  895. X*** omove.c
  896. X--- move.c
  897. X**************
  898. X*** 385,391
  899. X                  } else if(total>0) {
  900. X                      /* remove proportion of starting move */
  901. X                      P_AMOVE-= total * curntn->maxmove * *(unitmove+(P_ATYPE%UTYPE))/(10*(groupmen+othermen));
  902. X!                     if( P_AMOVE<0 || P_AMOVE>100 )
  903. X                          P_AMOVE=0;
  904. X                      AADJMOV;
  905. X                      if( P_AMOVE==0 )
  906. X--- 385,391 -----
  907. X                  } else if(total>0) {
  908. X                      /* remove proportion of starting move */
  909. X                      P_AMOVE-= total * curntn->maxmove * *(unitmove+(P_ATYPE%UTYPE))/(10*(groupmen+othermen));
  910. X!                     if( P_AMOVE>150 )
  911. X                          P_AMOVE=0;
  912. X                      AADJMOV;
  913. X                      if( P_AMOVE==0 )
  914. X**************
  915. X*** 475,480
  916. X          &&(P_ASOLD>0)){
  917. X              if((groupmen>=TAKESECTOR)&&(SOWN==0 )){
  918. X                  mvaddstr(LINES-2,0,"Taking Unowned Sector");
  919. X                  refresh();
  920. X                  sleep(2);
  921. X                  SOWN=country;
  922. X--- 475,481 -----
  923. X          &&(P_ASOLD>0)){
  924. X              if((groupmen>=TAKESECTOR)&&(SOWN==0 )){
  925. X                  mvaddstr(LINES-2,0,"Taking Unowned Sector");
  926. X+                 clrtoeol();
  927. X                  refresh();
  928. X                  sleep(2);
  929. X                  SOWN=country;
  930. X*** oupdate.c
  931. X--- update.c
  932. X**************
  933. X*** 39,47
  934. X      check();
  935. X  
  936. X  #ifdef MONSTER
  937. X-     for( country=1;country<NTOTAL;country++)
  938. X-         if( ntn[country].active == NPC_LIZARD )
  939. X-             updlizards();    /* run lizard nations */
  940. X      check();
  941. X      monster();    /* update monster nations */
  942. X      check();
  943. X--- 39,44 -----
  944. X      check();
  945. X  
  946. X  #ifdef MONSTER
  947. X      check();
  948. X      monster();    /* update monster nations */
  949. X      check();
  950. X**************
  951. X*** 670,676
  952. X  }
  953. X  
  954. X  /****************************************************************/
  955. X! /*    UPDLIZARDS()                         */
  956. X  /* update lizards                         */
  957. X  /****************************************************************/
  958. X  void
  959. X--- 667,673 -----
  960. X  }
  961. X  
  962. X  /****************************************************************/
  963. X! /*    DO_LIZARD()                         */
  964. X  /* update lizards                         */
  965. X  /****************************************************************/
  966. X  void
  967. X**************
  968. X*** 674,680
  969. X  /* update lizards                         */
  970. X  /****************************************************************/
  971. X  void
  972. X! updlizards()
  973. X  {
  974. X      register int i, j;
  975. X      int armynum;
  976. X--- 671,677 -----
  977. X  /* update lizards                         */
  978. X  /****************************************************************/
  979. X  void
  980. X! do_lizard()
  981. X  {
  982. X      register int i, j;
  983. X      int armynum;
  984. X**************
  985. X*** 679,685
  986. X      register int i, j;
  987. X      int armynum;
  988. X  
  989. X!     printf("updating lizard (nation %d)\n ",country);
  990. X      curntn = &ntn[country];
  991. X      for(armynum=0;armynum<MAXARM;armynum++)
  992. X      if((P_ASOLD>0)) {
  993. X--- 676,682 -----
  994. X      register int i, j;
  995. X      int armynum;
  996. X  
  997. X!     printf("updating lizard (nation %d)\n",country);
  998. X      curntn = &ntn[country];
  999. X      for(armynum=0;armynum<MAXARM;armynum++)
  1000. X      if((P_ASOLD>0)) {
  1001. X**************
  1002. X*** 684,689
  1003. X      for(armynum=0;armynum<MAXARM;armynum++)
  1004. X      if((P_ASOLD>0)) {
  1005. X          P_AMOVE =20;    /* just in case god wants to move them */
  1006. X          if(armynum%2==0) {
  1007. X              if(P_ASTAT!=SIEGED) P_ASTAT=GARRISON;
  1008. X          } else {
  1009. X--- 681,688 -----
  1010. X      for(armynum=0;armynum<MAXARM;armynum++)
  1011. X      if((P_ASOLD>0)) {
  1012. X          P_AMOVE =20;    /* just in case god wants to move them */
  1013. X+         P_ASOLD*=102;    /* increase population */
  1014. X+         P_ASOLD/=100;
  1015. X          if(armynum%2==0) {
  1016. X              if(P_ASTAT!=SIEGED) P_ASTAT=GARRISON;
  1017. X          } else {
  1018. X*** odata.c
  1019. X--- data.c
  1020. X**************
  1021. X*** 271,277
  1022. X  "rice", "wheat", "dairy", "peas", "bread", "cereal",
  1023. X  "pottery", "salt", "timber", "granite", "pine", "oak", "nails",
  1024. X  "papyrus","math","library","drama","paper","literature","law","philosophy",
  1025. X! "irregation", "oxen", "plows",
  1026. X  "stones",
  1027. X  "herbs", "medicine",
  1028. X  "torture", "prison",
  1029. X--- 271,277 -----
  1030. X  "rice", "wheat", "dairy", "peas", "bread", "cereal",
  1031. X  "pottery", "salt", "timber", "granite", "pine", "oak", "nails",
  1032. X  "papyrus","math","library","drama","paper","literature","law","philosophy",
  1033. X! "irrigation", "oxen", "plows",
  1034. X  "stones",
  1035. X  "herbs", "medicine",
  1036. X  "torture", "prison",
  1037. X*** omagic.c
  1038. X--- magic.c
  1039. X**************
  1040. X*** 600,606
  1041. X          mvaddstr((*count)++,0,"  What orc nation:");
  1042. X          refresh();
  1043. X          i=get_country();
  1044. X!         if(i<=0 || i>NTOTAL || !isntn(ntn[i].active) )
  1045. X              mvaddstr((*count)++,0,"  Invalid Nation");
  1046. X          else if((curntn->dstatus[i]<HOSTILE)
  1047. X          &&(curntn->dstatus[i]!=UNMET)
  1048. X--- 600,606 -----
  1049. X          mvaddstr((*count)++,0,"  What orc nation:");
  1050. X          refresh();
  1051. X          i=get_country();
  1052. X!         if(i<=0 || i>=NTOTAL || !isntn(ntn[i].active) )
  1053. X              mvaddstr((*count)++,0,"  Invalid Nation");
  1054. X          else if((curntn->dstatus[i]<HOSTILE)
  1055. X          &&(curntn->dstatus[i]!=UNMET)
  1056. X*** onewlogin.c
  1057. X--- newlogin.c
  1058. X**************
  1059. X*** 126,132
  1060. X      register i;
  1061. X  
  1062. X      printf("\nPreparing to add player\n");
  1063. X-     printf("break at any time to abort\n");
  1064. X  
  1065. X      while(more==TRUE) {
  1066. X          points=MAXPTS;
  1067. X--- 126,131 -----
  1068. X      register i;
  1069. X  
  1070. X      printf("\nPreparing to add player\n");
  1071. X  
  1072. X      while(more==TRUE) {
  1073. X          points=MAXPTS;
  1074. X**************
  1075. X*** 130,135
  1076. X  
  1077. X      while(more==TRUE) {
  1078. X          points=MAXPTS;
  1079. X          /*find valid nation number type*/
  1080. X          for(i=1;i<NTOTAL;i++)
  1081. X              if(ntn[i].active==INACTIVE) {
  1082. X--- 129,135 -----
  1083. X  
  1084. X      while(more==TRUE) {
  1085. X          points=MAXPTS;
  1086. X+         country=0;
  1087. X          /*find valid nation number type*/
  1088. X          for(i=1;i<NTOTAL;i++)
  1089. X              if(ntn[i].active==INACTIVE) {
  1090. X**************
  1091. X*** 139,145
  1092. X              }
  1093. X          printf("first valid nation id is %d\n",country);
  1094. X  
  1095. X!         if(i==NTOTAL) {
  1096. X              beep();
  1097. X              printf("error, cant add new nation\n");
  1098. X              return;
  1099. X--- 139,145 -----
  1100. X              }
  1101. X          printf("first valid nation id is %d\n",country);
  1102. X  
  1103. X!         if(country==0) {
  1104. X              beep();
  1105. X              printf("error, cant add new nation\n");
  1106. X              return;
  1107. X**************
  1108. X*** 389,395
  1109. X                  printf("how many points to spend on population:");
  1110. X                  scanf("%d",&temp);
  1111. X                  putchar('\n');
  1112. X!                 if(points >= temp) {
  1113. X                      points -= temp;
  1114. X                      curntn->tciv+=temp*NLPOP;
  1115. X                  }
  1116. X--- 389,397 -----
  1117. X                  printf("how many points to spend on population:");
  1118. X                  scanf("%d",&temp);
  1119. X                  putchar('\n');
  1120. X!                 if(points <= 0) {
  1121. X!                     printf("Purchase aborted...");
  1122. X!                 } if(points >= temp) {
  1123. X                      points -= temp;
  1124. X                      curntn->tciv+=temp*NLPOP;
  1125. X                  }
  1126. X**************
  1127. X*** 401,408
  1128. X                  printf("how many points to spend on added gold talons:");
  1129. X                  scanf("%d",&temp);
  1130. X                  putchar('\n');
  1131. X!                 if(points>=temp)
  1132. X!                 {
  1133. X                      points-=temp;
  1134. X                      curntn->tgold+=temp*NLGOLD;
  1135. X                  }
  1136. X--- 403,411 -----
  1137. X                  printf("how many points to spend on added gold talons:");
  1138. X                  scanf("%d",&temp);
  1139. X                  putchar('\n');
  1140. X!                 if(points<=0) {
  1141. X!                     printf("Purchase aborted....");
  1142. X!                 } else if(points>=temp) {
  1143. X                      points-=temp;
  1144. X                      curntn->tgold+=temp*NLGOLD;
  1145. X                  }
  1146. X**************
  1147. X*** 429,435
  1148. X                  printf("how many points to spend?");
  1149. X                  scanf("%d",&temp);
  1150. X                  putchar('\n');
  1151. X!                 if(points >= temp) {
  1152. X                      points -= temp;
  1153. X                      curntn->tmil+=temp*NLSOLD;
  1154. X                  }
  1155. X--- 432,440 -----
  1156. X                  printf("how many points to spend?");
  1157. X                  scanf("%d",&temp);
  1158. X                  putchar('\n');
  1159. X!                 if (points <= 0) {
  1160. X!                     printf("Purchase aborted...");
  1161. X!                 } else if(points >= temp) {
  1162. X                      points -= temp;
  1163. X                      curntn->tmil+=temp*NLSOLD;
  1164. X                  }
  1165. X**************
  1166. X*** 445,451
  1167. X                  printf("how many points do you wish to spend?");
  1168. X                  scanf("%d",&temp);
  1169. X                  putchar('\n');
  1170. X!                 if(points >= temp) {
  1171. X                      points -= temp;
  1172. X                      if(curntn->race == ORC )
  1173. X                      curntn->aplus+=temp*NLATTACK/2;
  1174. X--- 450,458 -----
  1175. X                  printf("how many points do you wish to spend?");
  1176. X                  scanf("%d",&temp);
  1177. X                  putchar('\n');
  1178. X!                 if(points <= 0) {
  1179. X!                     printf("Purchase aborted...");
  1180. X!                 } else if(points >= temp) {
  1181. X                      points -= temp;
  1182. X                      if(curntn->race == ORC )
  1183. X                      curntn->aplus+=temp*NLATTACK/2;
  1184. X**************
  1185. X*** 468,474
  1186. X                  printf("how many points do you wish to spend?");
  1187. X                  scanf("%d",&temp);
  1188. X                  putchar('\n');
  1189. X!                 if(points >= temp) {
  1190. X                      points -= temp;
  1191. X                      if(curntn->race == ORC )
  1192. X                      curntn->dplus+=temp*NLDEFENCE/2;
  1193. X--- 475,483 -----
  1194. X                  printf("how many points do you wish to spend?");
  1195. X                  scanf("%d",&temp);
  1196. X                  putchar('\n');
  1197. X!                 if(points <= 0) {
  1198. X!                     printf("Purchase aborted...");
  1199. X!                 } else if(points >= temp) {
  1200. X                      points -= temp;
  1201. X                      if(curntn->race == ORC )
  1202. X                      curntn->dplus+=temp*NLDEFENCE/2;
  1203. X**************
  1204. X*** 492,498
  1205. X                      printf("you have the maximum rate");
  1206. X                      break;
  1207. X                  }
  1208. X!                 printf("how many percentage points to add?:");
  1209. X                  scanf("%d",&temp);
  1210. X                  putchar('\n');
  1211. X                  if((points >= (temp*NLREPCOST))
  1212. X--- 501,507 -----
  1213. X                      printf("you have the maximum rate");
  1214. X                      break;
  1215. X                  }
  1216. X!                 printf("how many purchasing points to spend?:");
  1217. X                  scanf("%d",&temp);
  1218. X                  putchar('\n');
  1219. X                  if(temp < points) {
  1220. X**************
  1221. X*** 495,506
  1222. X                  printf("how many percentage points to add?:");
  1223. X                  scanf("%d",&temp);
  1224. X                  putchar('\n');
  1225. X!                 if((points >= (temp*NLREPCOST))
  1226. X!                 ||((curntn->race==ORC)
  1227. X!                     &&(points >= (temp*NLREPCOST/2)))) {
  1228. X!                     if((curntn->race!=ORC)
  1229. X!                     &&(curntn->repro+NLREPRO*temp>10)){
  1230. X!                     printf("that exceeds the 10%% limit");
  1231. X                      }
  1232. X                      else if((curntn->race==ORC)
  1233. X                      &&(curntn->repro>14-NLREPRO_ORC*temp)){
  1234. X--- 504,532 -----
  1235. X                  printf("how many purchasing points to spend?:");
  1236. X                  scanf("%d",&temp);
  1237. X                  putchar('\n');
  1238. X!                 if(temp < points) {
  1239. X!                     printf("You don't have enough points left");
  1240. X!                 } else if (temp < 0) {
  1241. X!                     printf("Negative, huh?  Who you trying to kid?");
  1242. X!                 } else if (temp%NLREPCOST != 0) {
  1243. X!                     printf("You must spend in multiples of %d",NLREPCOST);
  1244. X!                 } else {
  1245. X!                     if(curntn->race != ORC) {
  1246. X!                         temp = temp/NLREPCOST*NLREPRO;
  1247. X!                         if(curntn->repro+temp > 10) {
  1248. X!                             printf("That exceeds the 10% limit");
  1249. X!                         } else {
  1250. X!                             points -= (temp*NLREPCOST/NLREPRO);
  1251. X!                             curntn->repro += temp;
  1252. X!                         }
  1253. X!                     } else {
  1254. X!                         temp = temp/NLREPCOST*NLREPRO_ORC;
  1255. X!                         if(curntn->repro+temp > 14) {
  1256. X!                             printf("That exceeds the 14% limit");
  1257. X!                         } else {
  1258. X!                             points -= (temp*NLREPCOST/NLREPRO_ORC);
  1259. X!                             curntn->repro += temp;
  1260. X!                         }
  1261. X                      }
  1262. X                  }
  1263. X                  break;
  1264. X**************
  1265. X*** 502,519
  1266. X                      &&(curntn->repro+NLREPRO*temp>10)){
  1267. X                      printf("that exceeds the 10%% limit");
  1268. X                      }
  1269. X-                     else if((curntn->race==ORC)
  1270. X-                     &&(curntn->repro>14-NLREPRO_ORC*temp)){
  1271. X-                     printf("that exceeds the 14%% limit");
  1272. X-                     }
  1273. X-                     else {
  1274. X-                     if(curntn->race==ORC)
  1275. X-                         points -= (temp*NLREPCOST/2);
  1276. X-                     else    points -= temp*NLREPCOST;
  1277. X-                     if(curntn->race==ORC)
  1278. X-                         curntn->repro+=NLREPRO_ORC*temp;
  1279. X-                     else    curntn->repro+=NLREPRO*temp;
  1280. X-                     }
  1281. X                  }
  1282. X                  else printf("You dont have enough points left");
  1283. X                  break;
  1284. X--- 528,533 -----
  1285. X                              curntn->repro += temp;
  1286. X                          }
  1287. X                      }
  1288. X                  }
  1289. X                  break;
  1290. X              case 8:
  1291. X**************
  1292. X*** 515,521
  1293. X                      else    curntn->repro+=NLREPRO*temp;
  1294. X                      }
  1295. X                  }
  1296. X-                 else printf("You dont have enough points left");
  1297. X                  break;
  1298. X              case 8:
  1299. X                  if(curntn->race == ORC ) {
  1300. X--- 529,534 -----
  1301. X                          }
  1302. X                      }
  1303. X                  }
  1304. X                  break;
  1305. X              case 8:
  1306. X                  if(curntn->race == ORC ) {
  1307. X*** odisplay.c
  1308. X--- display.c
  1309. X**************
  1310. X*** 315,322
  1311. X      switch(hilmode){
  1312. X      case HI_MOVE:    /* your armies w/ move left */
  1313. X          for(armynum=0;armynum<MAXARM;armynum++)
  1314. X!             if(( P_ASOLD>0 )
  1315. X!             &&( P_AMOVE>0 )
  1316. X              &&( P_AXLOC==(x+xoffset ))
  1317. X              &&( P_AYLOC==(y+yoffset ))) break;
  1318. X          if(armynum<MAXARM) standout();
  1319. X--- 315,322 -----
  1320. X      switch(hilmode){
  1321. X      case HI_MOVE:    /* your armies w/ move left */
  1322. X          for(armynum=0;armynum<MAXARM;armynum++)
  1323. X!             if(( P_ASOLD != 0 )
  1324. X!             &&( P_AMOVE != 0 )
  1325. X              &&( P_AXLOC==(x+xoffset ))
  1326. X              &&( P_AYLOC==(y+yoffset ))) break;
  1327. X          if(armynum<MAXARM) standout();
  1328. X**************
  1329. X*** 323,329
  1330. X          break;
  1331. X      case HI_YARM:    /* your armies */
  1332. X          for(armynum=0;armynum<MAXARM;armynum++)
  1333. X!             if(( P_ASOLD>0)
  1334. X              &&( P_AXLOC==x+xoffset)
  1335. X              &&( P_AYLOC==y+yoffset)) break;
  1336. X          if(armynum<MAXARM) standout();
  1337. X--- 323,329 -----
  1338. X          break;
  1339. X      case HI_YARM:    /* your armies */
  1340. X          for(armynum=0;armynum<MAXARM;armynum++)
  1341. X!             if(( P_ASOLD != 0)
  1342. X              &&( P_AXLOC==x+xoffset)
  1343. X              &&( P_AYLOC==y+yoffset)) break;
  1344. X          if(armynum<MAXARM) standout();
  1345. X*** omain.c
  1346. X--- main.c
  1347. X**************
  1348. X*** 68,74
  1349. X  #endif SYSMAIL
  1350. X      int sflag=FALSE;
  1351. X  
  1352. X!     char defaultdir[256];
  1353. X      struct passwd *getpwnam();
  1354. X      owneruid=getuid();
  1355. X      strcpy(defaultdir, DEFAULTDIR);
  1356. X--- 68,74 -----
  1357. X  #endif SYSMAIL
  1358. X      int sflag=FALSE;
  1359. X  
  1360. X!     char defaultdir[256],tmppass[PASSLTH+1];
  1361. X      struct passwd *getpwnam();
  1362. X      owneruid=getuid();
  1363. X      strcpy(defaultdir, DEFAULTDIR);
  1364. X**************
  1365. X*** 94,100
  1366. X          putchar('\n');
  1367. X          exit(SUCCESS);
  1368. X      case 'd':
  1369. X!         strcpy(defaultdir, optarg);
  1370. X          break;
  1371. X      case 'n':
  1372. X          strcpy(name, optarg);
  1373. X--- 94,104 -----
  1374. X          putchar('\n');
  1375. X          exit(SUCCESS);
  1376. X      case 'd':
  1377. X!         if(optarg[0]!='/') {
  1378. X!             sprintf(defaultdir, "%s/%s", DEFAULTDIR, optarg);
  1379. X!         } else {
  1380. X!             strcpy(defaultdir, optarg);
  1381. X!         }
  1382. X          break;
  1383. X      case 'n':
  1384. X          strcpy(name, optarg);
  1385. X**************
  1386. X*** 191,197
  1387. X      curntn = &ntn[country];
  1388. X  
  1389. X      /*get encrypted password*/
  1390. X!     strncpy(passwd,crypt(getpass("\nwhat is your nation's password:"),SALT),PASSLTH);
  1391. X      if((strncmp(passwd,curntn->passwd,PASSLTH)!=0)
  1392. X      &&(strncmp(passwd,ntn[0].passwd,PASSLTH)!=0)) {
  1393. X          strncpy(passwd,crypt(getpass("\nerror: reenter your nation's password:"),SALT),PASSLTH);
  1394. X--- 195,202 -----
  1395. X      curntn = &ntn[country];
  1396. X  
  1397. X      /*get encrypted password*/
  1398. X!     strncpy(tmppass,getpass("\nwhat is your nation's password:"),PASSLTH);
  1399. X!     strncpy(passwd,crypt(tmppass,SALT),PASSLTH);
  1400. X      if((strncmp(passwd,curntn->passwd,PASSLTH)!=0)
  1401. X      &&(strncmp(passwd,ntn[0].passwd,PASSLTH)!=0)) {
  1402. X          strncpy(tmppass,getpass("\nerror: reenter your nation's password:"),PASSLTH);
  1403. X**************
  1404. X*** 194,200
  1405. X      strncpy(passwd,crypt(getpass("\nwhat is your nation's password:"),SALT),PASSLTH);
  1406. X      if((strncmp(passwd,curntn->passwd,PASSLTH)!=0)
  1407. X      &&(strncmp(passwd,ntn[0].passwd,PASSLTH)!=0)) {
  1408. X!         strncpy(passwd,crypt(getpass("\nerror: reenter your nation's password:"),SALT),PASSLTH);
  1409. X          if((strncmp(passwd,curntn->passwd,PASSLTH)!=0)
  1410. X          &&(strncmp(passwd,ntn[0].passwd,PASSLTH)!=0)) {
  1411. X              printf("\nsorry:");
  1412. X--- 199,206 -----
  1413. X      strncpy(passwd,crypt(tmppass,SALT),PASSLTH);
  1414. X      if((strncmp(passwd,curntn->passwd,PASSLTH)!=0)
  1415. X      &&(strncmp(passwd,ntn[0].passwd,PASSLTH)!=0)) {
  1416. X!         strncpy(tmppass,getpass("\nerror: reenter your nation's password:"),PASSLTH);
  1417. X!         strncpy(passwd,crypt(tmppass,SALT),PASSLTH);
  1418. X          if((strncmp(passwd,curntn->passwd,PASSLTH)!=0)
  1419. X          &&(strncmp(passwd,ntn[0].passwd,PASSLTH)!=0)) {
  1420. X              printf("\nsorry:");
  1421. X**************
  1422. X*** 1013,1022
  1423. X      mvaddstr(10,19, "Copyright (c) 1988 by Edward M Barlow");
  1424. X      mvaddstr(11,18,"Written Edward M Barlow and Adam Bryant");
  1425. X      mvaddstr(12,26,"All Rights Reserved");
  1426. X!     mvaddstr(LINES-7,21,"This version is for personal use only");
  1427. X!     mvaddstr(LINES-5,12,"It is expressly forbidden port this software to any form of");
  1428. X!     mvaddstr(LINES-4,12,"Personal Computer or to redistribute this software without");
  1429. X!     mvaddstr(LINES-3,18,"the permission of Edward Barlow or Adam Bryant");
  1430. X      mvprintw(LINES-1, 60, "PRESS ANY KEY");
  1431. X      refresh();
  1432. X  }
  1433. X--- 1019,1028 -----
  1434. X      mvaddstr(10,19, "Copyright (c) 1988 by Edward M Barlow");
  1435. X      mvaddstr(11,18,"Written Edward M Barlow and Adam Bryant");
  1436. X      mvaddstr(12,26,"All Rights Reserved");
  1437. X!     mvaddstr(LINES-7,19,"This version is for personal use only");
  1438. X!     mvaddstr(LINES-5,8,"It is expressly forbidden port this software to any form of");
  1439. X!     mvaddstr(LINES-4,8,"Personal Computer or to redistribute this software without");
  1440. X!     mvaddstr(LINES-3,14,"the permission of Edward Barlow or Adam Bryant");
  1441. X      mvprintw(LINES-1, 60, "PRESS ANY KEY");
  1442. X      refresh();
  1443. X  }
  1444. X*** onpc.c
  1445. X--- npc.c
  1446. X**************
  1447. X*** 89,95
  1448. X          if( curntn->active==NPC_NOMAD ) do_nomad();
  1449. X          else if( curntn->active==NPC_PIRATE ) do_pirate();
  1450. X          else if( curntn->active==NPC_BARBARIAN ) do_barbarian();
  1451. X!         else if( curntn->active==NPC_LIZARD ) do_lizard();
  1452. X      }
  1453. X  }
  1454. X  
  1455. X--- 89,95 -----
  1456. X          if( curntn->active==NPC_NOMAD ) do_nomad();
  1457. X          else if( curntn->active==NPC_PIRATE ) do_pirate();
  1458. X          else if( curntn->active==NPC_BARBARIAN ) do_barbarian();
  1459. X!         else if( curntn->active==NPC_LIZARD ) do_lizard(); /* update.c */
  1460. X      }
  1461. X  }
  1462. X  
  1463. X**************
  1464. X*** 101,107
  1465. X      int    x, y;
  1466. X  
  1467. X      /*move nomads */
  1468. X!     printf("updating nomad nation %d\n",country);
  1469. X      for(armynum=0;armynum<MAXARM;armynum++) if(P_ASOLD>0){
  1470. X          P_ASTAT=ATTACK;
  1471. X          P_AMOVE=(curntn->maxmove * *(unitmove+P_ATYPE%UTYPE))/10;
  1472. X--- 101,107 -----
  1473. X      int    x, y;
  1474. X  
  1475. X      /*move nomads */
  1476. X!     printf("updating nomad (nation %d)\n",country);
  1477. X      for(armynum=0;armynum<MAXARM;armynum++) if(P_ASOLD>0){
  1478. X          P_ASTAT=ATTACK;
  1479. X          P_AMOVE=(curntn->maxmove * *(unitmove+P_ATYPE%UTYPE))/10;
  1480. X**************
  1481. X*** 159,165
  1482. X      short armynum;
  1483. X      int x, y;
  1484. X  
  1485. X!     printf("updating barbarian nation %d\n",country);
  1486. X      for(armynum=0;armynum<MAXARM;armynum++) if(P_ASOLD>0){
  1487. X          P_ASTAT=ATTACK;
  1488. X          if(P_ATYPE<MINLEADER) {
  1489. X--- 159,165 -----
  1490. X      short armynum;
  1491. X      int x, y;
  1492. X  
  1493. X!     printf("updating barbarian (nation %d)\n",country);
  1494. X      for(armynum=0;armynum<MAXARM;armynum++) if(P_ASOLD>0){
  1495. X          P_ASTAT=ATTACK;
  1496. X          if(P_ATYPE<MINLEADER) {
  1497. X**************
  1498. X*** 206,223
  1499. X  }
  1500. X  
  1501. X  void
  1502. X- do_lizard()
  1503. X- {
  1504. X-     short armynum;
  1505. X- 
  1506. X-     printf("updating lizard nation %d\n",country);
  1507. X-     for(armynum=0;armynum<MAXARM;armynum++) if(P_ASOLD>0){
  1508. X-         P_ASOLD*=102;
  1509. X-         P_ASOLD/=100;
  1510. X-     }
  1511. X- }
  1512. X- 
  1513. X- void
  1514. X  do_pirate()
  1515. X  {
  1516. X      short nvynum,shipsize;
  1517. X--- 206,211 -----
  1518. X  }
  1519. X  
  1520. X  void
  1521. X  do_pirate()
  1522. X  {
  1523. X      short nvynum,shipsize;
  1524. X**************
  1525. X*** 223,229
  1526. X      short nvynum,shipsize;
  1527. X      int x, y, campx, campy;
  1528. X  
  1529. X!     printf("updating pirate nation %d\n",country);
  1530. X  
  1531. X      /* if pirate fleet within 3 attack if outnumber any fleets */
  1532. X      /* automatically find their base first */
  1533. X--- 211,217 -----
  1534. X      short nvynum,shipsize;
  1535. X      int x, y, campx, campy;
  1536. X  
  1537. X!     printf("updating pirate (nation %d)\n",country);
  1538. X  
  1539. X      /* if pirate fleet within 3 attack if outnumber any fleets */
  1540. X      /* automatically find their base first */
  1541. X*** otxt0
  1542. X--- txt0
  1543. X**************
  1544. X*** 46,52
  1545. X  and resources (civilians, troops, metal, gold...).  Play involves building,
  1546. X  moving, and controlling armies and navies, diplomacy with other players,
  1547. X  and adjusting economic activity, which is primarily geared to the production
  1548. X! of gold for your treasury.  Metals are needed, however to build ships & armies,
  1549. X  and food is needed to prevent revolts and keep people alive.
  1550. X  
  1551. X  Command line format: conquer [-hs -nNAT -dDIR]
  1552. X--- 46,52 -----
  1553. X  and resources (civilians, troops, metal, gold...).  Play involves building,
  1554. X  moving, and controlling armies and navies, diplomacy with other players,
  1555. X  and adjusting economic activity, which is primarily geared to the production
  1556. X! of gold for your treasury.  Also, metals are needed to build ships & armies,
  1557. X  and food is needed to prevent revolts and keep people alive.
  1558. X  
  1559. X  Command line format: conquer [-hs -nNAT -dDIR]
  1560. X*** otxt1
  1561. X--- txt1
  1562. X**************
  1563. X*** 55,61
  1564. X  Orc nations are very special in Conquer.  The only thing an orc is good at is 
  1565. X  making other orcs.  They are slow, poor at combat, & bad in special abilities.
  1566. X  They can get reproduction of up to 14% per year (the normal limit is 10%) & 
  1567. X! can start with a large number of people as initial reproduction costs are less 
  1568. X  than normal.  Orcs are led by monsters (they start with MINOR MONSTER power),
  1569. X  and are always evil (the only good orc is a dead orc...).  They are so nasty,
  1570. X  EVERYBODY they meet start out hostile (50%) or at war (50%) with them.
  1571. X--- 55,61 -----
  1572. X  Orc nations are very special in Conquer.  The only thing an orc is good at is 
  1573. X  making other orcs.  They are slow, poor at combat, & bad in special abilities.
  1574. X  They can get reproduction of up to 14% per year (the normal limit is 10%) & 
  1575. X! can start with a large number of people as initial reproduction costs are less
  1576. X  than normal.  Orcs are led by monsters (they start with MINOR MONSTER power),
  1577. X  and are always evil (the only good orc is a dead orc...).  They are so nasty,
  1578. X  EVERYBODY they meet start out hostile (50%) or at war (50%) with them.
  1579. X
  1580. END_OF_FILE
  1581. if test 45250 -ne `wc -c <'patches01'`; then
  1582.     echo shar: \"'patches01'\" unpacked with wrong size!
  1583. fi
  1584. # end of 'patches01'
  1585. fi
  1586. echo shar: End of shell archive.
  1587. exit 0
  1588.