home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume6 / conquer4 / patch2a < prev    next >
Encoding:
Internet Message Format  |  1989-07-13  |  56.5 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: v07i010:  conquer4 - middle earth multi-player game (V4), Patch2
  5. Message-ID: <4223@tekred.CNA.TEK.COM>
  6. Date: 12 Jul 89 13:41:46 GMT
  7. Sender: nobody@tekred.CNA.TEK.COM
  8. Lines: 1792
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: adb@bu-cs.bu.edu (Adam Bryant)
  12. Posting-number: Volume 7, Issue 10
  13. Archive-name: conquer4/Patch2a
  14. Patch-To: conquer4: Volume 6, Issue 83-96
  15.  
  16. [Feed this file directly to patch(1).  -br]
  17.  
  18.     [[This is patch number two to conquer version 4.0.
  19.       (making it conquer version 4.2!)
  20.       see notes.v4 for changes.
  21.  
  22.       Part 1 is a patch file.
  23.       Part 2 is a new Makefile.  [Just replace the
  24.        current Makefile with it.]
  25.  
  26.       adam]]
  27.  
  28. #! /bin/sh
  29. # This is a shell archive.  Remove anything before this line, then unpack
  30. # it by saving it into a file and typing "sh file".  To overwrite existing
  31. # files, type "sh file -c".  You can also feed this as standard input via
  32. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  33. # will see the following message at the end:
  34. #        "End of shell archive."
  35. # Contents:  patches02a
  36. # Wrapped by billr@saab on Wed Jul 12 06:35:06 1989
  37. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  38. if test -f 'patches02a' -a "${1}" != "-c" ; then 
  39.   echo shar: Will not clobber existing file \"'patches02a'\"
  40. else
  41. echo shar: Extracting \"'patches02a'\" \(54373 characters\)
  42. sed "s/^X//" >'patches02a' <<'END_OF_FILE'
  43. X*** opatchlevel.h
  44. X--- patchlevel.h
  45. X**************
  46. X*** 1
  47. X! #define PATCHLEVEL    1
  48. X--- 1 -----
  49. X! #define PATCHLEVEL    2
  50. X*** onotes.v4
  51. X--- notes.v4
  52. X**************
  53. X*** 18,23
  54. X    9. merged do_lizard() and updlizard().  [used name do_lizard()].
  55. X   10. fixed bug with getchar querys in makeworl.c.
  56. X   11. fixed bug with y < MAPX mistype in randeven.c.
  57. X  
  58. X  -------------------------------------------------------------------------
  59. X  | 1.0 POSSIBLE SHORT-TERM ENHANCEMENTS/FIXES FOR CONQUER V4        |
  60. X--- 18,45 -----
  61. X    9. merged do_lizard() and updlizard().  [used name do_lizard()].
  62. X   10. fixed bug with getchar querys in makeworl.c.
  63. X   11. fixed bug with y < MAPX mistype in randeven.c.
  64. X+ ===4.0 patch number one released => 4.1 ==========================
  65. X+  12. fixed underflow problems with unsigned chars xloc,yloc,xcap,ycap.
  66. X+  13. misc.c(834): changed "owner=DCAPITOL" to "designation=DCAPITOL".
  67. X+  14. npc.c(171,172): changed rand()%2-1 to rand()%3-1.
  68. X+  15. randeven.c: put #ifdef MONSTER around nomad raid section.
  69. X+  16. reports.c(618): changed flthold() to fltmhold().
  70. X+  17. combat.c(488,510): changed "-=0" to "=0".
  71. X+  18. newlogin.c(507): changed temp < points to temp > points.
  72. X+  19. newlogin.c(795): added  "& MAPY > 24".
  73. X+  20. extcmds.c(365): fixed check on same location for merging groups.
  74. X+  21. newhelp.c(163): added #ifdef for RANEVENT to newhelp.c.
  75. X+  22. altered map printing routines to send to stdout, and have stderr be
  76. X+     for communicating with the user.  so now "conqrun -p > foo" works.
  77. X+  23. removed password checking under -p option. would only be useful if
  78. X+     OGOD was defined, and if that was the case, only god could get
  79. X+     to that point anyway.
  80. X+  24. made copyright screen variable with screen size.
  81. X+  25. added TIMELOG feature to use system date command to show last update time.
  82. X+  26. made errormsg display on COLS-20 instead of 60.  fixed up display bugs.
  83. X+  27. added more names to rebel name list.
  84. X+  28. worked on Makefile.  [made sure of parallelism; ready to distribute]
  85. X+  29. reworded treasury display on budget screen for clarity.
  86. X  
  87. X  -------------------------------------------------------------------------
  88. X  | 1.0 POSSIBLE SHORT-TERM ENHANCEMENTS/FIXES FOR CONQUER V4        |
  89. X**************
  90. X*** 22,27
  91. X  -------------------------------------------------------------------------
  92. X  | 1.0 POSSIBLE SHORT-TERM ENHANCEMENTS/FIXES FOR CONQUER V4        |
  93. X  -------------------------------------------------------------------------
  94. X  o fix the helpfiles to reflect current changes in game as noted later in this
  95. X      file.
  96. X  o there is some overflow somewhere, which creates a huge amount of gold
  97. X--- 44,52 -----
  98. X  -------------------------------------------------------------------------
  99. X  | 1.0 POSSIBLE SHORT-TERM ENHANCEMENTS/FIXES FOR CONQUER V4        |
  100. X  -------------------------------------------------------------------------
  101. X+ o make land capture only occur during update.
  102. X+ o make the create world routine interactive with curses display.
  103. X+ o make the newlogin routine interactive with curses display.
  104. X  o fix the helpfiles to reflect current changes in game as noted later in this
  105. X      file.
  106. X  o there is some overflow somewhere, which creates a huge amount of gold
  107. X**************
  108. X*** 32,38
  109. X  o adjust spew.c and write new rules files for
  110. X      1) random npc mail
  111. X      2) npc delcarations of war
  112. X! o Treaty war delcarations only last one turn ????  It seems to revert sometimes.
  113. X  o reward for killing monsters 10K Gold and 1K Jewels per 50 men-equivalent.
  114. X  o implement sacking of capitol instead of destruction of nation.  This
  115. X      should award all iron, gold and jewels to the successor, but leave
  116. X--- 57,63 -----
  117. X  o adjust spew.c and write new rules files for
  118. X      1) random npc mail
  119. X      2) npc delcarations of war
  120. X! o Treaty war delcarations only last one turn ???? It seems to revert sometimes.
  121. X  o reward for killing monsters 10K Gold and 1K Jewels per 50 men-equivalent.
  122. X  o implement new method for detection of captured lands.  if any allies of
  123. X      sector owner in sector, prevent taking of sector;  otherwise, award
  124. X**************
  125. X*** 34,43
  126. X      2) npc delcarations of war
  127. X  o Treaty war delcarations only last one turn ????  It seems to revert sometimes.
  128. X  o reward for killing monsters 10K Gold and 1K Jewels per 50 men-equivalent.
  129. X- o implement sacking of capitol instead of destruction of nation.  This
  130. X-     should award all iron, gold and jewels to the successor, but leave
  131. X-     food (or a good portion of it) with the nation owner.  This should
  132. X-     be implemented on all nations, including pcs.
  133. X  o implement new method for detection of captured lands.  if any allies of
  134. X      sector owner in sector, prevent taking of sector;  otherwise, award
  135. X      sector to nation with more troops if troops are twice the remaining
  136. X--- 59,64 -----
  137. X      2) npc delcarations of war
  138. X  o Treaty war delcarations only last one turn ???? It seems to revert sometimes.
  139. X  o reward for killing monsters 10K Gold and 1K Jewels per 50 men-equivalent.
  140. X  o implement new method for detection of captured lands.  if any allies of
  141. X      sector owner in sector, prevent taking of sector;  otherwise, award
  142. X      sector to nation with more troops if troops are twice the remaining
  143. X**************
  144. X*** 57,63
  145. X    in a city will have a 50% (+5% for added leader) chance of stopping a bad 
  146. X    event.
  147. X  o All units should have loyalty ratings, and can revolt.  
  148. X- o Newlogin setup should be revamped to use curses display.  Better control.
  149. X  o Revamp user help interface to allow searching through help files.
  150. X  o leader experience.  mail to nation if happen.  This has untold impacts on
  151. X      combat... and i dont want to touch it yet. sorry.
  152. X--- 78,83 -----
  153. X    in a city will have a 50% (+5% for added leader) chance of stopping a bad 
  154. X    event.
  155. X  o All units should have loyalty ratings, and can revolt.  
  156. X  o Revamp user help interface to allow searching through help files.
  157. X  o leader experience.  mail to nation if happen.  This has untold impacts on
  158. X      combat... and i dont want to touch it yet. sorry.
  159. X*** oheader.h
  160. X--- header.h
  161. X**************
  162. X*** 49,54
  163. X  #define SPOOLDIR "/usr/spool/mail"    /* location of mail spool    */
  164. X  #define FILELOCK    /* if your system supports BSD flock()        */
  165. X              /* other file locking is not well implemented    */
  166. X  
  167. X  #define NTOTAL 25    /* max # of nations ( player + npc + monster )    */
  168. X  #define MAXPTS    65    /* points for players to buy stuff with at start*/
  169. X--- 49,55 -----
  170. X  #define SPOOLDIR "/usr/spool/mail"    /* location of mail spool    */
  171. X  #define FILELOCK    /* if your system supports BSD flock()        */
  172. X              /* other file locking is not well implemented    */
  173. X+ #define TIMELOG    /* if your system has the date command        */
  174. X  
  175. X  #define NTOTAL 25    /* max # of nations ( player + npc + monster )    */
  176. X  #define MAXPTS    65    /* points for players to buy stuff with at start*/
  177. X*** odata.h
  178. X--- data.h
  179. X**************
  180. X*** 900,906
  181. X  extern    int    unitmove[], unitattack[], unitdefend[];
  182. X  
  183. X  /*    file name definitions    */
  184. X! extern    char *sortname,*exefile,*datafile,*msgfile,*helpfile,*newsfile,*isonfile;
  185. X  
  186. X  #ifdef CONQUER
  187. X  extern    int    conq_mail_status;
  188. X--- 900,907 -----
  189. X  extern    int    unitmove[], unitattack[], unitdefend[];
  190. X  
  191. X  /*    file name definitions    */
  192. X! extern    char *sortname,*exefile,*datafile,*msgfile;
  193. X! extern    char *helpfile,*newsfile,*isonfile,*timefile;
  194. X  
  195. X  #ifdef CONQUER
  196. X  extern    int    conq_mail_status;
  197. X*** oadmin.c
  198. X--- admin.c
  199. X**************
  200. X*** 178,195
  201. X          unlink(string);
  202. X          exit(SUCCESS);
  203. X      } else if (pflag) {    /* print a map of the game */
  204. X! #ifdef OGOD
  205. X!         if(strncmp(crypt(getpass("\nwhat is conquer super user password:"),SALT),ntn[0].passwd,PASSLTH)!=0) {
  206. X!             printf("sorry, must be super user to get map\n");
  207. X!             exit(FAIL);
  208. X!         }
  209. X! #endif OGOD
  210. X!         printf("For Convienience, output is to stderr\n");
  211. X!         printf("what type of map\noptions are\n");
  212. X!         printf("\t1) altitudes\n\t2) vegetations\n");
  213. X!         printf("\t3) nations\n\n");
  214. X!         printf("\tINPUT:");
  215. X!         scanf("%hd",&dismode);
  216. X          if(dismode==1) printele();
  217. X          else if(dismode==2) printveg();
  218. X          else pr_ntns();
  219. X--- 178,191 -----
  220. X          unlink(string);
  221. X          exit(SUCCESS);
  222. X      } else if (pflag) {    /* print a map of the game */
  223. X!         fprintf(stderr,"\nFor convenience, this output is to stderr,\n");
  224. X!         fprintf(stderr,"while the maps will be sent to stdout.\n\n");
  225. X!         fprintf(stderr,"\tThe valid options are,\n");
  226. X!         fprintf(stderr,"\t\t1) altitudes\n\t\t2) vegetations\n");
  227. X!         fprintf(stderr,"\t\t3) nations\n\n");
  228. X!         fprintf(stderr,"\tWhat type of map? ");
  229. X!         scanf("%hd", &dismode);
  230. X!         fprintf(stderr,"\n");
  231. X          if(dismode==1) printele();
  232. X          else if(dismode==2) printveg();
  233. X          else pr_ntns();
  234. X**************
  235. X*** 222,227
  236. X          update();
  237. X          writedata();
  238. X          unlink(string);
  239. X          exit(SUCCESS);
  240. X      }
  241. X      printf("error: must specify an option\n");
  242. X--- 218,227 -----
  243. X          update();
  244. X          writedata();
  245. X          unlink(string);
  246. X+ #ifdef TIMELOG
  247. X+         sprintf(string, "date > %s", timefile);
  248. X+         system(string);
  249. X+ #endif /* TIMELOG */
  250. X          exit(SUCCESS);
  251. X      }
  252. X      printf("error: must specify an option\n");
  253. X*** oextcmds.c
  254. X--- extcmds.c
  255. X**************
  256. X*** 269,276
  257. X          return;
  258. X      }
  259. X  
  260. X!     oldx=P_AXLOC;
  261. X!     oldy=P_AYLOC;
  262. X      army2=armynum;
  263. X  
  264. X      armynum=(-1);
  265. X--- 269,276 -----
  266. X          return;
  267. X      }
  268. X  
  269. X!     oldx=(int)P_AXLOC;
  270. X!     oldy=(int)P_AYLOC;
  271. X      army2=armynum;
  272. X  
  273. X      armynum=(-1);
  274. X**************
  275. X*** 317,323
  276. X  {
  277. X      mvaddstr(LINES-1, 0, str);
  278. X      clrtoeol();
  279. X!     mvaddstr(LINES-1, 60, "PRESS ANY KEY");
  280. X      beep();
  281. X      refresh();
  282. X      getch();
  283. X--- 317,323 -----
  284. X  {
  285. X      mvaddstr(LINES-1, 0, str);
  286. X      clrtoeol();
  287. X!     mvaddstr(LINES-1, COLS-20, "PRESS ANY KEY");
  288. X      beep();
  289. X      refresh();
  290. X      getch();
  291. X**************
  292. X*** 362,368
  293. X          return;
  294. X      }
  295. X      if((P_AXLOC != curntn->arm[group].xloc)
  296. X!     &&(P_AXLOC != curntn->arm[group].xloc)){
  297. X          errormsg("units are not in same sector");
  298. X          return;
  299. X      }
  300. X--- 362,368 -----
  301. X          return;
  302. X      }
  303. X      if((P_AXLOC != curntn->arm[group].xloc)
  304. X!     ||(P_AYLOC != curntn->arm[group].yloc)){
  305. X          errormsg("units are not in same sector");
  306. X          return;
  307. X      }
  308. X*** omakeworl.c
  309. X--- makeworl.c
  310. X**************
  311. X*** 45,51
  312. X  int    rflag;        /* TRUE if you wish to read in a map from mapfiles */
  313. X  {
  314. X      char passwd[PASSLTH+1],*getpass();
  315. X!     char newstring[100];
  316. X      FILE *fopen();
  317. X  
  318. X      /*abort if datafile currently exists*/
  319. X--- 45,51 -----
  320. X  int    rflag;        /* TRUE if you wish to read in a map from mapfiles */
  321. X  {
  322. X      char passwd[PASSLTH+1],*getpass();
  323. X!     char newstring[200];
  324. X      FILE *fopen();
  325. X  
  326. X      /*abort if datafile currently exists*/
  327. X**************
  328. X*** 70,76
  329. X  
  330. X      printf("First, we must zero extraneous files from prior games\n");
  331. X      printf("\tignore any errors this causes\n");
  332. X!     sprintf(newstring,"rm -f %s* %s* %s* %s* %s 2> /dev/null",exefile,msgfile,newsfile,isonfile,tradefile);
  333. X      printf("\t%s\n",newstring);
  334. X      system(newstring);
  335. X      printf("OK This has been done, Now to set up a new world\n\n");
  336. X--- 70,77 -----
  337. X  
  338. X      printf("First, we must zero extraneous files from prior games\n");
  339. X      printf("\tignore any errors this causes\n");
  340. X!     sprintf(newstring,"rm -f %s* %s* %s* %s* %s %s 2> /dev/null",
  341. X!         exefile, msgfile, newsfile, isonfile, tradefile, timefile);
  342. X      printf("\t%s\n",newstring);
  343. X      system(newstring);
  344. X      printf("OK This has been done, Now to set up a new world\n\n");
  345. X*** osort.c
  346. X--- sort.c
  347. X**************
  348. X*** 27,32
  349. X   * Initial Revision:        (adb@bucsf.bu.edu)
  350. X   *     Tuesday March 21th, 1989 - Began the program at 23:26 EST
  351. X   *     Wednesday March 22nd, 1989 - Finished the initial version 11:29 EST
  352. X   */
  353. X  
  354. X  #include <stdio.h>
  355. X--- 27,33 -----
  356. X   * Initial Revision:        (adb@bucsf.bu.edu)
  357. X   *     Tuesday March 21th, 1989 - Began the program at 23:26 EST
  358. X   *     Wednesday March 22nd, 1989 - Finished the initial version 11:29 EST
  359. X+  *     Wednesday July 5th, 1989 - Stopped use of sysexits.h 7:22 EST
  360. X   */
  361. X  
  362. X  #include <stdio.h>
  363. X**************
  364. X*** 30,38
  365. X   */
  366. X  
  367. X  #include <stdio.h>
  368. X- #ifndef HPUX
  369. X- #include <sysexits.h>
  370. X- #endif HPUX
  371. X  #include <ctype.h>
  372. X  
  373. X  /* system definitions just in case */
  374. X--- 31,36 -----
  375. X   */
  376. X  
  377. X  #include <stdio.h>
  378. X  #include <ctype.h>
  379. X  
  380. X  /* system definitions just in case */
  381. X**************
  382. X*** 39,45
  383. X  #ifndef FALSE
  384. X  #define FALSE (0)
  385. X  #define TRUE  (1)
  386. X! #endif
  387. X  
  388. X  /* check for system exit definitions */
  389. X  #ifndef EX_OK
  390. X--- 37,43 -----
  391. X  #ifndef FALSE
  392. X  #define FALSE (0)
  393. X  #define TRUE  (1)
  394. X! #endif /* FALSE */
  395. X  
  396. X  /* system exit definitions from sysexits.h on BSD machines */
  397. X  #ifndef EX_OK
  398. X**************
  399. X*** 41,47
  400. X  #define TRUE  (1)
  401. X  #endif
  402. X  
  403. X! /* check for system exit definitions */
  404. X  #ifndef EX_OK
  405. X  #define EX_OK             0   /* successful termination */
  406. X  #define EX_USAGE          64  /* invalid command line format */
  407. X--- 39,45 -----
  408. X  #define TRUE  (1)
  409. X  #endif /* FALSE */
  410. X  
  411. X! /* system exit definitions from sysexits.h on BSD machines */
  412. X  #ifndef EX_OK
  413. X  #define EX_OK             0   /* successful termination */
  414. X  #define EX_USAGE          64  /* invalid command line format */
  415. X**************
  416. X*** 48,54
  417. X  #define EX_NOINPUT        66  /* could not open input file */
  418. X  #define EX_SOFTWARE       70  /* software error; couldn't malloc */
  419. X  #define EX_CANTCREAT      73  /* could not create output file */
  420. X! #endif
  421. X  
  422. X  /* number of characters to compare by default */
  423. X  #define DEFAULT_COMP 2
  424. X--- 46,52 -----
  425. X  #define EX_NOINPUT        66  /* could not open input file */
  426. X  #define EX_SOFTWARE       70  /* software error; couldn't malloc */
  427. X  #define EX_CANTCREAT      73  /* could not create output file */
  428. X! #endif /* EX_OK */
  429. X  
  430. X  /* number of characters to compare by default */
  431. X  #define DEFAULT_COMP 2
  432. X*** orandeven.c
  433. X--- randeven.c
  434. X**************
  435. X*** 5,11
  436. X  #include    "data.h"
  437. X  
  438. X  #ifdef RANEVENT
  439. X- #ifdef ADMIN
  440. X  char    *names[] = {        /* must end in single character name */
  441. X      "groo","brok","vul","poin","srop","hoga","nobi","bonz","gail",
  442. X      "lynn","zorb","theed","urda","X"
  443. X--- 5,10 -----
  444. X  #include    "data.h"
  445. X  
  446. X  #ifdef RANEVENT
  447. X  char    *names[] = {        /* must end in single character name */
  448. X      "groo","brok","vul","poin","srop","hoga","nobi","bonz","gail",
  449. X      "lynn","zorb","theed","urda","anima","bedlam","delos","quin",
  450. X**************
  451. X*** 8,14
  452. X  #ifdef ADMIN
  453. X  char    *names[] = {        /* must end in single character name */
  454. X      "groo","brok","vul","poin","srop","hoga","nobi","bonz","gail",
  455. X!     "lynn","zorb","theed","urda","X"
  456. X  };
  457. X  
  458. X  extern FILE *fnews;
  459. X--- 7,14 -----
  460. X  #ifdef RANEVENT
  461. X  char    *names[] = {        /* must end in single character name */
  462. X      "groo","brok","vul","poin","srop","hoga","nobi","bonz","gail",
  463. X!     "lynn","zorb","theed","urda","anima","bedlam","delos","quin",
  464. X!     "xynd","putz","erde","clym","fanz","ilth","X"
  465. X  };
  466. X  
  467. X  extern FILE *fnews;
  468. X**************
  469. X*** 556,561
  470. X              curntn->jewels+=longval;
  471. X              break;
  472. X          case 25:
  473. X              /*nomad raid -- put large nomad army in area*/
  474. X              for( holdval=1;holdval<NTOTAL;holdval++ )
  475. X                  if( ntn[holdval].active==NPC_NOMAD ) break;
  476. X--- 556,562 -----
  477. X              curntn->jewels+=longval;
  478. X              break;
  479. X          case 25:
  480. X+ #ifdef MONSTER
  481. X              /*nomad raid -- put large nomad army in area*/
  482. X              for( holdval=1;holdval<NTOTAL;holdval++ )
  483. X                  if( ntn[holdval].active==NPC_NOMAD ) break;
  484. X**************
  485. X*** 591,596
  486. X              }
  487. X              done=TRUE;
  488. X              break;
  489. X          case 26:
  490. X              /*town burns -- reduce fort and redesignate*/
  491. X              holdval=0;
  492. X--- 592,598 -----
  493. X              }
  494. X              done=TRUE;
  495. X              break;
  496. X+ #endif MONSTER
  497. X          case 26:
  498. X              /*town burns -- reduce fort and redesignate*/
  499. X              holdval=0;
  500. X**************
  501. X*** 1105,1109
  502. X  weather()
  503. X  {
  504. X  }
  505. X- #endif ADMIN
  506. X  #endif RANEVENT
  507. X--- 1107,1110 -----
  508. X  weather()
  509. X  {
  510. X  }
  511. X  #endif RANEVENT
  512. X*** omisc.c
  513. X--- misc.c
  514. X**************
  515. X*** 831,837
  516. X      } else if(isnpc(curntn->active)) {
  517. X          if(sct[curntn->capx][curntn->capy].owner==country) {
  518. X              /* reset capitol for npcs */
  519. X!             sct[curntn->capx][curntn->capy].owner=DCAPITOL;
  520. X              if(sct[curntn->capx][curntn->capy].fortress<1)
  521. X                  sct[curntn->capx][curntn->capy].fortress=1;
  522. X          }
  523. X--- 831,837 -----
  524. X      } else if(isnpc(curntn->active)) {
  525. X          if(sct[curntn->capx][curntn->capy].owner==country) {
  526. X              /* reset capitol for npcs */
  527. X!             sct[curntn->capx][curntn->capy].designation=DCAPITOL;
  528. X              if(sct[curntn->capx][curntn->capy].fortress<1)
  529. X                  sct[curntn->capx][curntn->capy].fortress=1;
  530. X          }
  531. X*** oreports.c
  532. X--- reports.c
  533. X**************
  534. X*** 91,98
  535. X                  standend();
  536. X                  mvprintw(ypos+1,xpos,"%ld",P_ASOLD);
  537. X                  mvprintw(ypos+2,xpos,"%d",P_AMOVE);
  538. X!                 mvprintw(ypos+3,xpos,"%d",P_AXLOC);
  539. X!                 mvprintw(ypos+4,xpos,"%d",P_AYLOC);
  540. X                  if(P_ASTAT>=NUMSTATUS)
  541. X                  mvprintw(ypos+5,xpos,"group %d",P_ASTAT-NUMSTATUS);
  542. X                  else
  543. X--- 91,98 -----
  544. X                  standend();
  545. X                  mvprintw(ypos+1,xpos,"%ld",P_ASOLD);
  546. X                  mvprintw(ypos+2,xpos,"%d",P_AMOVE);
  547. X!                 mvprintw(ypos+3,xpos,"%d",(int)P_AXLOC);
  548. X!                 mvprintw(ypos+4,xpos,"%d",(int)P_AYLOC);
  549. X                  if(P_ASTAT>=NUMSTATUS)
  550. X                  mvprintw(ypos+5,xpos,"group %d",P_ASTAT-NUMSTATUS);
  551. X                  else
  552. X**************
  553. X*** 328,334
  554. X      standout();
  555. X      mvprintw(3,0,  "nation name is......%s",curntn->name);
  556. X      standend();
  557. X!     mvprintw(4,0,  "talons in treasury.$%ld",startgold);
  558. X      mvprintw(5,0,  "number of sectors...%d",spread.sectors);
  559. X      if(curntn->tfood<2*curntn->tciv) standout();
  560. X      mvprintw(7,0,  "granary holds.....%8ld",curntn->tfood);
  561. X--- 328,334 -----
  562. X      standout();
  563. X      mvprintw(3,0,  "nation name is......%s",curntn->name);
  564. X      standend();
  565. X!     mvprintw(4,0,  "starting treasury..$%ld",startgold);
  566. X      mvprintw(5,0,  "number of sectors...%d",spread.sectors);
  567. X      if(curntn->tfood<2*curntn->tciv) standout();
  568. X      mvprintw(7,0,  "granary holds.....%8ld",curntn->tfood);
  569. X**************
  570. X*** 355,361
  571. X      money=spread.gold - curntn->tgold - money;    /* net income */
  572. X      standend();
  573. X      mvprintw(17,COLS-50,"NET INCOME....................%8ld",money);
  574. X!     mvprintw(16,COLS-50,"CHARITY.......................%8ld",max((money*curntn->charity)/100,0));
  575. X      standout();
  576. X      mvprintw(18,COLS-50,"NEXT SEASON'S TREASURY........%8ld",(startgold + money)*(100-curntn->charity)/100);
  577. X  
  578. X--- 355,361 -----
  579. X      money=spread.gold - curntn->tgold - money;    /* net income */
  580. X      standend();
  581. X      mvprintw(17,COLS-50,"NET INCOME....................%8ld",money);
  582. X!     mvprintw(16,COLS-50,"CHARITY.......................%8ld",max((money*(long)curntn->charity)/100L,0L));
  583. X      standout();
  584. X      mvprintw(18,COLS-50,"NEXT SEASON'S TREASURY........%8ld",(startgold + money)*(100L-(long)curntn->charity)/100L);
  585. X  
  586. X**************
  587. X*** 357,363
  588. X      mvprintw(17,COLS-50,"NET INCOME....................%8ld",money);
  589. X      mvprintw(16,COLS-50,"CHARITY.......................%8ld",max((money*curntn->charity)/100,0));
  590. X      standout();
  591. X!     mvprintw(18,COLS-50,"NEXT SEASON'S TREASURY........%8ld",(startgold + money)*(100-curntn->charity)/100);
  592. X  
  593. X      mvaddstr(LINES-3,(COLS/2)-15,"HIT 'P' TO SEE PRODUCTION SCREEN");
  594. X      mvaddstr(LINES-2,(COLS/2)-15,"HIT 'C' FOR CHANGE NATION SCREEN");
  595. X--- 357,363 -----
  596. X      mvprintw(17,COLS-50,"NET INCOME....................%8ld",money);
  597. X      mvprintw(16,COLS-50,"CHARITY.......................%8ld",max((money*(long)curntn->charity)/100L,0L));
  598. X      standout();
  599. X!     mvprintw(18,COLS-50,"NEXT SEASON'S TREASURY........%8ld",(startgold + money)*(100L-(long)curntn->charity)/100L);
  600. X  
  601. X      mvaddstr(LINES-3,(COLS/2)-15,"HIT 'P' TO SEE PRODUCTION SCREEN");
  602. X      mvaddstr(LINES-2,(COLS/2)-15,"HIT 'C' FOR CHANGE NATION SCREEN");
  603. X**************
  604. X*** 408,414
  605. X      standout();
  606. X      mvprintw(4,0,  "nation name is....%s",curntn->name);
  607. X      standend();
  608. X!     mvprintw(5,0,  "talons in treasury..$%ld",startgold);
  609. X      mvaddstr(7,0,  "FOOD PRODUCTION");
  610. X      mvprintw(9,0,  "granary now holds.........%8ld tons",curntn->tfood);
  611. X      mvprintw(10,0, "%8ld people in farms..%8ld tons",spread.infarm,spread.food - curntn->tfood);
  612. X--- 408,414 -----
  613. X      standout();
  614. X      mvprintw(4,0,  "nation name is....%s",curntn->name);
  615. X      standend();
  616. X!     mvprintw(5,0,  "talons in treasury..$%ld",curntn->tgold);
  617. X      mvaddstr(7,0,  "FOOD PRODUCTION");
  618. X      mvprintw(9,0,  "granary now holds.........%8ld tons",curntn->tfood);
  619. X      mvprintw(10,0, "%8ld people in farms..%8ld tons",spread.infarm,spread.food - curntn->tfood);
  620. X**************
  621. X*** 615,621
  622. X                      crew = flthold(nvynum)*P_NCREW;
  623. X                      people = fltmhold(nvynum)*P_NPEOP;
  624. X                      crew += flthold(newnavy)*curntn->nvy[newnavy].crew;
  625. X!                     people += flthold(newnavy)*curntn->nvy[newnavy].people;
  626. X                      for(i=N_LIGHT;i<=N_HEAVY;i++) {
  627. X                          (void) addwships(newnavy,i,P_NWAR(i));
  628. X                          (void) addmships(newnavy,i,P_NMER(i));
  629. X--- 615,621 -----
  630. X                      crew = flthold(nvynum)*P_NCREW;
  631. X                      people = fltmhold(nvynum)*P_NPEOP;
  632. X                      crew += flthold(newnavy)*curntn->nvy[newnavy].crew;
  633. X!                     people += fltmhold(newnavy)*curntn->nvy[newnavy].people;
  634. X                      for(i=N_LIGHT;i<=N_HEAVY;i++) {
  635. X                          (void) addwships(newnavy,i,P_NWAR(i));
  636. X                          (void) addmships(newnavy,i,P_NMER(i));
  637. X*** ocombat.c
  638. X--- combat.c
  639. X**************
  640. X*** 484,491
  641. X                  Aloss+=loss;
  642. X                  ntn[owner[i]].arm[unit[i]].sold-=loss;
  643. X                  if((ntn[owner[i]].arm[unit[i]].unittyp==A_MILITIA)&&(retreatside==ATKR)) {
  644. X!                 sct[ntn[owner[i]].arm[unit[i]].xloc][ntn[owner[i]].arm[unit[i]].yloc].people += ntn[owner[i]].arm[unit[i]].sold;
  645. X!                 ntn[owner[i]].arm[unit[i]].sold-=0;
  646. X                  }
  647. X              }
  648. X          } else if(side[i]==DFND){
  649. X--- 484,491 -----
  650. X                  Aloss+=loss;
  651. X                  ntn[owner[i]].arm[unit[i]].sold-=loss;
  652. X                  if((ntn[owner[i]].arm[unit[i]].unittyp==A_MILITIA)&&(retreatside==ATKR)) {
  653. X!                     sct[ntn[owner[i]].arm[unit[i]].xloc][ntn[owner[i]].arm[unit[i]].yloc].people += ntn[owner[i]].arm[unit[i]].sold;
  654. X!                     ntn[owner[i]].arm[unit[i]].sold=0;
  655. X                  }
  656. X              }
  657. X          } else if(side[i]==DFND){
  658. X**************
  659. X*** 506,513
  660. X                  Dloss+=loss;
  661. X                  ntn[owner[i]].arm[unit[i]].sold-=loss;
  662. X                  if((ntn[owner[i]].arm[unit[i]].unittyp==A_MILITIA)&&(retreatside==DFND)) {
  663. X!                 sct[ntn[owner[i]].arm[unit[i]].xloc][ntn[owner[i]].arm[unit[i]].yloc].people += ntn[owner[i]].arm[unit[i]].sold;
  664. X!                 ntn[owner[i]].arm[unit[i]].sold-=0;
  665. X                  }
  666. X              }
  667. X          }
  668. X--- 506,513 -----
  669. X                  Dloss+=loss;
  670. X                  ntn[owner[i]].arm[unit[i]].sold-=loss;
  671. X                  if((ntn[owner[i]].arm[unit[i]].unittyp==A_MILITIA)&&(retreatside==DFND)) {
  672. X!                     sct[ntn[owner[i]].arm[unit[i]].xloc][ntn[owner[i]].arm[unit[i]].yloc].people += ntn[owner[i]].arm[unit[i]].sold;
  673. X!                     ntn[owner[i]].arm[unit[i]].sold=0;
  674. X                  }
  675. X              }
  676. X          }
  677. X*** omove.c
  678. X--- move.c
  679. X**************
  680. X*** 165,171
  681. X                  }
  682. X                  for(i=0;i<MAXARM;i++) if(curntn->arm[i].sold>0){
  683. X                      standout();
  684. X!                     see(curntn->arm[i].xloc-xoffset,curntn->arm[i].yloc-yoffset);
  685. X                  }
  686. X                      for(i=0;i<MAXNAVY;i++) if(curntn->nvy[i].merchant+curntn->nvy[i].warships+curntn->nvy[i].galleys!=0){
  687. X                      standout();
  688. X--- 165,171 -----
  689. X                  }
  690. X                  for(i=0;i<MAXARM;i++) if(curntn->arm[i].sold>0){
  691. X                      standout();
  692. X!                     see((int)curntn->arm[i].xloc-xoffset,(int)curntn->arm[i].yloc-yoffset);
  693. X                  }
  694. X                      for(i=0;i<MAXNAVY;i++) if(curntn->nvy[i].merchant+curntn->nvy[i].warships+curntn->nvy[i].galleys!=0){
  695. X                      standout();
  696. X**************
  697. X*** 169,175
  698. X                  }
  699. X                      for(i=0;i<MAXNAVY;i++) if(curntn->nvy[i].merchant+curntn->nvy[i].warships+curntn->nvy[i].galleys!=0){
  700. X                      standout();
  701. X!                     see(curntn->nvy[i].xloc-xoffset,curntn->nvy[i].yloc-yoffset);
  702. X  
  703. X                  }
  704. X              } else for(i=XREAL-xoffset-1;i<=XREAL-xoffset+1;i++){
  705. X--- 169,175 -----
  706. X                  }
  707. X                      for(i=0;i<MAXNAVY;i++) if(curntn->nvy[i].merchant+curntn->nvy[i].warships+curntn->nvy[i].galleys!=0){
  708. X                      standout();
  709. X!                     see((int)curntn->nvy[i].xloc-xoffset,(int)curntn->nvy[i].yloc-yoffset);
  710. X  
  711. X                  }
  712. X              } else for(i=XREAL-xoffset-1;i<=XREAL-xoffset+1;i++){
  713. X*** oupdate.c
  714. X--- update.c
  715. X**************
  716. X*** 271,280
  717. X          ||( P_ATYPE>=MINLEADER)) menok=TRUE;
  718. X          else menok=FALSE;
  719. X          /* range of 4 if menok is FALSE else 2 */
  720. X!         for(x=P_AXLOC-4+menok*2;x<=P_AXLOC+4-menok*2;x++)
  721. X!         for(y=P_AYLOC-4+menok*2;y<=P_AYLOC+4-menok*2;y++) if(ONMAP(x,y))
  722. X!             if( menok==TRUE || ISCITY(sct[x][y].designation) )
  723. X!                 sum+=attr[x][y];
  724. X      }
  725. X  
  726. X      if(sum==0) {
  727. X--- 271,283 -----
  728. X          ||( P_ATYPE>=MINLEADER)) menok=TRUE;
  729. X          else menok=FALSE;
  730. X          /* range of 4 if menok is FALSE else 2 */
  731. X!         for(x=(int)P_AXLOC-4+menok*2;x<=(int)P_AXLOC+4-menok*2;x++)
  732. X!         for(y=(int)P_AYLOC-4+menok*2;y<=(int)P_AYLOC+4-menok*2;y++) {
  733. X!             if(ONMAP(x,y)) {
  734. X!                 if( menok==TRUE || ISCITY(sct[x][y].designation) )
  735. X!                     sum+=attr[x][y];
  736. X!             }
  737. X!         }
  738. X      }
  739. X  
  740. X      if(sum==0) {
  741. X**************
  742. X*** 313,320
  743. X      } else {
  744. X          where=rand()%sum;
  745. X          /* range of 4 if menok is FALSE else 2 */
  746. X!         for(x=P_AXLOC-4+menok*2;x<=P_AXLOC+4-menok*2;x++)
  747. X!         for(y=P_AYLOC-4+menok*2;y<=P_AYLOC+4-menok*2;y++) if(ONMAP(x,y)){
  748. X              if( menok==TRUE || ISCITY(sct[x][y].designation) )
  749. X                  where -= attr[x][y];
  750. X              if( (where < 0 )
  751. X--- 316,324 -----
  752. X      } else {
  753. X          where=rand()%sum;
  754. X          /* range of 4 if menok is FALSE else 2 */
  755. X!         for(x=(int)P_AXLOC-4+menok*2;x<=(int)P_AXLOC+4-menok*2;x++)
  756. X!         for(y=(int)P_AYLOC-4+menok*2;y<=(int)P_AYLOC+4-menok*2;y++)
  757. X!         if(ONMAP(x,y)){
  758. X              if( menok==TRUE || ISCITY(sct[x][y].designation) )
  759. X                  where -= attr[x][y];
  760. X              if( (where < 0 )
  761. X**************
  762. X*** 320,326
  763. X              if( (where < 0 )
  764. X              && movecost[x][y]>=1
  765. X              && movecost[x][y]<=P_AMOVE
  766. X!             &&(land_reachp(P_AXLOC,P_AYLOC,x,y,P_AMOVE,country))){
  767. X                  P_AXLOC=x;
  768. X                  P_AYLOC=y;
  769. X                  if(P_ATYPE == getleader(curntn->class)-1 ){
  770. X--- 324,330 -----
  771. X              if( (where < 0 )
  772. X              && movecost[x][y]>=1
  773. X              && movecost[x][y]<=P_AMOVE
  774. X!             &&(land_reachp((int)P_AXLOC,(int)P_AYLOC,x,y,P_AMOVE,country))){
  775. X                  P_AXLOC=x;
  776. X                  P_AYLOC=y;
  777. X                  if(P_ATYPE == getleader(curntn->class)-1 ){
  778. X**************
  779. X*** 355,361
  780. X  
  781. X          /*do again - have this block if lots of bad terrain*/
  782. X          /*what could happen is that it won't find a move first time*/
  783. X!         for(x=P_AXLOC-2;x<=P_AXLOC+2;x++) for(y=P_AYLOC-2;y<=P_AYLOC+2;y++) {
  784. X              if(!ONMAP(x,y))
  785. X                  continue;
  786. X  
  787. X--- 359,366 -----
  788. X  
  789. X          /*do again - have this block if lots of bad terrain*/
  790. X          /*what could happen is that it won't find a move first time*/
  791. X!         for(x=(int)P_AXLOC-2;x<=(int)P_AXLOC+2;x++)
  792. X!         for(y=(int)P_AYLOC-2;y<=(int)P_AYLOC+2;y++) {
  793. X              if(!ONMAP(x,y))
  794. X                  continue;
  795. X  
  796. X**************
  797. X*** 613,620
  798. X          }
  799. X  
  800. X          /*if near capitol add to attr*/
  801. X!         for(x=curntn->capx-2;x<=curntn->capx+2;x++)
  802. X!             for(y=curntn->capy-2;y<=curntn->capy+2;y++)
  803. X                  if((ONMAP(x,y))&&(attr[x][y]>0)) attr[x][y]+=20;
  804. X  
  805. X  /*MOVE CIVILIANS based on the ratio of attractivenesses
  806. X--- 618,625 -----
  807. X          }
  808. X  
  809. X          /*if near capitol add to attr*/
  810. X!         for(x=(int)curntn->capx-2;x<=(int)curntn->capx+2;x++)
  811. X!             for(y=(int)curntn->capy-2;y<=(int)curntn->capy+2;y++)
  812. X                  if((ONMAP(x,y))&&(attr[x][y]>0)) attr[x][y]+=20;
  813. X  
  814. X  /*MOVE CIVILIANS based on the ratio of attractivenesses
  815. X**************
  816. X*** 695,702
  817. X              /* try to relieve sieges */
  818. X              if(P_ASTAT!=SIEGED
  819. X              && ntn[country].arm[armynum-1].stat!=SIEGED) {
  820. X!             for(i=ntn[country].arm[armynum-1].xloc-1;i<=ntn[country].arm[armynum-1].xloc+1;i++) {
  821. X!                 for(j=ntn[country].arm[armynum-1].yloc-1;j<=ntn[country].arm[armynum-1].yloc+1;j++) {
  822. X                      if(ONMAP(i,j)
  823. X                      &&(sct[i][j].altitude!=WATER) 
  824. X                      &&(sct[i][j].altitude!=PEAK) 
  825. X--- 700,707 -----
  826. X              /* try to relieve sieges */
  827. X              if(P_ASTAT!=SIEGED
  828. X              && ntn[country].arm[armynum-1].stat!=SIEGED) {
  829. X!             for(i=(int)ntn[country].arm[armynum-1].xloc-1;i<=ntn[country].arm[armynum-1].xloc+1;i++) {
  830. X!                 for(j=(int)ntn[country].arm[armynum-1].yloc-1;j<=ntn[country].arm[armynum-1].yloc+1;j++) {
  831. X                      if(ONMAP(i,j)
  832. X                      &&(sct[i][j].altitude!=WATER) 
  833. X                      &&(sct[i][j].altitude!=PEAK) 
  834. X**************
  835. X*** 804,810
  836. X                          fprintf(fm,"Message from Conquer\n\n");
  837. X                          fprintf(fm,"\tYour Scouting Unit %d was captured\n");
  838. X                          fprintf(fm,"\t  by %s military in sector %d,%d\n",
  839. X!                             ntn[occval].name,P_AXLOC,P_AYLOC);
  840. X                          mailclose();
  841. X                      }
  842. X                      if (ispc(ntn[occval].active)) {
  843. X--- 809,815 -----
  844. X                          fprintf(fm,"Message from Conquer\n\n");
  845. X                          fprintf(fm,"\tYour Scouting Unit %d was captured\n");
  846. X                          fprintf(fm,"\t  by %s military in sector %d,%d\n",
  847. X!                             ntn[occval].name,(int)P_AXLOC,(int)P_AYLOC);
  848. X                          mailclose();
  849. X                      }
  850. X                      if (ispc(ntn[occval].active)) {
  851. X**************
  852. X*** 811,817
  853. X                          mailopen(occval);
  854. X                          fprintf(fm,"Message from Conquer\n\n");
  855. X                          fprintf(fm,"\tA Scout from nation %s was captured\n",curntn->name);
  856. X!                         fprintf(fm,"\t  in sector %d,%d.\n",P_AXLOC,P_AYLOC);
  857. X                          mailclose();
  858. X                      }
  859. X                  }
  860. X--- 816,822 -----
  861. X                          mailopen(occval);
  862. X                          fprintf(fm,"Message from Conquer\n\n");
  863. X                          fprintf(fm,"\tA Scout from nation %s was captured\n",curntn->name);
  864. X!                         fprintf(fm,"\t  in sector %d,%d.\n",(int)P_AXLOC,(int)P_AYLOC);
  865. X                          mailclose();
  866. X                      }
  867. X                  }
  868. X*** ocommands.c
  869. X--- commands.c
  870. X**************
  871. X*** 875,881
  872. X          if(isgod==TRUE) reset_god();
  873. X          return;
  874. X      } else if(i_cost > curntn->metals) {
  875. X!         mvprintw(LINES-2,0,"You don't have %ld metal",i_cost);
  876. X          clrtoeol();
  877. X          refresh();
  878. X          getch();
  879. X--- 875,882 -----
  880. X          if(isgod==TRUE) reset_god();
  881. X          return;
  882. X      } else if(i_cost > curntn->metals) {
  883. X!         mvprintw(LINES-1,0,"You don't have %ld metal",i_cost);
  884. X!         mvprintw(LINES-1,COLS-20,"PRESS ANY KEY");
  885. X          clrtoeol();
  886. X          refresh();
  887. X          getch();
  888. X**************
  889. X*** 959,965
  890. X              P_AYLOC = ntn[i].capy;
  891. X              P_AXLOC = ntn[i].capx;
  892. X              mvprintw(LINES-2,0,"The Spy Starts in %s's Capitol (%d,%d)",
  893. X!                 ntn[i].name,P_AXLOC,P_AYLOC);
  894. X              clrtoeol();
  895. X          } else {
  896. X              clear_bottom(0);
  897. X--- 960,966 -----
  898. X              P_AYLOC = ntn[i].capy;
  899. X              P_AXLOC = ntn[i].capx;
  900. X              mvprintw(LINES-2,0,"The Spy Starts in %s's Capitol (%d,%d)",
  901. X!                 ntn[i].name,(int)P_AXLOC,(int)P_AYLOC);
  902. X              clrtoeol();
  903. X          } else {
  904. X              clear_bottom(0);
  905. X**************
  906. X*** 973,979
  907. X              P_AYLOC = YREAL;
  908. X              P_AXLOC = XREAL;
  909. X              mvprintw(LINES-2,0,"Intelligence indicates that %s lies to the %s",ntn[i].name,
  910. X!                   *(directions+compass(P_AXLOC,P_AYLOC,ntn[i].capx,ntn[i].capy)));
  911. X              clrtoeol();
  912. X          }
  913. X          errormsg("");
  914. X--- 974,981 -----
  915. X              P_AYLOC = YREAL;
  916. X              P_AXLOC = XREAL;
  917. X              mvprintw(LINES-2,0,"Intelligence indicates that %s lies to the %s",ntn[i].name,
  918. X!                 *(directions+compass((int)P_AXLOC,(int)P_AYLOC,
  919. X!                   (int)ntn[i].capx,(int)ntn[i].capy)));
  920. X              clrtoeol();
  921. X          }
  922. X          errormsg("");
  923. X**************
  924. X*** 1294,1301
  925. X          if(P_ASOLD <= 0) return(0);
  926. X      }
  927. X      /*move to correct location*/
  928. X!     xcurs = P_AXLOC - xoffset;
  929. X!     ycurs = P_AYLOC - yoffset;
  930. X      coffmap();
  931. X  
  932. X      /*select correct unit*/
  933. X--- 1296,1303 -----
  934. X          if(P_ASOLD <= 0) return(0);
  935. X      }
  936. X      /*move to correct location*/
  937. X!     xcurs = (int)P_AXLOC - xoffset;
  938. X!     ycurs = (int)P_AYLOC - yoffset;
  939. X      coffmap();
  940. X  
  941. X      /*select correct unit*/
  942. X*** oio.c
  943. X--- io.c
  944. X**************
  945. X*** 47,53
  946. X  printele()
  947. X  {
  948. X      register int X, Y;
  949. X!     printf("doing print of altitude\n");
  950. X      for(Y=0;Y<MAPY;Y++) {
  951. X          for(X=0;X<MAPX;X++) putc(sct[X][Y].altitude,stdout);
  952. X          putc('\n',stdout);
  953. X--- 47,53 -----
  954. X  printele()
  955. X  {
  956. X      register int X, Y;
  957. X!     fprintf(stderr,"doing print of altitude\n");
  958. X      for(Y=0;Y<MAPY;Y++) {
  959. X          for(X=0;X<MAPX;X++) putc(sct[X][Y].altitude,stdout);
  960. X          putc('\n',stdout);
  961. X**************
  962. X*** 62,68
  963. X  pr_ntns()
  964. X  {
  965. X      register int X, Y;
  966. X!     printf("doing print of nations\n");
  967. X      for(Y=0;Y<MAPY;Y++) {
  968. X          for(X=0;X<MAPX;X++) {
  969. X              if(sct[X][Y].owner==0)
  970. X--- 62,68 -----
  971. X  pr_ntns()
  972. X  {
  973. X      register int X, Y;
  974. X!     fprintf(stderr,"doing print of nations\n");
  975. X      for(Y=0;Y<MAPY;Y++) {
  976. X          for(X=0;X<MAPX;X++) {
  977. X              if(sct[X][Y].owner==0)
  978. X**************
  979. X*** 66,73
  980. X      for(Y=0;Y<MAPY;Y++) {
  981. X          for(X=0;X<MAPX;X++) {
  982. X              if(sct[X][Y].owner==0)
  983. X!                 putc(sct[X][Y].altitude,stderr);
  984. X!             else putc(ntn[sct[X][Y].owner].mark,stderr);
  985. X          }
  986. X          putc('\n',stderr);
  987. X      }
  988. X--- 66,73 -----
  989. X      for(Y=0;Y<MAPY;Y++) {
  990. X          for(X=0;X<MAPX;X++) {
  991. X              if(sct[X][Y].owner==0)
  992. X!                 putc(sct[X][Y].altitude,stdout);
  993. X!             else putc(ntn[sct[X][Y].owner].mark,stdout);
  994. X          }
  995. X          putc('\n',stdout);
  996. X      }
  997. X**************
  998. X*** 69,75
  999. X                  putc(sct[X][Y].altitude,stderr);
  1000. X              else putc(ntn[sct[X][Y].owner].mark,stderr);
  1001. X          }
  1002. X!         putc('\n',stderr);
  1003. X      }
  1004. X  }
  1005. X  #endif ADMIN
  1006. X--- 69,75 -----
  1007. X                  putc(sct[X][Y].altitude,stdout);
  1008. X              else putc(ntn[sct[X][Y].owner].mark,stdout);
  1009. X          }
  1010. X!         putc('\n',stdout);
  1011. X      }
  1012. X  }
  1013. X  #endif ADMIN
  1014. X**************
  1015. X*** 124,130
  1016. X  
  1017. X      /*read in existing nation army and navy data*/
  1018. X      /*check if file openable*/
  1019. X!     printf("reading data file\n");
  1020. X      if( (fd = open(datafile,0)) < 0 ) {
  1021. X          fprintf( stderr, "can not open %s \n", datafile );
  1022. X          fprintf( stderr, "for help with conquer, type conquer -h\n");
  1023. X--- 124,130 -----
  1024. X  
  1025. X      /*read in existing nation army and navy data*/
  1026. X      /*check if file openable*/
  1027. X!     fprintf(stderr,"reading data file\n");
  1028. X      if( (fd = open(datafile,0)) < 0 ) {
  1029. X          fprintf( stderr, "can not open %s \n", datafile );
  1030. X          fprintf( stderr, "for help with conquer, type conquer -h\n");
  1031. X**************
  1032. X*** 176,182
  1033. X  printveg()
  1034. X  {
  1035. X      register int X, Y;
  1036. X!     printf("doing print of vegetation\n");
  1037. X      for(Y=0;Y<MAPY;Y++) {
  1038. X          for(X=0;X<MAPX;X++) putc(sct[X][Y].vegetation,stderr);
  1039. X          putc('\n',stderr);
  1040. X--- 176,182 -----
  1041. X  printveg()
  1042. X  {
  1043. X      register int X, Y;
  1044. X!     fprintf(stderr,"doing print of vegetation\n");
  1045. X      for(Y=0;Y<MAPY;Y++) {
  1046. X          for(X=0;X<MAPX;X++) putc(sct[X][Y].vegetation,stdout);
  1047. X          putc('\n',stdout);
  1048. X**************
  1049. X*** 178,185
  1050. X      register int X, Y;
  1051. X      printf("doing print of vegetation\n");
  1052. X      for(Y=0;Y<MAPY;Y++) {
  1053. X!         for(X=0;X<MAPX;X++) putc(sct[X][Y].vegetation,stderr);
  1054. X!         putc('\n',stderr);
  1055. X      }
  1056. X  }
  1057. X  #endif ADMIN
  1058. X--- 178,185 -----
  1059. X      register int X, Y;
  1060. X      fprintf(stderr,"doing print of vegetation\n");
  1061. X      for(Y=0;Y<MAPY;Y++) {
  1062. X!         for(X=0;X<MAPX;X++) putc(sct[X][Y].vegetation,stdout);
  1063. X!         putc('\n',stdout);
  1064. X      }
  1065. X  }
  1066. X  #endif ADMIN
  1067. X**************
  1068. X*** 268,273
  1069. X  {
  1070. X      int i;
  1071. X      int nationid;     /*current nation id */
  1072. X  
  1073. X      printf("Conquer %s.%d: %s of Year %d, Turn %d\n",VERSION,PATCHLEVEL,
  1074. X          PSEASON(TURN),YEAR(TURN), TURN);
  1075. X--- 268,277 -----
  1076. X  {
  1077. X      int i;
  1078. X      int nationid;     /*current nation id */
  1079. X+ #ifdef TIMELOG
  1080. X+     FILE *timefp, *fopen();
  1081. X+     char timestr[80];
  1082. X+ #endif /* TIMELOG */
  1083. X  
  1084. X      printf("Conquer %s.%d: %s of Year %d, Turn %d\n",VERSION,PATCHLEVEL,
  1085. X          PSEASON(TURN),YEAR(TURN), TURN);
  1086. X**************
  1087. X*** 271,276
  1088. X  
  1089. X      printf("Conquer %s.%d: %s of Year %d, Turn %d\n",VERSION,PATCHLEVEL,
  1090. X          PSEASON(TURN),YEAR(TURN), TURN);
  1091. X      printf("id      name   race    class    align  score    talons military  civilians sect\n");
  1092. X      for (nationid=1; nationid<NTOTAL; nationid++) {
  1093. X          if(!isntn(ntn[nationid].active)) continue;
  1094. X--- 275,287 -----
  1095. X  
  1096. X      printf("Conquer %s.%d: %s of Year %d, Turn %d\n",VERSION,PATCHLEVEL,
  1097. X          PSEASON(TURN),YEAR(TURN), TURN);
  1098. X+ #ifdef TIMELOG
  1099. X+     if ((timefp=fopen(timefile,"r"))!=NULL) {
  1100. X+         fgets(timestr, 50, timefp);
  1101. X+         printf("Last Update: %s", timestr);
  1102. X+         fclose(timefp);
  1103. X+     }
  1104. X+ #endif /* TIMELOG */
  1105. X      printf("id      name   race    class    align  score    talons military  civilians sect\n");
  1106. X      for (nationid=1; nationid<NTOTAL; nationid++) {
  1107. X          if(!isntn(ntn[nationid].active)) continue;
  1108. X*** onewhelp.c
  1109. X--- newhelp.c
  1110. X**************
  1111. X*** 160,165
  1112. X      fprintf(fp,"s/ZSTOCKCOST/%d/g\n",STOCKCOST);
  1113. X      
  1114. X      /* other defines */
  1115. X      fprintf(fp,"s/XNORANDEVENTS/%d/g\n",RANEVENT);
  1116. X      fprintf(fp,"s/XLANDSEE/%d/g\n",LANDSEE);
  1117. X      fprintf(fp,"s/XNAVYSEE/%d/g\n",NAVYSEE);
  1118. X--- 160,166 -----
  1119. X      fprintf(fp,"s/ZSTOCKCOST/%d/g\n",STOCKCOST);
  1120. X      
  1121. X      /* other defines */
  1122. X+ #ifdef RANEVENT
  1123. X      fprintf(fp,"s/XNORANDEVENTS/%d/g\n",RANEVENT);
  1124. X  #else
  1125. X      fprintf(fp,"s/XNORANDEVENTS/0/g\n");
  1126. X**************
  1127. X*** 161,166
  1128. X      
  1129. X      /* other defines */
  1130. X      fprintf(fp,"s/XNORANDEVENTS/%d/g\n",RANEVENT);
  1131. X      fprintf(fp,"s/XLANDSEE/%d/g\n",LANDSEE);
  1132. X      fprintf(fp,"s/XNAVYSEE/%d/g\n",NAVYSEE);
  1133. X      fprintf(fp,"s/XARMYSEE/%d/g\n",ARMYSEE);
  1134. X--- 162,170 -----
  1135. X      /* other defines */
  1136. X  #ifdef RANEVENT
  1137. X      fprintf(fp,"s/XNORANDEVENTS/%d/g\n",RANEVENT);
  1138. X+ #else
  1139. X+     fprintf(fp,"s/XNORANDEVENTS/0/g\n");
  1140. X+ #endif
  1141. X      fprintf(fp,"s/XLANDSEE/%d/g\n",LANDSEE);
  1142. X      fprintf(fp,"s/XNAVYSEE/%d/g\n",NAVYSEE);
  1143. X      fprintf(fp,"s/XARMYSEE/%d/g\n",ARMYSEE);
  1144. X*** odata.c
  1145. X--- data.c
  1146. X**************
  1147. X*** 181,186
  1148. X  char    *exefile =  "exec";
  1149. X  char    *datafile = "data";
  1150. X  char    *msgfile =  "mesg";
  1151. X  char    *sortname = "conqsort";
  1152. X  
  1153. X  #ifdef ADMIN
  1154. X--- 181,187 -----
  1155. X  char    *exefile =  "exec";
  1156. X  char    *datafile = "data";
  1157. X  char    *msgfile =  "mesg";
  1158. X+ char *timefile = "timelog";
  1159. X  char    *sortname = "conqsort";
  1160. X  
  1161. X  #ifdef ADMIN
  1162. X*** omagic.c
  1163. X--- magic.c
  1164. X**************
  1165. X*** 377,384
  1166. X      if(newpower==DESTROYER) {
  1167. X  /* this ifdef is so that destroyer only takes place in an update */
  1168. X  #ifdef ADMIN
  1169. X!         for(x=curntn->capx-3;x<=curntn->capx+3;x++) {
  1170. X!             for(y=curntn->capy-3;y<=curntn->capy+3;y++){
  1171. X                  if((ONMAP(x,y))
  1172. X                  &&(sct[x][y].altitude!=WATER)
  1173. X  #ifdef DERVDESG
  1174. X--- 377,384 -----
  1175. X      if(newpower==DESTROYER) {
  1176. X  /* this ifdef is so that destroyer only takes place in an update */
  1177. X  #ifdef ADMIN
  1178. X!         for(x=(int)curntn->capx-3;x<=(int)curntn->capx+3;x++) {
  1179. X!             for(y=(int)curntn->capy-3;y<=(int)curntn->capy+3;y++){
  1180. X                  if((ONMAP(x,y))
  1181. X                  &&(sct[x][y].altitude!=WATER)
  1182. X  #ifdef DERVDESG
  1183. X**************
  1184. X*** 723,730
  1185. X          return;
  1186. X      }
  1187. X      if(oldpower==DESTROYER) {
  1188. X!         for(x=curntn->capx-3;x<=curntn->capx+3;x++) {
  1189. X!             for(y=curntn->capy-3;y<=curntn->capy+3;y++){
  1190. X                  if((ONMAP(x,y))
  1191. X                  &&(sct[x][y].altitude!=WATER)
  1192. X                  &&((x!=curntn->capx)
  1193. X--- 723,730 -----
  1194. X          return;
  1195. X      }
  1196. X      if(oldpower==DESTROYER) {
  1197. X!         for(x=(int)curntn->capx-3;x<=(int)curntn->capx+3;x++) {
  1198. X!             for(y=(int)curntn->capy-3;y<=(int)curntn->capy+3;y++){
  1199. X                  if((ONMAP(x,y))
  1200. X                  &&(sct[x][y].altitude!=WATER)
  1201. X                  &&((x!=curntn->capx)
  1202. X*** onewlogin.c
  1203. X--- newlogin.c
  1204. X**************
  1205. X*** 504,510
  1206. X                  printf("how many purchasing points to spend?:");
  1207. X                  scanf("%d",&temp);
  1208. X                  putchar('\n');
  1209. X!                 if(temp < points) {
  1210. X                      printf("You don't have enough points left");
  1211. X                  } else if (temp < 0) {
  1212. X                      printf("Negative, huh?  Who you trying to kid?");
  1213. X--- 504,510 -----
  1214. X                  printf("how many purchasing points to spend?:");
  1215. X                  scanf("%d",&temp);
  1216. X                  putchar('\n');
  1217. X!                 if(temp > points) {
  1218. X                      printf("You don't have enough points left");
  1219. X                  } else if (temp < 0) {
  1220. X                      printf("Negative, huh?  Who you trying to kid?");
  1221. X**************
  1222. X*** 792,798
  1223. X                  &&( sct[i][j].owner!=0)) placed=0;
  1224. X                  }
  1225. X              } else {
  1226. X!                 if(MAPX>24){
  1227. X                      x = rand()%(MAPX-24)+12;
  1228. X                      y = rand()%(MAPY-24)+12;
  1229. X                  }else {
  1230. X--- 792,798 -----
  1231. X                  &&( sct[i][j].owner!=0)) placed=0;
  1232. X                  }
  1233. X              } else {
  1234. X!                 if(MAPX>24 && MAPY>24){
  1235. X                      x = rand()%(MAPX-24)+12;
  1236. X                      y = rand()%(MAPY-24)+12;
  1237. X                  }else {
  1238. X*** odisplay.c
  1239. X--- display.c
  1240. X**************
  1241. X*** 408,415
  1242. X  
  1243. X      for(nvynum=0;nvynum<MAXNAVY;nvynum++)
  1244. X          if((P_NMSHP!=0)||(P_NWSHP!=0)||(P_NGSHP!=0))
  1245. X!         for(i=P_NXLOC-xoffset-NAVYSEE;i<=P_NXLOC-xoffset+NAVYSEE;i++)
  1246. X!         for(j=P_NYLOC-yoffset-NAVYSEE;j<=P_NYLOC-yoffset+NAVYSEE;j++)
  1247. X          if(i>=0 && j>=0 && i<SCREEN_X_SIZE && j<SCREEN_Y_SIZE)
  1248. X              HAS_SEEN(i,j)=TRUE;
  1249. X  
  1250. X--- 408,415 -----
  1251. X  
  1252. X      for(nvynum=0;nvynum<MAXNAVY;nvynum++)
  1253. X          if((P_NMSHP!=0)||(P_NWSHP!=0)||(P_NGSHP!=0))
  1254. X!         for(i=(int)P_NXLOC-xoffset-NAVYSEE;i<=(int)P_NXLOC-xoffset+NAVYSEE;i++)
  1255. X!         for(j=(int)P_NYLOC-yoffset-NAVYSEE;j<=(int)P_NYLOC-yoffset+NAVYSEE;j++)
  1256. X          if(i>=0 && j>=0 && i<SCREEN_X_SIZE && j<SCREEN_Y_SIZE)
  1257. X              HAS_SEEN(i,j)=TRUE;
  1258. X  
  1259. X**************
  1260. X*** 415,422
  1261. X  
  1262. X      for(armynum=0;armynum<MAXARM;armynum++)
  1263. X          if(P_ASOLD>0)
  1264. X!         for(i=P_AXLOC-xoffset-ARMYSEE;i<=P_AXLOC-xoffset+ARMYSEE;i++)
  1265. X!         for(j=P_AYLOC-yoffset-ARMYSEE;j<=P_AYLOC-yoffset+ARMYSEE;j++)
  1266. X          if(i>=0 && j>=0 && i<SCREEN_X_SIZE && j<SCREEN_Y_SIZE)
  1267. X              HAS_SEEN(i,j)=TRUE;
  1268. X  
  1269. X--- 415,422 -----
  1270. X  
  1271. X      for(armynum=0;armynum<MAXARM;armynum++)
  1272. X          if(P_ASOLD>0)
  1273. X!         for(i=(int)P_AXLOC-xoffset-ARMYSEE;i<=(int)P_AXLOC-xoffset+ARMYSEE;i++)
  1274. X!         for(j=(int)P_AYLOC-yoffset-ARMYSEE;j<=(int)P_AYLOC-yoffset+ARMYSEE;j++)
  1275. X          if(i>=0 && j>=0 && i<SCREEN_X_SIZE && j<SCREEN_Y_SIZE)
  1276. X              HAS_SEEN(i,j)=TRUE;
  1277. X  
  1278. X*** omain.c
  1279. X--- main.c
  1280. X**************
  1281. X*** 211,222
  1282. X      }
  1283. X  
  1284. X      initscr();        /* SET UP THE SCREEN */
  1285. X-     copyscreen();        /* copyright screen */
  1286. X-                 /* note the getch() later - everything between
  1287. X-                     now and then is non-interactive */
  1288. X-     init_hasseen();        /* now we know how big the screen is, 
  1289. X-                     we can init that array!    */
  1290. X- 
  1291. X      /* check terminal size */
  1292. X      if (COLS<80 || LINES<24) {
  1293. X          fprintf(stderr,"%s: terminal should be at least 80x24\n",argv[0]);
  1294. X--- 211,216 -----
  1295. X      }
  1296. X  
  1297. X      initscr();        /* SET UP THE SCREEN */
  1298. X      /* check terminal size */
  1299. X      if (COLS<80 || LINES<24) {
  1300. X          fprintf(stderr,"%s: terminal should be at least 80x24\n",argv[0]);
  1301. X**************
  1302. X*** 222,228
  1303. X          fprintf(stderr,"%s: terminal should be at least 80x24\n",argv[0]);
  1304. X          fprintf(stderr,"please try again with a different setup\n");
  1305. X          beep();
  1306. X-         refresh();
  1307. X          getch();
  1308. X          bye(FALSE);
  1309. X      }
  1310. X--- 216,221 -----
  1311. X          fprintf(stderr,"%s: terminal should be at least 80x24\n",argv[0]);
  1312. X          fprintf(stderr,"please try again with a different setup\n");
  1313. X          beep();
  1314. X          getch();
  1315. X          bye(FALSE);
  1316. X      }
  1317. X**************
  1318. X*** 227,232
  1319. X          bye(FALSE);
  1320. X      }
  1321. X  
  1322. X      strcpy(fison,"START");    /* just in case you abort early */
  1323. X      crmode();        /* cbreak mode */
  1324. X  
  1325. X--- 220,231 -----
  1326. X          bye(FALSE);
  1327. X      }
  1328. X  
  1329. X+     copyscreen();        /* copyright screen */
  1330. X+                 /* note the getch() later - everything between
  1331. X+                     now and then is non-interactive */
  1332. X+     init_hasseen();        /* now we know how big the screen is, 
  1333. X+                     we can init that array!    */
  1334. X+ 
  1335. X      strcpy(fison,"START");    /* just in case you abort early */
  1336. X      crmode();        /* cbreak mode */
  1337. X  
  1338. X**************
  1339. X*** 263,269
  1340. X  #endif TRADE
  1341. X          if(curntn->capx>15) {
  1342. X              xcurs=15;
  1343. X!             xoffset= (curntn->capx-15);
  1344. X          } else {
  1345. X              xcurs= curntn->capx;
  1346. X              xoffset= 0;
  1347. X--- 262,268 -----
  1348. X  #endif TRADE
  1349. X          if(curntn->capx>15) {
  1350. X              xcurs=15;
  1351. X!             xoffset= ((int)curntn->capx-15);
  1352. X          } else {
  1353. X              xcurs= curntn->capx;
  1354. X              xoffset= 0;
  1355. X**************
  1356. X*** 270,276
  1357. X          }
  1358. X          if(curntn->capy>10) {
  1359. X              ycurs=10;
  1360. X!             yoffset= (curntn->capy-10);
  1361. X          } else {
  1362. X              yoffset= 0;
  1363. X              ycurs= curntn->capy;
  1364. X--- 269,275 -----
  1365. X          }
  1366. X          if(curntn->capy>10) {
  1367. X              ycurs=10;
  1368. X!             yoffset= ((int)curntn->capy-10);
  1369. X          } else {
  1370. X              yoffset= 0;
  1371. X              ycurs= curntn->capy;
  1372. X**************
  1373. X*** 692,698
  1374. X          } else {
  1375. X              if(curntn->capx>15) {
  1376. X                  xcurs=15;
  1377. X!                 xoffset= (curntn->capx-15);
  1378. X              } else {
  1379. X                  xcurs= curntn->capx;
  1380. X                  xoffset= 0;
  1381. X--- 691,697 -----
  1382. X          } else {
  1383. X              if(curntn->capx>15) {
  1384. X                  xcurs=15;
  1385. X!                 xoffset= ((int)curntn->capx-15);
  1386. X              } else {
  1387. X                  xcurs= curntn->capx;
  1388. X                  xoffset= 0;
  1389. X**************
  1390. X*** 699,705
  1391. X              }
  1392. X              if(curntn->capy>10) {
  1393. X                  ycurs=10;
  1394. X!                 yoffset= (curntn->capy-10);
  1395. X              } else {
  1396. X                  yoffset= 0;
  1397. X                  ycurs= curntn->capy;
  1398. X--- 698,704 -----
  1399. X              }
  1400. X              if(curntn->capy>10) {
  1401. X                  ycurs=10;
  1402. X!                 yoffset= ((int)curntn->capy-10);
  1403. X              } else {
  1404. X                  yoffset= 0;
  1405. X                  ycurs= curntn->capy;
  1406. X**************
  1407. X*** 1012,1017
  1408. X  void
  1409. X  copyscreen()
  1410. X  {
  1411. X      clear();
  1412. X      standout();
  1413. X      mvprintw(8,28,"Conquer %s.%d",VERSION,PATCHLEVEL);
  1414. X--- 1011,1021 -----
  1415. X  void
  1416. X  copyscreen()
  1417. X  {
  1418. X+ #ifdef TIMELOG
  1419. X+     FILE *timefp, *fopen();
  1420. X+     char string[80];
  1421. X+ #endif /* TIMELOG */
  1422. X+ 
  1423. X      clear();
  1424. X      standout();
  1425. X      mvprintw(8,COLS/2-12,"Conquer %s.%d",VERSION,PATCHLEVEL);
  1426. X**************
  1427. X*** 1014,1020
  1428. X  {
  1429. X      clear();
  1430. X      standout();
  1431. X!     mvprintw(8,28,"Conquer %s.%d",VERSION,PATCHLEVEL);
  1432. X      standend();
  1433. X      mvaddstr(10,19, "Copyright (c) 1988 by Edward M Barlow");
  1434. X      mvaddstr(11,18,"Written Edward M Barlow and Adam Bryant");
  1435. X--- 1018,1024 -----
  1436. X  
  1437. X      clear();
  1438. X      standout();
  1439. X!     mvprintw(8,COLS/2-12,"Conquer %s.%d",VERSION,PATCHLEVEL);
  1440. X      standend();
  1441. X      mvaddstr(10,COLS/2-21, "Copyright (c) 1988 by Edward M Barlow");
  1442. X      mvaddstr(11,COLS/2-22,"Written Edward M Barlow and Adam Bryant");
  1443. X**************
  1444. X*** 1016,1029
  1445. X      standout();
  1446. X      mvprintw(8,28,"Conquer %s.%d",VERSION,PATCHLEVEL);
  1447. X      standend();
  1448. X!     mvaddstr(10,19, "Copyright (c) 1988 by Edward M Barlow");
  1449. X!     mvaddstr(11,18,"Written Edward M Barlow and Adam Bryant");
  1450. X!     mvaddstr(12,26,"All Rights Reserved");
  1451. X!     mvaddstr(LINES-7,19,"This version is for personal use only");
  1452. X!     mvaddstr(LINES-5,8,"It is expressly forbidden port this software to any form of");
  1453. X!     mvaddstr(LINES-4,8,"Personal Computer or to redistribute this software without");
  1454. X!     mvaddstr(LINES-3,14,"the permission of Edward Barlow or Adam Bryant");
  1455. X!     mvprintw(LINES-1, 60, "PRESS ANY KEY");
  1456. X      refresh();
  1457. X  }
  1458. X  
  1459. X--- 1020,1040 -----
  1460. X      standout();
  1461. X      mvprintw(8,COLS/2-12,"Conquer %s.%d",VERSION,PATCHLEVEL);
  1462. X      standend();
  1463. X!     mvaddstr(10,COLS/2-21, "Copyright (c) 1988 by Edward M Barlow");
  1464. X!     mvaddstr(11,COLS/2-22,"Written Edward M Barlow and Adam Bryant");
  1465. X!     mvaddstr(12,COLS/2-12,"All Rights Reserved");
  1466. X!     mvaddstr(LINES-8,COLS/2-21,"This version is for personal use only");
  1467. X!     mvaddstr(LINES-6,COLS/2-32,"It is expressly forbidden port this software to any form of");
  1468. X!     mvaddstr(LINES-5,COLS/2-32,"Personal Computer or to redistribute this software without");
  1469. X!     mvaddstr(LINES-4,COLS/2-26,"the permission of Edward Barlow or Adam Bryant");
  1470. X! #ifdef TIMELOG
  1471. X!     if ((timefp=fopen(timefile,"r"))!=NULL) {
  1472. X!         fgets(string, 50, timefp);
  1473. X!         mvprintw(LINES-1, 0, "Last Update: %s", string);
  1474. X!         fclose(timefp);
  1475. X!     }
  1476. X! #endif /* TIMELOG */
  1477. X!     mvprintw(LINES-1, COLS-20, "PRESS ANY KEY");
  1478. X      refresh();
  1479. X  }
  1480. X  
  1481. X*** onpc.c
  1482. X--- npc.c
  1483. X**************
  1484. X*** 29,35
  1485. X      int x,y;
  1486. X  /*    FOR TESTING OF WHAT THE ATTRACTIVENESS ENDS UP LIKE  */
  1487. X      printf("Attractiveness for sectors around CAPITAL at %d %d veg alt des\n",curntn->capx,curntn->capy);
  1488. X!     for(y=curntn->capy-3;y<curntn->capy+4;y++) {
  1489. X          printf("\n");
  1490. X          for(x=curntn->capx-3;x<curntn->capx+4;x++) if(ONMAP(x,y)) {
  1491. X              if( sct[x][y].altitude != WATER ) {
  1492. X--- 29,35 -----
  1493. X      int x,y;
  1494. X  /*    FOR TESTING OF WHAT THE ATTRACTIVENESS ENDS UP LIKE  */
  1495. X      printf("Attractiveness for sectors around CAPITAL at %d %d veg alt des\n",curntn->capx,curntn->capy);
  1496. X!     for(y=(int)curntn->capy-3;y<(int)curntn->capy+4;y++) {
  1497. X          printf("\n");
  1498. X          for(x=(int)curntn->capx-3;x<(int)curntn->capx+4;x++) if(ONMAP(x,y)) {
  1499. X              if( sct[x][y].altitude != WATER ) {
  1500. X**************
  1501. X*** 31,37
  1502. X      printf("Attractiveness for sectors around CAPITAL at %d %d veg alt des\n",curntn->capx,curntn->capy);
  1503. X      for(y=curntn->capy-3;y<curntn->capy+4;y++) {
  1504. X          printf("\n");
  1505. X!         for(x=curntn->capx-3;x<curntn->capx+4;x++) if(ONMAP(x,y)) {
  1506. X              if( sct[x][y].altitude != WATER ) {
  1507. X                  printf("[%2d,%2d]   ",x,y);
  1508. X              }
  1509. X--- 31,37 -----
  1510. X      printf("Attractiveness for sectors around CAPITAL at %d %d veg alt des\n",curntn->capx,curntn->capy);
  1511. X      for(y=(int)curntn->capy-3;y<(int)curntn->capy+4;y++) {
  1512. X          printf("\n");
  1513. X!         for(x=(int)curntn->capx-3;x<(int)curntn->capx+4;x++) if(ONMAP(x,y)) {
  1514. X              if( sct[x][y].altitude != WATER ) {
  1515. X                  printf("[%2d,%2d]   ",x,y);
  1516. X              }
  1517. X**************
  1518. X*** 37,43
  1519. X              }
  1520. X          }
  1521. X          printf("\n");
  1522. X!         for(x=curntn->capx-3;x<curntn->capx+4;x++) if(ONMAP(x,y)) {
  1523. X              if( sct[x][y].altitude != WATER ) {
  1524. X                  printf("%5d %c%c%c "
  1525. X                      ,attr[x][y]
  1526. X--- 37,43 -----
  1527. X              }
  1528. X          }
  1529. X          printf("\n");
  1530. X!         for(x=(int)curntn->capx-3;x<(int)curntn->capx+4;x++) if(ONMAP(x,y)) {
  1531. X              if( sct[x][y].altitude != WATER ) {
  1532. X                  printf("%5d %c%c%c "
  1533. X                      ,attr[x][y]
  1534. X**************
  1535. X*** 111,118
  1536. X          }
  1537. X          count=0;
  1538. X          while( TRUE ) {
  1539. X!             x=P_AXLOC+rand()%5-2;
  1540. X!             y=P_AYLOC+rand()%5-2;
  1541. X  
  1542. X              if( count++ > 100 ) {
  1543. X                  P_ASOLD=0;
  1544. X--- 111,118 -----
  1545. X          }
  1546. X          count=0;
  1547. X          while( TRUE ) {
  1548. X!             x=(int)P_AXLOC+rand()%5-2;
  1549. X!             y=(int)P_AYLOC+rand()%5-2;
  1550. X  
  1551. X              if( count++ > 100 ) {
  1552. X                  P_ASOLD=0;
  1553. X**************
  1554. X*** 122,128
  1555. X              if(( x==P_AXLOC && y==P_AYLOC )
  1556. X              ||(!ONMAP(x,y)
  1557. X              ||(!is_habitable(x,y))) 
  1558. X!             ||(!land_reachp(P_AXLOC,P_AYLOC,x,y,curntn->maxmove,country))) continue;
  1559. X  
  1560. X              P_AXLOC=x;
  1561. X              P_AYLOC=y;
  1562. X--- 122,129 -----
  1563. X              if(( x==P_AXLOC && y==P_AYLOC )
  1564. X              ||(!ONMAP(x,y)
  1565. X              ||(!is_habitable(x,y))) 
  1566. X!             ||(!land_reachp((int)P_AXLOC,(int)P_AYLOC,
  1567. X!                 x,y,curntn->maxmove,country))) continue;
  1568. X  
  1569. X              P_AXLOC=x;
  1570. X              P_AYLOC=y;
  1571. X**************
  1572. X*** 167,174
  1573. X              P_ASOLD /= 100;
  1574. X          }
  1575. X          P_AMOVE=(curntn->maxmove * *(unitmove+P_ATYPE%UTYPE))/10;
  1576. X!         x=P_AXLOC+rand()%2-1;
  1577. X!         y=P_AYLOC+rand()%2-1;
  1578. X          if(ONMAP(x,y)&&(is_habitable(x,y)) 
  1579. X          &&(land_reachp(P_AXLOC,P_AYLOC,x,y,P_AMOVE,country))){
  1580. X              P_AXLOC=x;
  1581. X--- 168,175 -----
  1582. X              P_ASOLD /= 100;
  1583. X          }
  1584. X          P_AMOVE=(curntn->maxmove * *(unitmove+P_ATYPE%UTYPE))/10;
  1585. X!         x=(int)P_AXLOC+rand()%3-1;
  1586. X!         y=(int)P_AYLOC+rand()%3-1;
  1587. X          if(ONMAP(x,y)&&(is_habitable(x,y)) 
  1588. X          &&(land_reachp((int)P_AXLOC,(int)P_AYLOC,x,y,P_AMOVE,country))){
  1589. X              P_AXLOC=x;
  1590. X**************
  1591. X*** 170,176
  1592. X          x=P_AXLOC+rand()%2-1;
  1593. X          y=P_AYLOC+rand()%2-1;
  1594. X          if(ONMAP(x,y)&&(is_habitable(x,y)) 
  1595. X!         &&(land_reachp(P_AXLOC,P_AYLOC,x,y,P_AMOVE,country))){
  1596. X              P_AXLOC=x;
  1597. X              P_AYLOC=y;
  1598. X              /*if owned & unoccupied you take & people flee*/
  1599. X--- 171,177 -----
  1600. X          x=(int)P_AXLOC+rand()%3-1;
  1601. X          y=(int)P_AYLOC+rand()%3-1;
  1602. X          if(ONMAP(x,y)&&(is_habitable(x,y)) 
  1603. X!         &&(land_reachp((int)P_AXLOC,(int)P_AYLOC,x,y,P_AMOVE,country))){
  1604. X              P_AXLOC=x;
  1605. X              P_AYLOC=y;
  1606. X              /*if owned & unoccupied you take & people flee*/
  1607. X**************
  1608. X*** 244,251
  1609. X          for(y=0;y<MAXNAVY;y++)
  1610. X          if(ntn[x].nvy[y].warships!=0 || ntn[x].nvy[y].merchant!=0 
  1611. X            || ntn[x].nvy[y].galleys!=0) {
  1612. X!             if((abs(ntn[x].nvy[y].xloc-P_NXLOC)<=PRTZONE)
  1613. X!             &&(abs(ntn[x].nvy[y].yloc-P_NYLOC)<=PRTZONE)) {
  1614. X                  P_NXLOC= ntn[x].nvy[y].xloc;
  1615. X                  P_NYLOC= ntn[x].nvy[y].yloc;
  1616. X              }
  1617. X--- 245,252 -----
  1618. X          for(y=0;y<MAXNAVY;y++)
  1619. X          if(ntn[x].nvy[y].warships!=0 || ntn[x].nvy[y].merchant!=0 
  1620. X            || ntn[x].nvy[y].galleys!=0) {
  1621. X!             if((abs((int)ntn[x].nvy[y].xloc-(int)P_NXLOC)<=PRTZONE)
  1622. X!             &&(abs((int)ntn[x].nvy[y].yloc-(int)P_NYLOC)<=PRTZONE)) {
  1623. X                  P_NXLOC= ntn[x].nvy[y].xloc;
  1624. X                  P_NYLOC= ntn[x].nvy[y].yloc;
  1625. X              }
  1626. X**************
  1627. X*** 359,366
  1628. X      for(armynum=1;armynum<MAXARM;armynum++) if(P_ASOLD>0){
  1629. X          /* move army back if too far out */
  1630. X          ok = 0;
  1631. X!         for(x=P_AXLOC-3;x<=P_AXLOC+3;x++)
  1632. X!             for(y=P_AYLOC-3;y<=P_AYLOC+3;y++)
  1633. X                  if((ONMAP(x,y))&&(sct[x][y].owner==country)) ok=1;
  1634. X          if(ok==0){
  1635. X              P_AXLOC=curntn->capx;
  1636. X--- 360,367 -----
  1637. X      for(armynum=1;armynum<MAXARM;armynum++) if(P_ASOLD>0){
  1638. X          /* move army back if too far out */
  1639. X          ok = 0;
  1640. X!         for(x=(int)P_AXLOC-3;x<=(int)P_AXLOC+3;x++)
  1641. X!             for(y=(int)P_AYLOC-3;y<=(int)P_AYLOC+3;y++)
  1642. X                  if((ONMAP(x,y))&&(sct[x][y].owner==country)) ok=1;
  1643. X          if(ok==0){
  1644. X              P_AXLOC=curntn->capx;
  1645. X**************
  1646. X*** 727,734
  1647. X              hostile-=20;
  1648. X          }
  1649. X          /* if next to capitol, they dont like you */
  1650. X!         for(X=curntn->capx-1;X<=curntn->capx+1;X++)
  1651. X!         for(Y=curntn->capy-1;Y<=curntn->capy+1;Y++) if(ONMAP(X,Y)) {
  1652. X              if(sct[X][Y].owner == x) {
  1653. X                  friendly-=10;
  1654. X                  hostile +=10;
  1655. X--- 728,736 -----
  1656. X              hostile-=20;
  1657. X          }
  1658. X          /* if next to capitol, they dont like you */
  1659. X!         for(X=(int)curntn->capx-1;X<=(int)curntn->capx+1;X++)
  1660. X!         for(Y=(int)curntn->capy-1;Y<=(int)curntn->capy+1;Y++)
  1661. X!         if(ONMAP(X,Y)) {
  1662. X              if(sct[X][Y].owner == x) {
  1663. X                  friendly-=10;
  1664. X                  hostile +=10;
  1665. X**************
  1666. X*** 840,846
  1667. X          endy=MAPY;
  1668. X      } else {
  1669. X          if( curntn->capx > NPCTOOFAR )
  1670. X!             stx=curntn->capx-NPCTOOFAR;
  1671. X          else    stx=0;
  1672. X          if( curntn->capy > NPCTOOFAR )
  1673. X              sty=curntn->capy-NPCTOOFAR;
  1674. X--- 842,848 -----
  1675. X          endy=MAPY;
  1676. X      } else {
  1677. X          if( curntn->capx > NPCTOOFAR )
  1678. X!             stx=(int)curntn->capx-NPCTOOFAR;
  1679. X          else    stx=0;
  1680. X          if( curntn->capy > NPCTOOFAR )
  1681. X              sty=(int)curntn->capy-NPCTOOFAR;
  1682. X**************
  1683. X*** 843,849
  1684. X              stx=curntn->capx-NPCTOOFAR;
  1685. X          else    stx=0;
  1686. X          if( curntn->capy > NPCTOOFAR )
  1687. X!             sty=curntn->capy-NPCTOOFAR;
  1688. X          else    sty=0;
  1689. X          if( curntn->capx + NPCTOOFAR < MAPX )
  1690. X              endx=curntn->capx+NPCTOOFAR;
  1691. X--- 845,851 -----
  1692. X              stx=(int)curntn->capx-NPCTOOFAR;
  1693. X          else    stx=0;
  1694. X          if( curntn->capy > NPCTOOFAR )
  1695. X!             sty=(int)curntn->capy-NPCTOOFAR;
  1696. X          else    sty=0;
  1697. X          if( (int)curntn->capx + NPCTOOFAR < MAPX )
  1698. X              endx=(int)curntn->capx+NPCTOOFAR;
  1699. X**************
  1700. X*** 845,852
  1701. X          if( curntn->capy > NPCTOOFAR )
  1702. X              sty=curntn->capy-NPCTOOFAR;
  1703. X          else    sty=0;
  1704. X!         if( curntn->capx + NPCTOOFAR < MAPX )
  1705. X!             endx=curntn->capx+NPCTOOFAR;
  1706. X          else    endx=MAPX;
  1707. X          if( curntn->capy + NPCTOOFAR < MAPY )
  1708. X              endy=curntn->capy+NPCTOOFAR;
  1709. X--- 847,854 -----
  1710. X          if( curntn->capy > NPCTOOFAR )
  1711. X              sty=(int)curntn->capy-NPCTOOFAR;
  1712. X          else    sty=0;
  1713. X!         if( (int)curntn->capx + NPCTOOFAR < MAPX )
  1714. X!             endx=(int)curntn->capx+NPCTOOFAR;
  1715. X          else    endx=MAPX;
  1716. X          if( (int)curntn->capy + NPCTOOFAR < MAPY )
  1717. X              endy=(int)curntn->capy+NPCTOOFAR;
  1718. X**************
  1719. X*** 848,855
  1720. X          if( curntn->capx + NPCTOOFAR < MAPX )
  1721. X              endx=curntn->capx+NPCTOOFAR;
  1722. X          else    endx=MAPX;
  1723. X!         if( curntn->capy + NPCTOOFAR < MAPY )
  1724. X!             endy=curntn->capy+NPCTOOFAR;
  1725. X          else    endy=MAPY;
  1726. X      }
  1727. X  
  1728. X--- 850,857 -----
  1729. X          if( (int)curntn->capx + NPCTOOFAR < MAPX )
  1730. X              endx=(int)curntn->capx+NPCTOOFAR;
  1731. X          else    endx=MAPX;
  1732. X!         if( (int)curntn->capy + NPCTOOFAR < MAPY )
  1733. X!             endy=(int)curntn->capy+NPCTOOFAR;
  1734. X          else    endy=MAPY;
  1735. X      }
  1736. X  
  1737. X**************
  1738. X*** 1099,1106
  1739. X      for(x=stx;x<endx;x++) for(y=sty;y<endy;y++)  {
  1740. X          if((sct[x][y].owner != country )
  1741. X          &&( sct[x][y].owner != 0 )
  1742. X!         &&( abs(x-curntn->capx)>2 )
  1743. X!         &&( abs(y-curntn->capy)>2 )
  1744. X          &&( ntn[country].dstatus[sct[x][y].owner]<WAR)
  1745. X          &&( ntn[sct[x][y].owner].dstatus[country]<WAR)
  1746. X          &&( ntn[country].dstatus[sct[x][y].owner]>ALLIED))
  1747. X--- 1101,1108 -----
  1748. X      for(x=stx;x<endx;x++) for(y=sty;y<endy;y++)  {
  1749. X          if((sct[x][y].owner != country )
  1750. X          &&( sct[x][y].owner != 0 )
  1751. X!         &&( abs(x-(int)curntn->capx)>2 )
  1752. X!         &&( abs(y-(int)curntn->capy)>2 )
  1753. X          &&( ntn[country].dstatus[sct[x][y].owner]<WAR)
  1754. X          &&( ntn[sct[x][y].owner].dstatus[country]<WAR)
  1755. X          &&( ntn[country].dstatus[sct[x][y].owner]>ALLIED))
  1756. X**************
  1757. X*** 1126,1133
  1758. X      register int x,y;
  1759. X  
  1760. X      /* around capitol */
  1761. X!     for(x=curntn->capx-4;x<=curntn->capx+4;x++){
  1762. X!         for(y=curntn->capy-4;y<=curntn->capy+4;y++){
  1763. X              if((ONMAP(x,y))&&(sct[x][y].owner==0)) {
  1764. X                  attr[x][y] += 700;
  1765. X              }
  1766. X--- 1128,1135 -----
  1767. X      register int x,y;
  1768. X  
  1769. X      /* around capitol */
  1770. X!     for(x=(int)curntn->capx-4;x<=(int)curntn->capx+4;x++){
  1771. X!         for(y=(int)curntn->capy-4;y<=(int)curntn->capy+4;y++){
  1772. X              if((ONMAP(x,y))&&(sct[x][y].owner==0)) {
  1773. X                  attr[x][y] += 700;
  1774. X              }
  1775. X**************
  1776. X*** 1167,1174
  1777. X                  ntn[natn].arm[x].sold/10;
  1778. X  
  1779. X      /*plus 80 if near your capitol */
  1780. X!     for(x=curntn->capx-1;x<=curntn->capy+1;x++){
  1781. X!         for(y=curntn->capy-1;y<=curntn->capy+1;y++){
  1782. X              if(ONMAP(x,y)) attr[x][y]+=80;
  1783. X          }
  1784. X      }
  1785. X--- 1169,1176 -----
  1786. X                  ntn[natn].arm[x].sold/10;
  1787. X  
  1788. X      /*plus 80 if near your capitol */
  1789. X!     for(x=(int)curntn->capx-1;x<=(int)curntn->capy+1;x++){
  1790. X!         for(y=(int)curntn->capy-1;y<=(int)curntn->capy+1;y++){
  1791. X              if(ONMAP(x,y)) attr[x][y]+=80;
  1792. X          }
  1793. X      }
  1794. X
  1795. END_OF_FILE
  1796. if test 54373 -ne `wc -c <'patches02a'`; then
  1797.     echo shar: \"'patches02a'\" unpacked with wrong size!
  1798. fi
  1799. # end of 'patches02a'
  1800. fi
  1801. echo shar: End of shell archive.
  1802. exit 0
  1803.