home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / games / volume6 / conquer4 / patch5b < prev    next >
Internet Message Format  |  1989-09-11  |  49KB

  1. Path: uunet!zephyr.ens.tek.com!tekgen!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v08i014:  conquer4 - middle earth multi-player game (V4), Patch5b
  5. Message-ID: <4514@tekred.CNA.TEK.COM>
  6. Date: 1 Sep 89 18:53:26 GMT
  7. Sender: nobody@tekred.CNA.TEK.COM
  8. Lines: 1953
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: Adam Bryant <adb@cs.bu.edu>
  12. Posting-number: Volume 8, Issue 14
  13. Archive-name: conquer4/Patch5b
  14. Patch-To: conquer4: Volume 6, Issue 83-97
  15.  
  16.  
  17.  
  18. #!/bin/sh
  19. # this is part 2 of a multipart archive
  20. # do not concatenate these parts, unpack them in order with /bin/sh
  21. # file patchV4.5 continued
  22. #
  23. CurArch=2
  24. if test ! -r s2_seq_.tmp
  25. then echo "Please unpack part 1 first!"
  26.      exit 1; fi
  27. ( read Scheck
  28.   if test "$Scheck" != $CurArch
  29.   then echo "Please unpack part $Scheck next!"
  30.        exit 1;
  31.   else exit 0; fi
  32. ) < s2_seq_.tmp || exit 1
  33. echo "x - Continuing file patchV4.5"
  34. sed 's/^X//' << 'SHAR_EOF' >> patchV4.5
  35. X--- 490,496 ----
  36. X                ||(sct[P_AXLOC][P_AYLOC].designation==DCAPITOL)
  37. X                ||(sct[P_AXLOC][P_AYLOC].designation==DCITY))){
  38. X                  mvaddstr(LINES-2,0,"Entering Town/City sector");
  39. X+                 clrtoeol();
  40. X                  refresh();
  41. X                  sleep(2);
  42. X              } else if((SOWN!=country)
  43. X***************
  44. X*** 572,580 ****
  45. X          getch();
  46. X      }
  47. X      whatcansee();
  48. X!     redraw=FALSE;
  49. X      makemap();
  50. X      armornvy=AORN;
  51. X  }
  52. X  
  53. X  /************************************************************************/
  54. X--- 575,587 ----
  55. X          getch();
  56. X      }
  57. X      whatcansee();
  58. X!     redraw=DONE;
  59. X!     prep(country,FALSE,TRUE);
  60. X      makemap();
  61. X      armornvy=AORN;
  62. X+     makebottom();
  63. X+     pager=0;
  64. X+     selector=0;
  65. X  }
  66. X  
  67. X  /************************************************************************/
  68. X*** oupdate.c    Sat Aug 26 19:04:08 1989
  69. X--- update.c    Sat Aug 26 19:04:17 1989
  70. X***************
  71. X*** 10,18 ****
  72. X   *                            Ed
  73. X   */
  74. X  
  75. X  #include "header.h"
  76. X  #include "data.h"
  77. X- #include <ctype.h>
  78. X  
  79. X  extern FILE *fnews;
  80. X  
  81. X--- 10,19 ----
  82. X   *                            Ed
  83. X   */
  84. X  
  85. X+ #include <ctype.h>
  86. X+ #include <sys/file.h>
  87. X  #include "header.h"
  88. X  #include "data.h"
  89. X  
  90. X  extern FILE *fnews;
  91. X  
  92. X***************
  93. X*** 237,243 ****
  94. X  
  95. X      if(P_ASTAT>=NUMSTATUS) return(takesctr);
  96. X      if(P_AMOVE==0) return(takesctr);
  97. X!     /* if leader w/o group */
  98. X      if((P_ATYPE>=MINLEADER)&&(P_ATYPE<MINMONSTER)&&(P_ASTAT!=GENERAL)) {
  99. X          leadflag=TRUE;
  100. X          /* the king stays in capitol on RULE */
  101. X--- 238,245 ----
  102. X  
  103. X      if(P_ASTAT>=NUMSTATUS) return(takesctr);
  104. X      if(P_AMOVE==0) return(takesctr);
  105. X! 
  106. X!     /* if leader w/o a group, set leadflag */
  107. X      if((P_ATYPE>=MINLEADER)&&(P_ATYPE<MINMONSTER)&&(P_ASTAT!=GENERAL)) {
  108. X          leadflag=TRUE;
  109. X          /* the king stays in capitol on RULE */
  110. X***************
  111. X*** 250,264 ****
  112. X      }
  113. X  
  114. X      sum=0;
  115. X!     if(leadflag) {        /* find unattached soldiers & move anywhere */
  116. X          for(i=0;i<MAXARM;i++)
  117. X          if(( curntn->arm[i].unittyp<MINLEADER )
  118. X          &&( curntn->arm[i].stat!=MILITIA )
  119. X          &&( curntn->arm[i].stat!=ONBOARD )
  120. X          &&( curntn->arm[i].stat!=TRADED )
  121. X          &&( curntn->arm[i].stat<NUMSTATUS ))
  122. X              sum+=curntn->arm[i].sold;
  123. X!     } else    {
  124. X          /* use menok as a temp vbl now == men in army */
  125. X          menok=0;
  126. X          if((P_ATYPE>=MINLEADER)
  127. X--- 252,267 ----
  128. X      }
  129. X  
  130. X      sum=0;
  131. X!     if(leadflag) {        /* Move based on unattached soldiers */
  132. X          for(i=0;i<MAXARM;i++)
  133. X          if(( curntn->arm[i].unittyp<MINLEADER )
  134. X          &&( curntn->arm[i].stat!=MILITIA )
  135. X          &&( curntn->arm[i].stat!=ONBOARD )
  136. X+         &&( curntn->arm[i].stat!=GARRISON )
  137. X          &&( curntn->arm[i].stat!=TRADED )
  138. X          &&( curntn->arm[i].stat<NUMSTATUS ))
  139. X              sum+=curntn->arm[i].sold;
  140. X!     } else    {        /* not leader w/o group */
  141. X          /* use menok as a temp vbl now == men in army */
  142. X          menok=0;
  143. X          if((P_ATYPE>=MINLEADER)
  144. X***************
  145. X*** 282,288 ****
  146. X          }
  147. X      }
  148. X  
  149. X!     if(sum==0) {
  150. X          P_AXLOC=curntn->capx;
  151. X          P_AYLOC=curntn->capy;
  152. X          P_ASTAT=DEFEND;
  153. X--- 285,291 ----
  154. X          }
  155. X      }
  156. X  
  157. X!     if(sum==0) {        /* nowhere to go */
  158. X          P_AXLOC=curntn->capx;
  159. X          P_AYLOC=curntn->capy;
  160. X          P_ASTAT=DEFEND;
  161. X***************
  162. X*** 291,296 ****
  163. X--- 294,300 ----
  164. X          for(x=0;x<MAXARM;x++)
  165. X          if((curntn->arm[x].unittyp<MINLEADER )
  166. X          &&( curntn->arm[x].stat!=MILITIA )
  167. X+         &&( curntn->arm[x].stat!=GARRISON )
  168. X          &&( curntn->arm[x].stat!=ONBOARD )
  169. X          &&( curntn->arm[x].stat!=TRADED )
  170. X          &&( curntn->arm[x].stat<NUMSTATUS )){
  171. X***************
  172. X*** 305,311 ****
  173. X--- 309,317 ----
  174. X              &&( curntn->arm[x].stat<NUMSTATUS )
  175. X              &&( curntn->arm[x].sold>=0 )
  176. X              &&( curntn->arm[x].stat!=MILITIA )
  177. X+             &&( curntn->arm[x].stat!=GARRISON )
  178. X              &&( curntn->arm[x].stat!=SIEGED )
  179. X+             &&( curntn->arm[x].stat!=SCOUT )
  180. X              &&( curntn->arm[x].stat!=ONBOARD )
  181. X              &&( curntn->arm[x].stat!=TRADED )
  182. X              &&( curntn->arm[x].unittyp!=A_ZOMBIE )
  183. X***************
  184. X*** 316,322 ****
  185. X                  break;
  186. X              }
  187. X          }
  188. X!     } else {
  189. X          where=rand()%sum;
  190. X          /* range of 4 if menok is FALSE else 2 */
  191. X          for(x=(int)P_AXLOC-4+menok*2;x<=(int)P_AXLOC+4-menok*2;x++)
  192. X--- 322,328 ----
  193. X                  break;
  194. X              }
  195. X          }
  196. X!     } else {    /* move a normal unit */
  197. X          where=rand()%sum;
  198. X          /* range of 4 if menok is FALSE else 2 */
  199. X          for(x=(int)P_AXLOC-4+menok*2;x<=(int)P_AXLOC+4-menok*2;x++)
  200. X***************
  201. X*** 335,341 ****
  202. X                      P_AYLOC=curntn->capy;
  203. X                  }
  204. X  
  205. X!                 /* CHANGE SO ARMIES MOVE PSEUDO INDEPENDANTLY */
  206. X                  if((sct[x][y].designation != DCITY)
  207. X                  &&(sct[x][y].designation != DCAPITOL)
  208. X                  &&(sct[x][y].designation != DTOWN)
  209. X--- 341,347 ----
  210. X                      P_AYLOC=curntn->capy;
  211. X                  }
  212. X  
  213. X!                 /* ARMIES MOVE PSEUDO INDEPENDANTLY */
  214. X                  if((sct[x][y].designation != DCITY)
  215. X                  &&(sct[x][y].designation != DCAPITOL)
  216. X                  &&(sct[x][y].designation != DTOWN)
  217. X***************
  218. X*** 434,441 ****
  219. X  {
  220. X      int x,y;
  221. X      int bonus=0, count=0, npcavg, pcavg, avgscore=0;
  222. X      /* add gold */
  223. X!     for(x=1;x<NTOTAL;x++) if(isnpc(ntn[x].active)) {
  224. X          if((ntn[x].tgold<ntn[x].tciv)
  225. X          &&( rand()%5==0)){
  226. X              ntn[x].tgold+=10000;
  227. X--- 440,459 ----
  228. X  {
  229. X      int x,y;
  230. X      int bonus=0, count=0, npcavg, pcavg, avgscore=0;
  231. X+     char realnpc[NTOTAL],tempc[LINELTH];
  232. X+ 
  233. X+     /* take inventory of countries */
  234. X+     for(x=1;x<NTOTAL;x++) {
  235. X+         sprintf(tempc,"%s%d", exefile, x);
  236. X+         if (isnpc(ntn[x].active) && access(tempc,F_OK)==0) {
  237. X+             realnpc[x]=TRUE;
  238. X+         } else {
  239. X+             realnpc[x]=FALSE;
  240. X+         }
  241. X+     }
  242. X+ 
  243. X      /* add gold */
  244. X!     for(x=1;x<NTOTAL;x++) if(realnpc[x]==TRUE) {
  245. X          if((ntn[x].tgold<ntn[x].tciv)
  246. X          &&( rand()%5==0)){
  247. X              ntn[x].tgold+=10000;
  248. X***************
  249. X*** 444,450 ****
  250. X      }
  251. X  
  252. X      for(x=1;x<NTOTAL;x++)
  253. X!         if(ispc(ntn[x].active))  {
  254. X              bonus+=ntn[x].aplus+ntn[x].dplus;
  255. X              avgscore+=ntn[x].score;
  256. X              count++;
  257. X--- 462,468 ----
  258. X      }
  259. X  
  260. X      for(x=1;x<NTOTAL;x++)
  261. X!         if(realnpc[x]==FALSE)  {
  262. X              bonus+=ntn[x].aplus+ntn[x].dplus;
  263. X              avgscore+=ntn[x].score;
  264. X              count++;
  265. X***************
  266. X*** 458,464 ****
  267. X      bonus=0;
  268. X      count=0;
  269. X      for(x=1;x<NTOTAL;x++) 
  270. X!         if(isnpc(ntn[x].active))  {
  271. X              bonus+=ntn[x].aplus+ntn[x].dplus;
  272. X              count++;
  273. X          }
  274. X--- 476,482 ----
  275. X      bonus=0;
  276. X      count=0;
  277. X      for(x=1;x<NTOTAL;x++) 
  278. X!         if(realnpc[x]==TRUE)  {
  279. X              bonus+=ntn[x].aplus+ntn[x].dplus;
  280. X              count++;
  281. X          }
  282. X***************
  283. X*** 465,471 ****
  284. X      if(count==0) return;
  285. X      npcavg = bonus / count;
  286. X      for(x=1;x<NTOTAL;x++) 
  287. X!     if(isnpc(ntn[x].active ) 
  288. X      &&(ntn[x].score < avgscore)
  289. X      &&(ntn[x].race != ORC )
  290. X      &&(rand()%100 < (pcavg-npcavg))) {
  291. X--- 483,489 ----
  292. X      if(count==0) return;
  293. X      npcavg = bonus / count;
  294. X      for(x=1;x<NTOTAL;x++) 
  295. X!     if((realnpc[x]==TRUE)
  296. X      &&(ntn[x].score < avgscore)
  297. X      &&(ntn[x].race != ORC )
  298. X      &&(rand()%100 < (pcavg-npcavg))) {
  299. X***************
  300. X*** 476,483 ****
  301. X  
  302. X      /* cheat by making npc's frendlier to each other if they are */
  303. X      /* of the same race */
  304. X!     for(x=1;x<NTOTAL;x++) if(isnpc(ntn[x].active))
  305. X!         for(y=1;y<NTOTAL;y++) if(isnpc(ntn[y].active))
  306. X              if((ntn[x].dstatus[y]!=TREATY)
  307. X              &&(ntn[x].dstatus[y]!=UNMET)){
  308. X                  if(ntn[x].race == ntn[y].race){
  309. X--- 494,501 ----
  310. X  
  311. X      /* cheat by making npc's frendlier to each other if they are */
  312. X      /* of the same race */
  313. X!     for(x=1;x<NTOTAL;x++) if(realnpc[x]==TRUE)
  314. X!         for(y=1;y<NTOTAL;y++) if(realnpc[x]==TRUE)
  315. X              if((ntn[x].dstatus[y]!=TREATY)
  316. X              &&(ntn[x].dstatus[y]!=UNMET)){
  317. X                  if(ntn[x].race == ntn[y].race){
  318. X*** ocommands.c    Sat Aug 26 19:04:06 1989
  319. X--- commands.c    Sat Aug 26 19:04:18 1989
  320. X***************
  321. X*** 241,251 ****
  322. X          }
  323. X      }
  324. X  
  325. X      if((SOWN!=country)&&(isgod==FALSE)) {
  326. X          errormsg("Hey!  You don't own that sector!");
  327. X          return;
  328. X      }
  329. X-     clear_bottom(0);
  330. X  
  331. X      mvaddstr(LINES-4,0,"Possible sector designations: ");
  332. X      x = 30;
  333. X--- 241,251 ----
  334. X          }
  335. X      }
  336. X  
  337. X+     clear_bottom(0);
  338. X      if((SOWN!=country)&&(isgod==FALSE)) {
  339. X          errormsg("Hey!  You don't own that sector!");
  340. X          return;
  341. X      }
  342. X  
  343. X      mvaddstr(LINES-4,0,"Possible sector designations: ");
  344. X      x = 30;
  345. X***************
  346. X*** 984,990 ****
  347. X              clrtoeol();
  348. X          }
  349. X          errormsg("");
  350. X!         redraw=TRUE;
  351. X      } else {
  352. X          P_AYLOC=YREAL;
  353. X          P_AXLOC=XREAL;
  354. X--- 984,990 ----
  355. X              clrtoeol();
  356. X          }
  357. X          errormsg("");
  358. X!         redraw=PART;
  359. X      } else {
  360. X          P_AYLOC=YREAL;
  361. X          P_AXLOC=XREAL;
  362. X***************
  363. X*** 1039,1045 ****
  364. X          clear_bottom(0);
  365. X          sprintf(mesgfile,"error: %s open",tempfile);
  366. X          errormsg(mesgfile);
  367. X!         redraw=FALSE;
  368. X          makebottom();
  369. X          return;
  370. X      }
  371. X--- 1039,1045 ----
  372. X          clear_bottom(0);
  373. X          sprintf(mesgfile,"error: %s open",tempfile);
  374. X          errormsg(mesgfile);
  375. X!         redraw=DONE;
  376. X          makebottom();
  377. X          return;
  378. X      }
  379. X***************
  380. X*** 1050,1056 ****
  381. X          clear_bottom(0);
  382. X          errormsg("no messages");
  383. X          makebottom();
  384. X!         redraw=FALSE;
  385. X          return;
  386. X      }
  387. X  
  388. X--- 1050,1056 ----
  389. X          clear_bottom(0);
  390. X          errormsg("no messages");
  391. X          makebottom();
  392. X!         redraw=DONE;
  393. X          return;
  394. X      }
  395. X  
  396. X***************
  397. X*** 1057,1063 ****
  398. X      /*read in file a line at at time*/
  399. X      if(fgets(line,LINELTH,mesgfp)==NULL) {
  400. X          done=TRUE;
  401. X!         redraw=FALSE;
  402. X          clear_bottom(0);
  403. X          errormsg("no messages");
  404. X          makebottom();
  405. X--- 1057,1063 ----
  406. X      /*read in file a line at at time*/
  407. X      if(fgets(line,LINELTH,mesgfp)==NULL) {
  408. X          done=TRUE;
  409. X!         redraw=DONE;
  410. X          clear_bottom(0);
  411. X          errormsg("no messages");
  412. X          makebottom();
  413. X***************
  414. X*** 1226,1243 ****
  415. X  
  416. X      clear_bottom(0);
  417. X      if(sct[XREAL][YREAL].owner!=country){
  418. X!         errormsg("you do not own");
  419. X!         makebottom();
  420. X          return;
  421. X      }
  422. X      else if(sct[XREAL][YREAL].people==0){
  423. X!         errormsg("nobody lives here!!!");
  424. X!         makebottom();
  425. X          return;
  426. X      }
  427. X  
  428. X      mvprintw(LINES-4,0,"Sector contains %d people [cost 50 per civilian]",sct[XREAL][YREAL].people);
  429. X!     mvaddstr(LINES-3,0,"how many people to move?");
  430. X      clrtoeol();
  431. X      refresh();
  432. X      people = get_number();
  433. X--- 1226,1241 ----
  434. X  
  435. X      clear_bottom(0);
  436. X      if(sct[XREAL][YREAL].owner!=country){
  437. X!         errormsg("Sorry, you don't own that sector.");
  438. X          return;
  439. X      }
  440. X      else if(sct[XREAL][YREAL].people==0){
  441. X!         errormsg("Nobody lives there!!!");
  442. X          return;
  443. X      }
  444. X  
  445. X      mvprintw(LINES-4,0,"Sector contains %d people [cost 50 per civilian]",sct[XREAL][YREAL].people);
  446. X!     mvaddstr(LINES-3,0,"How many people to move?");
  447. X      clrtoeol();
  448. X      refresh();
  449. X      people = get_number();
  450. X***************
  451. X*** 1244,1259 ****
  452. X      if (people <= 0) {
  453. X          return;
  454. X      }
  455. X!     if((people>sct[XREAL][YREAL].people)
  456. X!     ||(people*50>curntn->tgold)){
  457. X!         errormsg("Sorry...Input error or you do not have the gold talons");
  458. X!         makebottom();
  459. X          return;
  460. X      }
  461. X  
  462. X!     mvprintw(LINES-4,0,"sector location is x=%d, y=%d",XREAL,YREAL);
  463. X      clrtoeol();
  464. X!     mvaddstr(LINES-3,0,"what x location to move to?");
  465. X      clrtoeol();
  466. X      refresh();
  467. X      i = get_number();
  468. X--- 1242,1258 ----
  469. X      if (people <= 0) {
  470. X          return;
  471. X      }
  472. X!     if (people>sct[XREAL][YREAL].people) {
  473. X!         errormsg("Sorry, not that many people live there.");
  474. X!     }
  475. X!     if (people*50>curntn->tgold) {
  476. X!         errormsg("Sorry, you do not have enough gold talons.");
  477. X          return;
  478. X      }
  479. X  
  480. X!     mvprintw(LINES-4,0,"Sector location is x=%d, y=%d",XREAL,YREAL);
  481. X      clrtoeol();
  482. X!     mvaddstr(LINES-3,0,"What X location to move to?");
  483. X      clrtoeol();
  484. X      refresh();
  485. X      i = get_number();
  486. X***************
  487. X*** 1262,1273 ****
  488. X      }
  489. X  
  490. X      if((i-(XREAL))>2||(i-(XREAL))<-2) {
  491. X!         errormsg("sorry, can only move two sectors");
  492. X!         makebottom();
  493. X          return;
  494. X      }
  495. X  
  496. X!     mvaddstr(LINES-2,0,"what y location to move to?");
  497. X      clrtoeol();
  498. X      refresh();
  499. X      j = get_number();
  500. X--- 1261,1271 ----
  501. X      }
  502. X  
  503. X      if((i-(XREAL))>2||(i-(XREAL))<-2) {
  504. X!         errormsg("Sorry, your people refuse to move more than two sectors.");
  505. X          return;
  506. X      }
  507. X  
  508. X!     mvaddstr(LINES-2,0,"What Y location to move to?");
  509. X      clrtoeol();
  510. X      refresh();
  511. X      j = get_number();
  512. X***************
  513. X*** 1275,1290 ****
  514. X          return;
  515. X      }
  516. X      if((j-(YREAL)>2)||((YREAL)-j>2)) {
  517. X!         errormsg("sorry, can only move two sectors");
  518. X!     }
  519. X!     else if(sct[i][j].owner!=country){
  520. X!         errormsg("sorry, you dont own it...");
  521. X!     }
  522. X!     /*need to check move cost > 0 for sector*/
  523. X!     else if(movecost[i][j]<0){
  524. X!         errormsg("you can't enter there...");
  525. X!     }
  526. X!     else if ((i!=XREAL)||(j!=YREAL)){
  527. X          curntn->tgold-=50*people;
  528. X          sct[XREAL][YREAL].people-=people;
  529. X          SADJCIV;
  530. X--- 1273,1285 ----
  531. X          return;
  532. X      }
  533. X      if((j-(YREAL)>2)||((YREAL)-j>2)) {
  534. X!         errormsg("Sorry, your people refuse to move more than two sectors.");
  535. X!     } else if(sct[i][j].owner!=country){
  536. X!         errormsg("Sorry, you don't own that sector.");
  537. X!     } else if(movecost[i][j]<0){
  538. X!         /*need to check move cost > 0 for sector*/
  539. X!         errormsg("Sorry, your people refuse to enter that sector.");
  540. X!     } else if ((i!=XREAL)||(j!=YREAL)){
  541. X          curntn->tgold-=50*people;
  542. X          sct[XREAL][YREAL].people-=people;
  543. X          SADJCIV;
  544. X***************
  545. X*** 1291,1297 ****
  546. X          sct[i][j].people+=people;
  547. X          SADJCIV2;
  548. X      }
  549. X-     makebottom();
  550. X  }
  551. X  
  552. X  int
  553. X--- 1286,1291 ----
  554. X*** oio.c    Sat Aug 26 19:04:06 1989
  555. X--- io.c    Sat Aug 26 19:04:18 1989
  556. X***************
  557. X*** 171,178 ****
  558. X      for(Y=0;Y<MAPY;Y++) {
  559. X          for(X=0;X<MAPX;X++) {
  560. X              if (mapseen[X][Y]==TRUE) {
  561. X!                 if (country==0 || magic(sct[X][Y].owner,NINJA)==TRUE
  562. X!                     || magic(sct[X][Y].owner,THE_VOID)!=TRUE) {
  563. X                      if(sct[X][Y].designation==DNODESIG)
  564. X                          putc(sct[X][Y].altitude,stdout);
  565. X                      else putc(sct[X][Y].designation,stdout);
  566. X--- 171,180 ----
  567. X      for(Y=0;Y<MAPY;Y++) {
  568. X          for(X=0;X<MAPX;X++) {
  569. X              if (mapseen[X][Y]==TRUE) {
  570. X!                 if ((country == 0)
  571. X!                   || (sct[X][Y].owner == country)
  572. X!                   || (magic (country, NINJA) == TRUE)
  573. X!                   || (magic (sct[X][Y].owner, THE_VOID) != TRUE)) {
  574. X                      if(sct[X][Y].designation==DNODESIG)
  575. X                          putc(sct[X][Y].altitude,stdout);
  576. X                      else putc(sct[X][Y].designation,stdout);
  577. X***************
  578. X*** 274,280 ****
  579. X          abrt();
  580. X      }
  581. X  #ifdef DEBUG
  582. X!     printf("reading %d bytes of world data\n",sizeof(struct s_world));
  583. X  #endif DEBUG
  584. X  
  585. X      getspace();
  586. X--- 276,282 ----
  587. X          abrt();
  588. X      }
  589. X  #ifdef DEBUG
  590. X!     fprintf(stderr,"reading %d bytes of world data\n",sizeof(struct s_world));
  591. X  #endif DEBUG
  592. X  
  593. X      getspace();
  594. X***************
  595. X*** 288,294 ****
  596. X          abrt();
  597. X      }
  598. X  #ifdef DEBUG
  599. X!     printf("reading %d bytes of sector data\n",n_read);
  600. X  #endif DEBUG
  601. X      if((n_read=read(fd,ntn,NTOTAL*sizeof(struct s_nation))) == -1)
  602. X          printf("error reading s_nation data (ntn)\n");
  603. X--- 290,296 ----
  604. X          abrt();
  605. X      }
  606. X  #ifdef DEBUG
  607. X!     fprintf(stderr,"reading %d bytes of sector data\n",n_read);
  608. X  #endif DEBUG
  609. X      if((n_read=read(fd,ntn,NTOTAL*sizeof(struct s_nation))) == -1)
  610. X          printf("error reading s_nation data (ntn)\n");
  611. X***************
  612. X*** 298,304 ****
  613. X          abrt();
  614. X      }
  615. X  #ifdef DEBUG
  616. X!     printf("reading %d bytes of nation data\n",n_read);
  617. X  #endif DEBUG
  618. X      close(fd);
  619. X  } /* readdata() */
  620. X--- 300,306 ----
  621. X          abrt();
  622. X      }
  623. X  #ifdef DEBUG
  624. X!     fprintf(stderr,"reading %d bytes of nation data\n",n_read);
  625. X  #endif DEBUG
  626. X      close(fd);
  627. X  } /* readdata() */
  628. X***************
  629. X*** 317,323 ****
  630. X              xcurs=0;
  631. X          }
  632. X          else {
  633. X!             redraw=TRUE;
  634. X              xoffset-=15;
  635. X              xcurs+=15;
  636. X          }
  637. X--- 319,325 ----
  638. X              xcurs=0;
  639. X          }
  640. X          else {
  641. X!             redraw=PART;
  642. X              xoffset-=15;
  643. X              xcurs+=15;
  644. X          }
  645. X***************
  646. X*** 324,330 ****
  647. X      }
  648. X      else if(xcurs >= (COLS-23)/2){
  649. X          if(XREAL<MAPX) {
  650. X!             redraw=TRUE;
  651. X              xoffset+=15;
  652. X              xcurs-=15;
  653. X          }
  654. X--- 326,332 ----
  655. X      }
  656. X      else if(xcurs >= (COLS-23)/2){
  657. X          if(XREAL<MAPX) {
  658. X!             redraw=PART;
  659. X              xoffset+=15;
  660. X              xcurs-=15;
  661. X          }
  662. X***************
  663. X*** 339,345 ****
  664. X          xcurs=0;
  665. X      }
  666. X      else if(xcurs >= (COLS-23)/2) {
  667. X!         redraw=TRUE;
  668. X          xoffset+=15;
  669. X          xcurs-=15;
  670. X      }
  671. X--- 341,347 ----
  672. X          xcurs=0;
  673. X      }
  674. X      else if(xcurs >= (COLS-23)/2) {
  675. X!         redraw=PART;
  676. X          xoffset+=15;
  677. X          xcurs-=15;
  678. X      }
  679. X***************
  680. X*** 350,356 ****
  681. X              ycurs=0;
  682. X          }
  683. X          else {
  684. X!             redraw=TRUE;
  685. X              ycurs+=15;
  686. X              yoffset-=15;
  687. X          }
  688. X--- 352,358 ----
  689. X              ycurs=0;
  690. X          }
  691. X          else {
  692. X!             redraw=PART;
  693. X              ycurs+=15;
  694. X              yoffset-=15;
  695. X          }
  696. X***************
  697. X*** 357,363 ****
  698. X      }
  699. X      else if(ycurs >= SCREEN_Y_SIZE-1){
  700. X          if(YREAL<MAPY) {
  701. X!             redraw=TRUE;
  702. X              yoffset+=15;
  703. X              ycurs-=15;
  704. X          }
  705. X--- 359,365 ----
  706. X      }
  707. X      else if(ycurs >= SCREEN_Y_SIZE-1){
  708. X          if(YREAL<MAPY) {
  709. X!             redraw=PART;
  710. X              yoffset+=15;
  711. X              ycurs-=15;
  712. X          }
  713. X***************
  714. X*** 372,382 ****
  715. X          ycurs=0;
  716. X      }
  717. X      else if(ycurs >= SCREEN_Y_SIZE-1) {
  718. X!         redraw=TRUE;
  719. X          yoffset+=15;
  720. X          ycurs-=15;
  721. X      }
  722. X      whatcansee();
  723. X  }
  724. X  
  725. X  /************************************************************************/
  726. X--- 374,404 ----
  727. X          ycurs=0;
  728. X      }
  729. X      else if(ycurs >= SCREEN_Y_SIZE-1) {
  730. X!         redraw=PART;
  731. X          yoffset+=15;
  732. X          ycurs-=15;
  733. X      }
  734. X      whatcansee();
  735. X+ }
  736. X+ 
  737. X+ /************************************************************************/
  738. X+ /*    CENTERMAP()    - redraws screen so that cursor is centered    */
  739. X+ /************************************************************************/
  740. X+ void
  741. X+ centermap()
  742. X+ {
  743. X+   int xx,yy;
  744. X+   xx=XREAL;
  745. X+   yy=YREAL;
  746. X+   xoffset = xx - (SCREEN_X_SIZE/2);
  747. X+   yoffset = yy - (SCREEN_Y_SIZE/2);
  748. X+   if (xoffset<0)
  749. X+       xoffset=0;
  750. X+   if (yoffset<0)
  751. X+       yoffset=0;
  752. X+   xcurs= xx-xoffset;
  753. X+   ycurs= yy-yoffset;
  754. X+   whatcansee();
  755. X  }
  756. X  
  757. X  /************************************************************************/
  758. X*** onewhelp.c    Sat Aug 26 19:04:07 1989
  759. X--- newhelp.c    Sat Aug 26 19:04:18 1989
  760. X***************
  761. X*** 45,50 ****
  762. X--- 45,51 ----
  763. X      fprintf(fp,"s/XMAXNAVY/%d/g\n",MAXNAVY);
  764. X      fprintf(fp,"s/XBREAKJIHAD/%ld/g\n",BREAKJIHAD);
  765. X      fprintf(fp,"s/XCONQENV/%s/g\n",ENVIRON_OPTS);
  766. X+     fprintf(fp,"s/XNCITYCOST/%d/g\n",N_CITYCOST);
  767. X  
  768. X      /* check all the defined options */
  769. X  #ifdef OGOD
  770. X*** omagic.c    Sat Aug 26 19:04:06 1989
  771. X--- magic.c    Sat Aug 26 19:04:18 1989
  772. X***************
  773. X*** 187,192 ****
  774. X--- 187,196 ----
  775. X  {
  776. X      int county, countx, done=FALSE, loop=0, i,type;
  777. X      long price,x;
  778. X+ #ifdef OGOD
  779. X+     void god_magk();
  780. X+ #endif /* OGOD */
  781. X+ 
  782. X      short isgod=0;
  783. X      if(country==0) {
  784. X          isgod=TRUE;
  785. X***************
  786. X*** 198,204 ****
  787. X          clear();
  788. X          county=3;
  789. X          countx=0;
  790. X!         redraw=TRUE;
  791. X          standout();
  792. X          mvprintw(0,(COLS/2)-15,"MAGIC POWERS FOR %s",curntn->name);
  793. X          mvprintw(county++,30,"1) %d military powers: %ld jewels",
  794. X--- 202,208 ----
  795. X          clear();
  796. X          county=3;
  797. X          countx=0;
  798. X!         redraw=FULL;
  799. X          standout();
  800. X          mvprintw(0,(COLS/2)-15,"MAGIC POWERS FOR %s",curntn->name);
  801. X          mvprintw(county++,30,"1) %d military powers: %ld jewels",
  802. X***************
  803. X*** 213,221 ****
  804. X              price = getmgkcost(M_CIV,country);
  805. X          if(price > getmgkcost(M_MGK,country))
  806. X              price = getmgkcost(M_MGK,country);
  807. X- #ifdef OGOD
  808. X-         if (isgod==TRUE) price=0;
  809. X- #endif OGOD
  810. X  
  811. X          standend();
  812. X          county=3;
  813. X--- 217,222 ----
  814. X***************
  815. X*** 236,243 ****
  816. X          else county++;
  817. X          standout();
  818. X          mvprintw(county++,0,"YOU HAVE %ld JEWELS IN YOUR TREASURY",curntn->jewels);
  819. X!         if(price < curntn->jewels){
  820. X!         mvaddstr(county++,0,"DO YOU WISH TO BUY A RANDOM NEW POWER (enter y or n):");
  821. X          standend();
  822. X          refresh();
  823. X          if(getch()=='y'){
  824. X--- 237,253 ----
  825. X          else county++;
  826. X          standout();
  827. X          mvprintw(county++,0,"YOU HAVE %ld JEWELS IN YOUR TREASURY",curntn->jewels);
  828. X! #ifdef OGOD
  829. X!         if (isgod==TRUE) {
  830. X!             mvaddstr(county++,0,"DO YOU WISH TO CHANGE THIS NATION'S POWERS? [yn]");
  831. X!             standend();
  832. X!             refresh();
  833. X!             if (getch()=='y') god_magk(FALSE);
  834. X!         } else
  835. X! #endif OGOD
  836. X!         if(price <= curntn->jewels){
  837. X! 
  838. X!         mvaddstr(county++,0,"DO YOU WISH TO BUY A RANDOM NEW POWER? [yn]");
  839. X          standend();
  840. X          refresh();
  841. X          if(getch()=='y'){
  842. X***************
  843. X*** 247,255 ****
  844. X              type = getch() - '0';
  845. X              if(type==M_MIL || type==M_CIV || type==M_MGK){
  846. X              price=getmgkcost(type,country);
  847. X- #ifdef OGOD
  848. X-             if (isgod==TRUE) price=0;
  849. X- #endif OGOD
  850. X              if(curntn->jewels>=price) {
  851. X                  loop = 0;
  852. X                  while(loop++ < 500) if((x=getmagic(type))!=0){
  853. X--- 257,262 ----
  854. X***************
  855. X*** 277,289 ****
  856. X          if((curntn->race==ORC)&&(curntn->jewels>=ORCTAKE)&&(curntn->spellpts>=TAKEPOINTS))
  857. X              done |= orctake(&county);
  858. X  #endif ORCTAKE
  859. X- #ifdef OGOD
  860. X-         if (isgod==TRUE) {
  861. X-             mvaddstr(county++,0,"GOD: REMOVE A MAGIC POWER? (y or n)");
  862. X-             refresh();
  863. X-             if (getch()=='y') killmagk();
  864. X-         }
  865. X- #endif OGOD
  866. X      }
  867. X      if(isgod==TRUE) reset_god();
  868. X  }
  869. X--- 284,289 ----
  870. X***************
  871. X*** 413,421 ****
  872. X      ||(newpower==KNOWALL)
  873. X      ||(newpower==HIDDEN)
  874. X      ||(newpower==THE_VOID)
  875. X!     ||(newpower==ARCHITECT)
  876. X!     ||(newpower==MINER))
  877. X          return;
  878. X      if(newpower==VAMPIRE) {
  879. X          curntn->aplus-=35;
  880. X          curntn->dplus-=35;
  881. X--- 413,424 ----
  882. X      ||(newpower==KNOWALL)
  883. X      ||(newpower==HIDDEN)
  884. X      ||(newpower==THE_VOID)
  885. X!     ||(newpower==ARCHITECT))
  886. X          return;
  887. X+     if(newpower==MINER) {
  888. X+         curntn->mine_ability+=25;
  889. X+         return;
  890. X+     }
  891. X      if(newpower==VAMPIRE) {
  892. X          curntn->aplus-=35;
  893. X          curntn->dplus-=35;
  894. X***************
  895. X*** 811,857 ****
  896. X  
  897. X  #ifdef CONQUER
  898. X  #ifdef OGOD
  899. X! /* killmagk: this routine removes a magic power */
  900. X! killmagk()
  901. X  {
  902. X!     int county,countx,choice,i;
  903. X  
  904. X!     clear();
  905. X!     county=3;
  906. X!     countx=0;
  907. X!     standout();
  908. X!     mvprintw(0,(COLS/2)-15,"MAGIC POWERS FOR %s",curntn->name);
  909. X!     standend();
  910. X!     i=0;
  911. X!     while( powers[i] != 0 ){
  912. X!         if(magic(country,powers[i])==TRUE) {
  913. X!             mvprintw(county,countx,"%d: power %s",i+1,*(pwrname+i));
  914. X!             county++;
  915. X          }
  916. X!         i++;
  917. X!         if (county > 18) {
  918. X!             county = 3;
  919. X!             countx = 40;
  920. X          }
  921. X!     }
  922. X!     if (countx == 40) {
  923. X!       county = 20;
  924. X!     }
  925. X!     else county++;
  926. X!     standout();
  927. X!     mvaddstr(county++,5," Which power to remove? ");
  928. X!     standend();
  929. X!     refresh();
  930. X!     choice=get_number();
  931. X!     if(choice > 0) {
  932. X!         mvprintw(county++,0," Remove magic #%d? (y or [n])",choice);
  933. X          refresh();
  934. X!         if (getch()=='y') {
  935. X!             if(magic(country,powers[choice-1])) {
  936. X!                 curntn->powers ^= powers[choice-1];
  937. X!                 removemgk(powers[choice-1]);
  938. X              }
  939. X          }
  940. X      }
  941. X  }
  942. X  #endif OGOD
  943. X--- 814,899 ----
  944. X  
  945. X  #ifdef CONQUER
  946. X  #ifdef OGOD
  947. X! /* godmagk() -- routine to allow god to selectively add or remove magic */
  948. X! void
  949. X! god_magk()
  950. X  {
  951. X!     int county,countx,choice;
  952. X!     int remove,i,done=FALSE;
  953. X  
  954. X!     while (done==FALSE) {
  955. X!         clear();
  956. X!         county=3;
  957. X!         countx=0;
  958. X!         standout();
  959. X!         mvaddstr(0,0,"Do you wish to (A)dd or (R)emove a power? ");
  960. X!         refresh();
  961. X!         while (done==FALSE) {
  962. X!             done=TRUE;
  963. X!             switch(getch()) {
  964. X!             case 'A':
  965. X!             case 'a':
  966. X!                 remove=FALSE;
  967. X!                 break;
  968. X!             case 'R':
  969. X!             case 'r':
  970. X!                 remove=TRUE;
  971. X!                 break;
  972. X!             default:
  973. X!                 done=FALSE;
  974. X!                 break;
  975. X!             }
  976. X          }
  977. X!         move(0,0);
  978. X!         clrtoeol();
  979. X!         if (remove)
  980. X!         mvprintw(0,(COLS/2)-15,"CURRENT POWERS FOR %s",curntn->name);
  981. X!         else
  982. X!         mvprintw(0,(COLS/2)-15,"LACKING POWERS FOR %s",curntn->name);
  983. X!         standend();
  984. X!         i=0;
  985. X!         while( powers[i] != 0 ){
  986. X!             if(magic(country,powers[i])==remove) {
  987. X!                 mvprintw(county,countx,"%2d: %s Power",i+1,*(pwrname+i));
  988. X!                 county++;
  989. X!             }
  990. X!             i++;
  991. X!             if (county > LINES-6) {
  992. X!                 county = 3;
  993. X!                 countx = COLS/2;
  994. X!             }
  995. X          }
  996. X!         if (countx == COLS/2) {
  997. X!             county = LINES-4;
  998. X!         }
  999. X!         else county++;
  1000. X!         standout();
  1001. X!         if (remove) mvaddstr(county++,0,"Which power to remove? ");
  1002. X!         else mvaddstr(county++,0,"Which power to add? ");
  1003. X!         standend();
  1004. X          refresh();
  1005. X!         choice=get_number();
  1006. X!         if(choice > 0 && choice <= MAXPOWER) {
  1007. X!             if (magic(country,powers[choice-1])==remove) {
  1008. X!                 if (remove)
  1009. X!                 mvprintw(county++,0,"Remove magic #%d? (y or [n])",choice);
  1010. X!                 else
  1011. X!                 mvprintw(county++,0,"Add magic #%d? (y or [n])",choice);
  1012. X!                 refresh();
  1013. X!                 if (getch()=='y') {
  1014. X!                     curntn->powers ^= powers[choice-1];
  1015. X!                     if (remove) removemgk(powers[choice-1]);
  1016. X!                     else exenewmgk(powers[choice-1]);
  1017. X!                 }
  1018. X!             } else {
  1019. X!                 if (remove) mvaddstr(county++,0," The nation doesn't have that power.");
  1020. X!                 else mvaddstr(county++,0," The nation already has that power.");
  1021. X              }
  1022. X          }
  1023. X+         mvaddstr(county++,0,"Do you wish to add or remove another power?");
  1024. X+         done=TRUE;
  1025. X+         refresh();
  1026. X+         if (getch()=='y') done=FALSE;
  1027. X      }
  1028. X  }
  1029. X  #endif OGOD
  1030. X*** onewlogin.c    Sat Aug 26 19:04:07 1989
  1031. X--- newlogin.c    Sat Aug 26 19:04:19 1989
  1032. X***************
  1033. X*** 26,32 ****
  1034. X  long Classpow[]= { 0x0L, 0x0L, 0x0L, SUMMON, RELIGION, SAILOR,
  1035. X      URBAN, 0x000000007L, DESTROYER, 0x00000700L, THE_VOID };
  1036. X  
  1037. X! char *Mprompt[]= { "<<--", "-->>" };
  1038. X  char *LType[]={ "Random", "Fair", "Great" };
  1039. X  
  1040. X  char *Mlabels[]= { "Population", "Treasury", "Location",
  1041. X--- 26,32 ----
  1042. X  long Classpow[]= { 0x0L, 0x0L, 0x0L, SUMMON, RELIGION, SAILOR,
  1043. X      URBAN, 0x000000007L, DESTROYER, 0x00000700L, THE_VOID };
  1044. X  
  1045. X! char *Mprompt[]= { "<ADD", "SUB>" };
  1046. X  char *LType[]={ "Random", "Fair", "Great" };
  1047. X  
  1048. X  char *Mlabels[]= { "Population", "Treasury", "Location",
  1049. X***************
  1050. X*** 194,202 ****
  1051. X  newerror(str)
  1052. X      char *str;
  1053. X  {
  1054. X!     mvaddstr(LINES-1,0,str);
  1055. X      clrtoeol();
  1056. X!     mvaddstr(LINES-1,COLS-13,"Hit Any Key");
  1057. X      beep();
  1058. X      refresh();
  1059. X      getch();
  1060. X--- 194,202 ----
  1061. X  newerror(str)
  1062. X      char *str;
  1063. X  {
  1064. X!     mvaddstr(LINES-1, 0, str);
  1065. X      clrtoeol();
  1066. X!     mvaddstr(LINES-1, COLS-16, "PRESS ANY KEY");
  1067. X      beep();
  1068. X      refresh();
  1069. X      getch();
  1070. X***************
  1071. X*** 283,289 ****
  1072. X      sprintf(tempc,"%ld jewels & metal",
  1073. X             spent[CH_RAWGOODS]*NLJEWELS);
  1074. X      mvprintw(line,0,"%38s",tempc);
  1075. X!     mvprintw(line,COLS/2+10,"%ld jewels & metal",NLJEWELS);
  1076. X  #else
  1077. X      sprintf(tempc,"%ld jewels",
  1078. X             spent[CH_RAWGOODS]*NLJEWELS);
  1079. X--- 283,289 ----
  1080. X      sprintf(tempc,"%ld jewels & metal",
  1081. X             spent[CH_RAWGOODS]*NLJEWELS);
  1082. X      mvprintw(line,0,"%38s",tempc);
  1083. X!     mvprintw(line,COLS/2+13,"%ld jewels & metal",NLJEWELS);
  1084. X  #else
  1085. X      sprintf(tempc,"%ld jewels",
  1086. X             spent[CH_RAWGOODS]*NLJEWELS);
  1087. X***************
  1088. X*** 292,298 ****
  1089. X      nsprintf(tempc,"%ld metal",
  1090. X              spent[CH_RAWGOODS]*NLMETAL);
  1091. X      mvprintw(line,0,"%38s",tempc);
  1092. X!     mvprintw(line,COLS/2+10,"%ld metals",NLMETAL);
  1093. X  #endif
  1094. X  }
  1095. X  
  1096. X--- 292,298 ----
  1097. X      nsprintf(tempc,"%ld metal",
  1098. X              spent[CH_RAWGOODS]*NLMETAL);
  1099. X      mvprintw(line,0,"%38s",tempc);
  1100. X!     mvprintw(line,COLS/2+13,"%ld metals",NLMETAL);
  1101. X  #endif
  1102. X  }
  1103. X  
  1104. X***************
  1105. X*** 457,463 ****
  1106. X          valid=FALSE;
  1107. X          while(valid==FALSE) {
  1108. X              valid=TRUE;
  1109. X!             mvprintw(2,0,"Enter the name of your country's leader (Ex. The_Ed, Gandalf, Conan)");
  1110. X              clrtoeol();
  1111. X              mvprintw(3,0,"    [maximum %d characters]: ",LEADERLTH);
  1112. X              refresh();
  1113. X--- 457,463 ----
  1114. X          valid=FALSE;
  1115. X          while(valid==FALSE) {
  1116. X              valid=TRUE;
  1117. X!             mvprintw(2,0,"Enter the name of your country's leader (Ex. The Ed, Gandalf, Conan)");
  1118. X              clrtoeol();
  1119. X              mvprintw(3,0,"    [maximum %d characters]: ",LEADERLTH);
  1120. X              refresh();
  1121. X***************
  1122. X*** 481,487 ****
  1123. X              case 'D':
  1124. X              case 'd':
  1125. X                  /*MINER POWER INATE TO DWARVES*/
  1126. X!                 newerror("Dwarves have MINING skills");
  1127. X                  mvprintw(3,0,"National Race: Dwarf");
  1128. X                  clrtoeol();
  1129. X                  curntn->powers=MINER;
  1130. X--- 481,487 ----
  1131. X              case 'D':
  1132. X              case 'd':
  1133. X                  /*MINER POWER INATE TO DWARVES*/
  1134. X!                 newmsg("Dwarves have MINING skills");
  1135. X                  mvprintw(3,0,"National Race: Dwarf");
  1136. X                  clrtoeol();
  1137. X                  curntn->powers=MINER;
  1138. X***************
  1139. X*** 502,508 ****
  1140. X                  break;
  1141. X              case 'E':
  1142. X              case 'e':
  1143. X!                 newerror("Elves are magically cloaked (VOID power)");
  1144. X                  mvprintw(3,0,"National Race: Elf");
  1145. X                  clrtoeol();
  1146. X                  curntn->powers=THE_VOID;
  1147. X--- 502,508 ----
  1148. X                  break;
  1149. X              case 'E':
  1150. X              case 'e':
  1151. X!                 newmsg("Elves are magically cloaked (VOID power)");
  1152. X                  mvprintw(3,0,"National Race: Elf");
  1153. X                  clrtoeol();
  1154. X                  curntn->powers=THE_VOID;
  1155. X***************
  1156. X*** 524,530 ****
  1157. X              case 'O':
  1158. X              case 'o':
  1159. X                  /*MINOR MONSTER POWER INATE TO ORCS*/
  1160. X!                 newerror("Your leader is a Monster!");
  1161. X                  mvprintw(3,0,"National Race: Orc");
  1162. X                  clrtoeol();
  1163. X                  curntn->powers=MI_MONST;
  1164. X--- 524,530 ----
  1165. X              case 'O':
  1166. X              case 'o':
  1167. X                  /*MINOR MONSTER POWER INATE TO ORCS*/
  1168. X!                 newmsg("Your leader is a Monster!");
  1169. X                  mvprintw(3,0,"National Race: Orc");
  1170. X                  clrtoeol();
  1171. X                  curntn->powers=MI_MONST;
  1172. X***************
  1173. X*** 546,552 ****
  1174. X              case 'H':
  1175. X              case 'h':
  1176. X                  curntn->race=HUMAN;
  1177. X!                 newerror("Humans have the combat skill of a WARRIOR");
  1178. X                  mvprintw(3,0,"National Race: Human");
  1179. X                  clrtoeol();
  1180. X                  curntn->powers = WARRIOR;
  1181. X--- 546,552 ----
  1182. X              case 'H':
  1183. X              case 'h':
  1184. X                  curntn->race=HUMAN;
  1185. X!                 newmsg("Humans have the combat skill of a WARRIOR");
  1186. X                  mvprintw(3,0,"National Race: Human");
  1187. X                  clrtoeol();
  1188. X                  curntn->powers = WARRIOR;
  1189. X***************
  1190. X*** 640,657 ****
  1191. X  
  1192. X          ypos = 6;
  1193. X          mvprintw(ypos,0,"  %-13s       %s", "ITEM", "CURRENTLY HAVE" );
  1194. X!         mvprintw(ypos++,COLS/2+5,"%4s %s", "COST", "AMOUNT" );
  1195. X          for(i=0; i<CH_NUMBER; i++) {
  1196. X              mvprintw(ypos,0,"%-15s", Mlabels[i]);
  1197. X              showitem(ypos,i);
  1198. X              if (i==CH_LOCATE) {
  1199. X!                 mvprintw(ypos,COLS/2+5,"%3d  %s", Mcost[i],
  1200. X                          "Better Location");
  1201. X              } else {
  1202. X                  if (curntn->race==ORC) {            
  1203. X                      switch(i) {
  1204. X                      case CH_MOVEMENT:
  1205. X!                         mvprintw(ypos++,COLS/2+5,"  -  --------");
  1206. X                          continue;
  1207. X                      case CH_REPRO:
  1208. X                          x = 2*Munits[i]*Mvalues[i];
  1209. X--- 640,657 ----
  1210. X  
  1211. X          ypos = 6;
  1212. X          mvprintw(ypos,0,"  %-13s       %s", "ITEM", "CURRENTLY HAVE" );
  1213. X!         mvprintw(ypos++,COLS/2+5,"%4s    %s", "COST", "AMOUNT" );
  1214. X          for(i=0; i<CH_NUMBER; i++) {
  1215. X              mvprintw(ypos,0,"%-15s", Mlabels[i]);
  1216. X              showitem(ypos,i);
  1217. X              if (i==CH_LOCATE) {
  1218. X!                 mvprintw(ypos,COLS/2+5,"%3d     %s", Mcost[i],
  1219. X                          "Better Location");
  1220. X              } else {
  1221. X                  if (curntn->race==ORC) {            
  1222. X                      switch(i) {
  1223. X                      case CH_MOVEMENT:
  1224. X!                         mvprintw(ypos++,COLS/2+5,"  -     --------");
  1225. X                          continue;
  1226. X                      case CH_REPRO:
  1227. X                          x = 2*Munits[i]*Mvalues[i];
  1228. X***************
  1229. X*** 664,673 ****
  1230. X                          x = Munits[i]*Mvalues[i];
  1231. X                          break;
  1232. X                      }
  1233. X!                     mvprintw(ypos,COLS/2+5,"%3d ", Mcost[i]);
  1234. X                      printw(" %ld %s", x, Mitems[i]);
  1235. X                  } else {
  1236. X!                     mvprintw(ypos,COLS/2+5,"%3d ", Mcost[i]);
  1237. X                      printw(" %ld %s", Munits[i]*Mvalues[i], Mitems[i]);
  1238. X                  }
  1239. X              }
  1240. X--- 664,673 ----
  1241. X                          x = Munits[i]*Mvalues[i];
  1242. X                          break;
  1243. X                      }
  1244. X!                     mvprintw(ypos,COLS/2+5,"%3d for",Mcost[i]);
  1245. X                      printw(" %ld %s", x, Mitems[i]);
  1246. X                  } else {
  1247. X!                     mvprintw(ypos,COLS/2+5,"%3d for",Mcost[i]);
  1248. X                      printw(" %ld %s", Munits[i]*Mvalues[i], Mitems[i]);
  1249. X                  }
  1250. X              }
  1251. X***************
  1252. X*** 682,688 ****
  1253. X          valid = FALSE;
  1254. X          clr = 1;
  1255. X          standout();
  1256. X!         mvaddstr(LINES-4,0,"  ESC: Exit  ?: Info  <,+,h: left  >,+,l: right  k: up  j: down  ' ': ADD/SUB");
  1257. X          standend();
  1258. X  
  1259. X          while(valid==FALSE) {
  1260. X--- 682,688 ----
  1261. X          valid = FALSE;
  1262. X          clr = 1;
  1263. X          standout();
  1264. X!         mvaddstr(LINES-4,2,"DONE=ESC  EXEC=SPACE  INFO=\"?\"  ADD=\"<+h\"  SUBtract=\">+l\"  UP=\"k\"  DOWN=\"j\"");
  1265. X          standend();
  1266. X  
  1267. X          while(valid==FALSE) {
  1268. X***************
  1269. X*** 1274,1282 ****
  1270. X      long x;
  1271. X  
  1272. X      /* determine number of leaders you want */
  1273. X!     if((tmp == C_TRADER) || (tmp <= C_WIZARD))
  1274. X!         spent[CH_LEADERS] = 5;
  1275. X!     else    spent[CH_LEADERS] = 7;
  1276. X  
  1277. X      /* assign the powers */
  1278. X      x=Classpow[tmp];
  1279. X--- 1274,1284 ----
  1280. X      long x;
  1281. X  
  1282. X      /* determine number of leaders you want */
  1283. X!     if((tmp == C_TRADER) || (tmp <= C_WIZARD)) {
  1284. X!         numleaders = spent[CH_LEADERS] = 5;
  1285. X!     } else {
  1286. X!         numleaders = spent[CH_LEADERS] = 7;
  1287. X!     }
  1288. X  
  1289. X      /* assign the powers */
  1290. X      x=Classpow[tmp];
  1291. X*** odisplay.c    Sat Aug 26 19:04:06 1989
  1292. X--- display.c    Sat Aug 26 19:04:19 1989
  1293. X***************
  1294. X*** 91,97 ****
  1295. X      mvaddstr(LINES-1,COLS-25,odmode!=NULL?"what display?:":"display?:");
  1296. X      standend();
  1297. X      refresh();
  1298. X!     redraw=TRUE;
  1299. X      switch(getch()) {
  1300. X      case '/':
  1301. X          if (odmode !=NULL)
  1302. X--- 91,97 ----
  1303. X      mvaddstr(LINES-1,COLS-25,odmode!=NULL?"what display?:":"display?:");
  1304. X      standend();
  1305. X      refresh();
  1306. X!     redraw=PART;
  1307. X      switch(getch()) {
  1308. X      case '/':
  1309. X          if (odmode !=NULL)
  1310. X***************
  1311. X*** 179,185 ****
  1312. X      default:
  1313. X      error:
  1314. X          beep();
  1315. X!         redraw=FALSE;
  1316. X      }
  1317. X  }
  1318. X  
  1319. X--- 179,185 ----
  1320. X      default:
  1321. X      error:
  1322. X          beep();
  1323. X!         redraw=DONE;
  1324. X      }
  1325. X  }
  1326. X  
  1327. X***************
  1328. X*** 412,422 ****
  1329. X      ||((ycurs>=SCREEN_Y_SIZE-1))||((XREAL)>=MAPX)
  1330. X       ||((YREAL)>=MAPY)) offmap();
  1331. X      
  1332. X!     if( redraw==TRUE) {
  1333. X!         clear();
  1334. X!         makemap();     /* update map */
  1335. X          makebottom();
  1336. X!         redraw=FALSE;
  1337. X      }
  1338. X      move(ycurs,2*xcurs);
  1339. X      makeside(FALSE);  /*update side*/
  1340. X--- 412,427 ----
  1341. X      ||((ycurs>=SCREEN_Y_SIZE-1))||((XREAL)>=MAPX)
  1342. X       ||((YREAL)>=MAPY)) offmap();
  1343. X      
  1344. X!     if(redraw!=DONE) {
  1345. X!         if (redraw==FULL) {
  1346. X!             clear();    /* clear real screen */
  1347. X!         } else {
  1348. X!             move(0,0);    /* clear curses screen but not real screen */
  1349. X!             clrtobot();
  1350. X!         }
  1351. X!         makemap();    /* update map */
  1352. X          makebottom();
  1353. X!         redraw=DONE;
  1354. X      }
  1355. X      move(ycurs,2*xcurs);
  1356. X      makeside(FALSE);  /*update side*/
  1357. X***************
  1358. X*** 461,468 ****
  1359. X  
  1360. X      for(nvynum=0;nvynum<MAXNAVY;nvynum++)
  1361. X      if((P_NMSHP!=0)||(P_NWSHP!=0)||(P_NGSHP!=0))
  1362. X!         for(i=(int)P_NXLOC-xoffset-NAVYSEE;i<=(int)P_NXLOC-xoffset+NAVYSEE;i++)
  1363. X!         for(j=(int)P_NYLOC-yoffset-NAVYSEE;j<=(int)P_NYLOC-yoffset+NAVYSEE;j++)
  1364. X              if(ONMAP(i+xoffset,j+yoffset) && i>=0 && j>=0
  1365. X              && i<SCREEN_X_SIZE && j<SCREEN_Y_SIZE)
  1366. X                  HAS_SEEN(i,j)=TRUE;
  1367. X--- 466,473 ----
  1368. X  
  1369. X      for(nvynum=0;nvynum<MAXNAVY;nvynum++)
  1370. X      if((P_NMSHP!=0)||(P_NWSHP!=0)||(P_NGSHP!=0))
  1371. X!         for(i=(int)P_NXLOC-xoffset-NAVYSEE;i!=1+(int)P_NXLOC-xoffset+NAVYSEE;i++)
  1372. X!         for(j=(int)P_NYLOC-yoffset-NAVYSEE;j!=1+(int)P_NYLOC-yoffset+NAVYSEE;j++)
  1373. X              if(ONMAP(i+xoffset,j+yoffset) && i>=0 && j>=0
  1374. X              && i<SCREEN_X_SIZE && j<SCREEN_Y_SIZE)
  1375. X                  HAS_SEEN(i,j)=TRUE;
  1376. X***************
  1377. X*** 469,476 ****
  1378. X  
  1379. X      for(armynum=0;armynum<MAXARM;armynum++)
  1380. X          if(P_ASOLD>0)
  1381. X!         for(i=(int)P_AXLOC-xoffset-ARMYSEE;i<=(int)P_AXLOC-xoffset+ARMYSEE;i++)
  1382. X!         for(j=(int)P_AYLOC-yoffset-ARMYSEE;j<=(int)P_AYLOC-yoffset+ARMYSEE;j++)
  1383. X          if(ONMAP(i+xoffset,j+yoffset) && i>=0 && j>=0
  1384. X          && i<SCREEN_X_SIZE && j<SCREEN_Y_SIZE)
  1385. X              HAS_SEEN(i,j)=TRUE;
  1386. X--- 474,481 ----
  1387. X  
  1388. X      for(armynum=0;armynum<MAXARM;armynum++)
  1389. X          if(P_ASOLD>0)
  1390. X!         for(i=(int)P_AXLOC-xoffset-ARMYSEE;i!=1+(int)P_AXLOC-xoffset+ARMYSEE;i++)
  1391. X!         for(j=(int)P_AYLOC-yoffset-ARMYSEE;j!=1+(int)P_AYLOC-yoffset+ARMYSEE;j++)
  1392. X          if(ONMAP(i+xoffset,j+yoffset) && i>=0 && j>=0
  1393. X          && i<SCREEN_X_SIZE && j<SCREEN_Y_SIZE)
  1394. X              HAS_SEEN(i,j)=TRUE;
  1395. X*** omain.c    Sat Aug 26 19:04:07 1989
  1396. X--- main.c    Sat Aug 26 19:04:19 1989
  1397. X***************
  1398. X*** 35,41 ****
  1399. X  /* current cursor postion (relative to 00 in upper corner) */
  1400. X  /*    position is 2*x,y*/
  1401. X  short    xcurs=0,ycurs=0;
  1402. X! short    redraw=TRUE;    /* if TRUE: redraw map        */
  1403. X  int    done=FALSE;    /* if TRUE: you are done    */
  1404. X  short    hilmode=HI_OWN;    /* hilight mode */
  1405. X  short    dismode=DI_DESI;/* display mode            */
  1406. X--- 35,41 ----
  1407. X  /* current cursor postion (relative to 00 in upper corner) */
  1408. X  /*    position is 2*x,y*/
  1409. X  short    xcurs=0,ycurs=0;
  1410. X! short    redraw=FULL;    /* if !DONE: redraw map        */
  1411. X  int    done=FALSE;    /* if TRUE: you are done    */
  1412. X  short    hilmode=HI_OWN;    /* hilight mode */
  1413. X  short    dismode=DI_DESI;/* display mode            */
  1414. X***************
  1415. X*** 69,75 ****
  1416. X  #ifdef SYSMAIL
  1417. X      extern char sysmail[];
  1418. X  #endif SYSMAIL
  1419. X!     int sflag=FALSE,pflag=FALSE,l;
  1420. X  
  1421. X      char defaultdir[BIGLTH],tmppass[PASSLTH+1];
  1422. X      char cq_opts[BIGLTH];
  1423. X--- 69,75 ----
  1424. X  #ifdef SYSMAIL
  1425. X      extern char sysmail[];
  1426. X  #endif SYSMAIL
  1427. X!     int sflag=FALSE,pflag=FALSE,l,in_ch,old_ch=' ';
  1428. X  
  1429. X      char defaultdir[BIGLTH],tmppass[PASSLTH+1];
  1430. X      char cq_opts[BIGLTH];
  1431. X***************
  1432. X*** 392,411 ****
  1433. X          xoffset=0;
  1434. X          ycurs=COLS/4;
  1435. X          yoffset=0;
  1436. X!         redraw=TRUE;
  1437. X          /* create gods lock file but do not limit access */
  1438. X          (void) aretheyon();
  1439. X      } else {
  1440. X          if(curntn->active==INACTIVE) {
  1441. X!             mvprintw(LINES-3,0,"Sorry, for some reason, your country no longer exists.");
  1442. X!             mvprintw(LINES-2,0,"If there is a problem, please contact %s.",
  1443. X!                 OWNER);
  1444. X!             mvprintw(LINES-1,0,"To re-enter this campaign please send mail to %s",
  1445. X!                 LOGIN);
  1446. X              if (strcmp(LOGIN, ntn[0].leader)!=0) {
  1447. X                  printw(" or %s",ntn[0].leader);
  1448. X              }
  1449. X              printw(".");
  1450. X              beep();
  1451. X              refresh();
  1452. X              getch();
  1453. X--- 392,410 ----
  1454. X          xoffset=0;
  1455. X          ycurs=COLS/4;
  1456. X          yoffset=0;
  1457. X!         redraw=FULL;
  1458. X          /* create gods lock file but do not limit access */
  1459. X          (void) aretheyon();
  1460. X      } else {
  1461. X          if(curntn->active==INACTIVE) {
  1462. X!             standout(); 
  1463. X!             mvprintw(LINES-2,0,"Sorry, for some reason, your country no longer exists.");
  1464. X!             mvprintw(LINES-1,0,"If there is a problem, please send mail to %s", LOGIN);
  1465. X              if (strcmp(LOGIN, ntn[0].leader)!=0) {
  1466. X                  printw(" or %s",ntn[0].leader);
  1467. X              }
  1468. X              printw(".");
  1469. X+             standend();
  1470. X              beep();
  1471. X              refresh();
  1472. X              getch();
  1473. X***************
  1474. X*** 469,481 ****
  1475. X          (void) strcpy(sysmail,getenv("MAIL"));
  1476. X      }
  1477. X  #endif SYSMAIL
  1478. X! 
  1479. X      getch();        /* get response from copyscreen */
  1480. X  
  1481. X      while(done==FALSE) {            /*main while routine*/
  1482. X          coffmap();     /* check if cursor is out of bounds*/
  1483. X          check_mail();    /* check for new mail */
  1484. X!         parse();    /* get commands, make moves and input command*/
  1485. X      }
  1486. X  
  1487. X      if(country==0) writedata();
  1488. X--- 468,487 ----
  1489. X          (void) strcpy(sysmail,getenv("MAIL"));
  1490. X      }
  1491. X  #endif SYSMAIL
  1492. X!     mvprintw(LINES-1, COLS-20, "PRESS ANY KEY");
  1493. X!     refresh();
  1494. X      getch();        /* get response from copyscreen */
  1495. X  
  1496. X      while(done==FALSE) {            /*main while routine*/
  1497. X          coffmap();     /* check if cursor is out of bounds*/
  1498. X          check_mail();    /* check for new mail */
  1499. X!         in_ch = getch();
  1500. X!         /* get commands */
  1501. X!         if (in_ch=='!') {
  1502. X!             parse(old_ch);
  1503. X!         } else {
  1504. X!             if (parse(in_ch)) old_ch=in_ch;
  1505. X!         }
  1506. X      }
  1507. X  
  1508. X      if(country==0) writedata();
  1509. X***************
  1510. X*** 532,541 ****
  1511. X  }
  1512. X  
  1513. X  /************************************************************************/
  1514. X! /*    PARSE() - do a command                        */
  1515. X  /************************************************************************/
  1516. X! void
  1517. X! parse()
  1518. X  {
  1519. X      char    name[LINELTH+1];
  1520. X      char    passwd[PASSLTH+1];
  1521. X--- 538,549 ----
  1522. X  }
  1523. X  
  1524. X  /************************************************************************/
  1525. X! /*    PARSE() - interpret entered character                */
  1526. X! /*      return TRUE if command is repeatable FALSE otherwise        */
  1527. X  /************************************************************************/
  1528. X! int
  1529. X! parse(ch)
  1530. X!     int ch;
  1531. X  {
  1532. X      char    name[LINELTH+1];
  1533. X      char    passwd[PASSLTH+1];
  1534. X***************
  1535. X*** 545,558 ****
  1536. X  #endif /* DEBUG */
  1537. X      int    ocountry;
  1538. X  
  1539. X!     switch(getch()) {
  1540. X      case EXT_CMD:    /* extended command */
  1541. X          ext_cmd( -1 );
  1542. X          curntn->tgold -= MOVECOST;
  1543. X          break;
  1544. X      case ' ':    /* redraw the screen */
  1545. X          whatcansee();    /* what can they see */
  1546. X!         redraw=TRUE;
  1547. X          break;
  1548. X  #ifdef DEBUG
  1549. X      case '\t':    /* debugging information for god and demi-god */
  1550. X--- 553,569 ----
  1551. X  #endif /* DEBUG */
  1552. X      int    ocountry;
  1553. X  
  1554. X!     switch(ch) {
  1555. X      case EXT_CMD:    /* extended command */
  1556. X          ext_cmd( -1 );
  1557. X          curntn->tgold -= MOVECOST;
  1558. X+         return(TRUE);
  1559. X          break;
  1560. X      case ' ':    /* redraw the screen */
  1561. X          whatcansee();    /* what can they see */
  1562. X!         centermap();
  1563. X!         clear();
  1564. X!         redraw=FULL;
  1565. X          break;
  1566. X  #ifdef DEBUG
  1567. X      case '\t':    /* debugging information for god and demi-god */
  1568. X***************
  1569. X*** 563,569 ****
  1570. X          break;
  1571. X  #endif /* DEBUG */
  1572. X      case 'a':    /*army report*/
  1573. X!         redraw=TRUE;
  1574. X          armyrpt(0);
  1575. X          curntn->tgold -= MOVECOST;
  1576. X          break;
  1577. X--- 574,580 ----
  1578. X          break;
  1579. X  #endif /* DEBUG */
  1580. X      case 'a':    /*army report*/
  1581. X!         redraw=PART;
  1582. X          armyrpt(0);
  1583. X          curntn->tgold -= MOVECOST;
  1584. X          break;
  1585. X***************
  1586. X*** 575,586 ****
  1587. X          ycurs++;
  1588. X          break;
  1589. X      case 'B':    /*budget*/
  1590. X!         redraw=TRUE;
  1591. X          budget();
  1592. X          curntn->tgold -= MOVECOST;
  1593. X          break;
  1594. X      case 'c':    /*change nation stats*/
  1595. X!         redraw=TRUE;
  1596. X          change();
  1597. X          curntn->tgold -= MOVECOST;
  1598. X          break;
  1599. X--- 586,597 ----
  1600. X          ycurs++;
  1601. X          break;
  1602. X      case 'B':    /*budget*/
  1603. X!         redraw=FULL;
  1604. X          budget();
  1605. X          curntn->tgold -= MOVECOST;
  1606. X          break;
  1607. X      case 'c':    /*change nation stats*/
  1608. X!         redraw=FULL;
  1609. X          change();
  1610. X          curntn->tgold -= MOVECOST;
  1611. X          break;
  1612. X***************
  1613. X*** 597,605 ****
  1614. X          draft();
  1615. X          curntn->tgold -= MOVECOST;
  1616. X          makebottom();
  1617. X          break;
  1618. X      case 'f': /*report on ships and load/unload*/
  1619. X!         redraw=TRUE;
  1620. X          curntn->tgold -= MOVECOST;
  1621. X          fleetrpt();
  1622. X          break;
  1623. X--- 608,617 ----
  1624. X          draft();
  1625. X          curntn->tgold -= MOVECOST;
  1626. X          makebottom();
  1627. X+         return(TRUE);
  1628. X          break;
  1629. X      case 'f': /*report on ships and load/unload*/
  1630. X!         redraw=PART;
  1631. X          curntn->tgold -= MOVECOST;
  1632. X          fleetrpt();
  1633. X          break;
  1634. X***************
  1635. X*** 607,613 ****
  1636. X          navygoto();
  1637. X          break;
  1638. X      case 'g':    /*group report*/
  1639. X!         redraw=TRUE;
  1640. X          curntn->tgold -= MOVECOST;
  1641. X          armyrpt(1);
  1642. X          break;
  1643. X--- 619,625 ----
  1644. X          navygoto();
  1645. X          break;
  1646. X      case 'g':    /*group report*/
  1647. X!         redraw=PART;
  1648. X          curntn->tgold -= MOVECOST;
  1649. X          armyrpt(1);
  1650. X          break;
  1651. X***************
  1652. X*** 627,633 ****
  1653. X          break;
  1654. X      case 'I':    /*campaign information*/
  1655. X          camp_info();
  1656. X!         redraw=TRUE;
  1657. X          break;
  1658. X      case 'J':    /*scroll down*/
  1659. X          pager=0;
  1660. X--- 639,645 ----
  1661. X          break;
  1662. X      case 'I':    /*campaign information*/
  1663. X          camp_info();
  1664. X!         redraw=FULL;
  1665. X          break;
  1666. X      case 'J':    /*scroll down*/
  1667. X          pager=0;
  1668. X***************
  1669. X*** 665,680 ****
  1670. X      case 'm':    /*move selected item to new x,y */
  1671. X          mymove();
  1672. X          curntn->tgold -= MOVECOST;
  1673. X!         makebottom();
  1674. X!         prep(country,FALSE,TRUE);
  1675. X!         if (hilmode == HI_ARMY || hilmode == HI_YARM) {
  1676. X!             redraw = TRUE;
  1677. X!         }
  1678. X!         pager=0;
  1679. X!         selector=0;
  1680. X          break;
  1681. X      case 'M':    /*magic*/
  1682. X!         redraw=TRUE;
  1683. X          curntn->tgold -= MOVECOST;
  1684. X          domagic();
  1685. X          break;
  1686. X--- 677,686 ----
  1687. X      case 'm':    /*move selected item to new x,y */
  1688. X          mymove();
  1689. X          curntn->tgold -= MOVECOST;
  1690. X!         return(TRUE);
  1691. X          break;
  1692. X      case 'M':    /*magic*/
  1693. X!         redraw=FULL;
  1694. X          curntn->tgold -= MOVECOST;
  1695. X          domagic();
  1696. X          break;
  1697. X***************
  1698. X*** 686,692 ****
  1699. X          xcurs++;
  1700. X          break;
  1701. X      case 'N':    /*read newspaper */
  1702. X!         redraw=TRUE;
  1703. X          curntn->tgold -= MOVECOST;
  1704. X          newspaper();
  1705. X          break;
  1706. X--- 692,698 ----
  1707. X          xcurs++;
  1708. X          break;
  1709. X      case 'N':    /*read newspaper */
  1710. X!         redraw=PART;
  1711. X          curntn->tgold -= MOVECOST;
  1712. X          newspaper();
  1713. X          break;
  1714. X***************
  1715. X*** 715,721 ****
  1716. X          }
  1717. X          break;
  1718. X      case 'P':    /*production*/
  1719. X!         redraw=TRUE;
  1720. X          curntn->tgold -= MOVECOST;
  1721. X          produce();
  1722. X          break;
  1723. X--- 721,727 ----
  1724. X          }
  1725. X          break;
  1726. X      case 'P':    /*production*/
  1727. X!         redraw=FULL;
  1728. X          curntn->tgold -= MOVECOST;
  1729. X          produce();
  1730. X          break;
  1731. X***************
  1732. X*** 731,743 ****
  1733. X          break;
  1734. X          /*list*/
  1735. X      case 'R':    /*Read Messages*/
  1736. X!         redraw=TRUE;
  1737. X          curntn->tgold -= MOVECOST;
  1738. X          rmessage();
  1739. X          refresh();
  1740. X          break;
  1741. X      case 's':    /*score*/
  1742. X!         redraw=TRUE;
  1743. X          curntn->tgold -= MOVECOST;
  1744. X          showscore();
  1745. X          break;
  1746. X--- 737,749 ----
  1747. X          break;
  1748. X          /*list*/
  1749. X      case 'R':    /*Read Messages*/
  1750. X!         redraw=PART;
  1751. X          curntn->tgold -= MOVECOST;
  1752. X          rmessage();
  1753. X          refresh();
  1754. X          break;
  1755. X      case 's':    /*score*/
  1756. X!         redraw=FULL;
  1757. X          curntn->tgold -= MOVECOST;
  1758. X          showscore();
  1759. X          break;
  1760. X***************
  1761. X*** 744,750 ****
  1762. X      case 'S':    /*diplomacy screens*/
  1763. X          diploscrn();
  1764. X          curntn->tgold -= MOVECOST;
  1765. X!         redraw=TRUE;
  1766. X          break;
  1767. X      case 't':    /*fleet loading*/
  1768. X          loadfleet();
  1769. X--- 750,756 ----
  1770. X      case 'S':    /*diplomacy screens*/
  1771. X          diploscrn();
  1772. X          curntn->tgold -= MOVECOST;
  1773. X!         redraw=FULL;
  1774. X          break;
  1775. X      case 't':    /*fleet loading*/
  1776. X          loadfleet();
  1777. X***************
  1778. X*** 751,762 ****
  1779. X          curntn->tgold -= MOVECOST;
  1780. X          makeside(FALSE);
  1781. X          makebottom();
  1782. X          break;
  1783. X  #ifdef TRADE
  1784. X      case 'T':    /*go to commerce section*/
  1785. X          trade();
  1786. X          curntn->tgold -= MOVECOST;
  1787. X!         redraw=TRUE;
  1788. X          break;
  1789. X  #endif TRADE
  1790. X      case '9':
  1791. X--- 757,769 ----
  1792. X          curntn->tgold -= MOVECOST;
  1793. X          makeside(FALSE);
  1794. X          makebottom();
  1795. X+         return(TRUE);
  1796. X          break;
  1797. X  #ifdef TRADE
  1798. X      case 'T':    /*go to commerce section*/
  1799. X          trade();
  1800. X          curntn->tgold -= MOVECOST;
  1801. X!         redraw=FULL;
  1802. X          break;
  1803. X  #endif TRADE
  1804. X      case '9':
  1805. X***************
  1806. X*** 774,787 ****
  1807. X          break;
  1808. X          case 'v':    /* version credits */
  1809. X          credits();
  1810. X!         redraw=TRUE;
  1811. X          break;
  1812. X      case 'w':    /* spell casting */
  1813. X          wizardry();
  1814. X          curntn->tgold -= MOVECOST;
  1815. X          break;
  1816. X      case 'W':    /*message*/
  1817. X!         redraw=TRUE;
  1818. X          curntn->tgold -= MOVECOST;
  1819. X          wmessage();
  1820. X          break;
  1821. X--- 781,795 ----
  1822. X          break;
  1823. X          case 'v':    /* version credits */
  1824. X          credits();
  1825. X!         redraw=FULL;
  1826. X          break;
  1827. X      case 'w':    /* spell casting */
  1828. X          wizardry();
  1829. X          curntn->tgold -= MOVECOST;
  1830. X+         return(TRUE);
  1831. X          break;
  1832. X      case 'W':    /*message*/
  1833. X!         redraw=FULL;
  1834. X          curntn->tgold -= MOVECOST;
  1835. X          wmessage();
  1836. X          break;
  1837. X***************
  1838. X*** 808,814 ****
  1839. X              ((pwent=getpwnam(ntn[0].leader))==NULL || owneruid != pwent->pw_uid )) break;
  1840. X  #endif
  1841. X          clear();
  1842. X!         redraw=TRUE;
  1843. X          if(country != 0) {
  1844. X          fprintf(fexe,"L_NGOLD\t%d \t%d \t%ld \t0 \t0 \t%s\n",
  1845. X              XNAGOLD ,country,curntn->tgold,"null");
  1846. X--- 816,822 ----
  1847. X              ((pwent=getpwnam(ntn[0].leader))==NULL || owneruid != pwent->pw_uid )) break;
  1848. X  #endif
  1849. X          clear();
  1850. X!         redraw=PART;
  1851. X          if(country != 0) {
  1852. X          fprintf(fexe,"L_NGOLD\t%d \t%d \t%ld \t0 \t0 \t%s\n",
  1853. X              XNAGOLD ,country,curntn->tgold,"null");
  1854. X***************
  1855. X*** 862,867 ****
  1856. X--- 870,876 ----
  1857. X  
  1858. X          fclose(fexe);
  1859. X          /* open output for future printing*/
  1860. X+         sprintf(fison,"%s%d",isonfile,country);
  1861. X           sprintf(name,"%s%d",exefile,country);
  1862. X           if ((fexe=fopen(name,"a"))==NULL) {
  1863. X              beep();
  1864. X***************
  1865. X*** 898,912 ****
  1866. X              }
  1867. X          }
  1868. X          whatcansee();
  1869. X!         redraw=TRUE;
  1870. X          break;
  1871. X      case '?':    /*display help screen*/
  1872. X!         redraw=TRUE;
  1873. X          help();
  1874. X          break;
  1875. X      default:
  1876. X          beep();
  1877. X      }
  1878. X  }
  1879. X  
  1880. X  #ifdef DEBUG
  1881. X--- 907,925 ----
  1882. X              }
  1883. X          }
  1884. X          whatcansee();
  1885. X!         redraw=PART;
  1886. X          break;
  1887. X      case '?':    /*display help screen*/
  1888. X!         redraw=PART;
  1889. X          help();
  1890. X          break;
  1891. X+     case ' ': /*ignore, and don't beep*/
  1892. X+         break;
  1893. X      default:
  1894. X          beep();
  1895. X+         break;
  1896. X      }
  1897. X+     return(FALSE);
  1898. X  }
  1899. X  
  1900. X  #ifdef DEBUG
  1901. X***************
  1902. X*** 1287,1293 ****
  1903. X          fclose(timefp);
  1904. X      }
  1905. X  #endif /* TIMELOG */
  1906. X!     mvprintw(LINES-1, COLS-20, "PRESS ANY KEY");
  1907. X      refresh();
  1908. X  }
  1909. X  
  1910. X--- 1300,1306 ----
  1911. X          fclose(timefp);
  1912. X      }
  1913. X  #endif /* TIMELOG */
  1914. X!     mvprintw(LINES-1, COLS-20, "PLEASE WAIT");
  1915. X      refresh();
  1916. X  }
  1917. X  
  1918. X*** onpc.c    Sat Aug 26 19:04:07 1989
  1919. X--- npc.c    Sat Aug 26 19:04:24 1989
  1920. X***************
  1921. X*** 21,27 ****
  1922. X--- 21,65 ----
  1923. X  extern    int **attr;         /*sector attactiveness*/
  1924. X  extern    int    dissarray;    /* has nation lost its leader */
  1925. X  int    peace;    /*is 8 if at peace, 12 if at war*/
  1926. X+ static    int    Avg_food;
  1927. X+ static    int    Avg_soldiers[NTOTAL];
  1928. X+ static    int Avg_tradegood;
  1929. X  
  1930. X+ /* macros that indicate what the country can see */
  1931. X+ #ifdef    NPC_SEE_SECTORS
  1932. X+ #define        SEE_SECTOR(x,y,country)            TRUE
  1933. X+ #else    NPC_SEE_SECTORS
  1934. X+ #define     SEE_SECTOR(x,y,country) \
  1935. X+                 ( (magic(sct[x][y].owner,THE_VOID)!=TRUE) \
  1936. X+                   || (magic(country,NINJA)==TRUE) )
  1937. X+ #endif    NPC_SEE_SECTORS
  1938. X+ 
  1939. X+ #ifdef    NPC_SEE_CITIES
  1940. X+ #define        SEE_CITIES(city_nation,country)        TRUE
  1941. X+ #else    NPC_SEE_CITIES
  1942. X+ #define     SEE_CITIES(city_nation,country) \
  1943. X+                 ( (magic(city_nation,THE_VOID)!=TRUE) \
  1944. X+                   || (magic(country,NINJA)==TRUE) )
  1945. X+ #endif    NPC_SEE_CITIES
  1946. X+ 
  1947. X+ #ifdef    NPC_COUNT_ARMIES
  1948. X+ #define        COUNT_ARMIES(army_nation,country)    TRUE
  1949. X+ #else    NPC_COUNT_ARMIES
  1950. X+ #define     COUNT_ARMIES(army_nation,country) \
  1951. X+                 ( ( (magic(army_nation,THE_VOID)!=TRUE) \
  1952. X+                     && (magic(army_nation,HIDDEN)!=TRUE) \
  1953. X+                    ) || (magic(country,NINJA)==TRUE) )
  1954. X+ #endif    NPC_COUNT_ARMIES
  1955. X+ 
  1956. X+ /* When a sector cannot be seen by an npc nation because of
  1957. X+  * THE_VOID, a value must still be given to the
  1958. X+  * sector, because there MIGHT be something there.
  1959. SHAR_EOF
  1960. echo "End of part 2"
  1961. echo "File patchV4.5 is continued in part 3"
  1962. echo "3" > s2_seq_.tmp
  1963. exit 0
  1964.