home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / games / volume7 / nethack3 / patch8g / patch8.06
Text File  |  1990-06-08  |  51KB  |  2,119 lines

  1. *** src/Old/pager.c    Sun Jun  3 14:01:35 1990
  2. --- src/pager.c    Thu May 31 22:11:29 1990
  3. ***************
  4. *** 26,40 ****
  5.   #define SEEK_SET 0
  6.   #endif
  7.   
  8.   #ifndef OVLB
  9. ! OSTATIC char hc;
  10.   #else /* OVLB */
  11. ! XSTATIC char hc = 0;
  12. ! #endif /* OVLB */
  13.   
  14.   static void FDECL(page_more, (FILE *,int));
  15. ! OSTATIC boolean FDECL(clear_help, (CHAR_P));
  16. ! OSTATIC boolean FDECL(valid_help, (CHAR_P));
  17.   static boolean FDECL(pmatch,(const char *,const char *));
  18.   static boolean FDECL(outspec,(const char *,int));
  19.   static const char *FDECL(lookat,(int,int,UCHAR_P));
  20. --- 26,41 ----
  21.   #define SEEK_SET 0
  22.   #endif
  23.   
  24. + STATIC_DCL boolean FDECL(clear_help, (CHAR_P));
  25. + STATIC_DCL boolean FDECL(valid_help, (CHAR_P));
  26.   #ifndef OVLB
  27. ! STATIC_DCL char hc;
  28.   #else /* OVLB */
  29. ! STATIC_OVL char NEARDATA hc = 0;
  30.   
  31.   static void FDECL(page_more, (FILE *,int));
  32. ! static boolean FDECL(is_swallow_sym, (UCHAR_P));
  33.   static boolean FDECL(pmatch,(const char *,const char *));
  34.   static boolean FDECL(outspec,(const char *,int));
  35.   static const char *FDECL(lookat,(int,int,UCHAR_P));
  36. ***************
  37. *** 43,50 ****
  38.   #endif
  39.   static void NDECL(help_menu);
  40.   
  41. - #ifdef OVLB
  42.   /*
  43.    * simple pattern matcher: '*' matches 0 or more characters
  44.    * returns TRUE if strng matches patrn
  45. --- 44,49 ----
  46. ***************
  47. *** 74,79 ****
  48. --- 73,89 ----
  49.   }
  50.   
  51.   /*
  52. +  * returns "true" for characters that could represent a monster's stomach
  53. +  */
  54. + static boolean
  55. + is_swallow_sym(c)
  56. + uchar c;
  57. + {
  58. +     return (index(" /-\\|", (char)c) != 0);
  59. + }
  60. + /*
  61.    * print out another possibility for dowhatis. "new" is the possible new
  62.    * string; "out_flag" indicates whether we really want output, and if
  63.    * so what kind of output: 0 == no output, 1 == "(or %s)" output. 
  64. ***************
  65. *** 85,91 ****
  66.   const char *new;
  67.   int out_flag;
  68.   {
  69. !     static char old[50];
  70.   
  71.       if (!strcmp(old, new))
  72.           return FALSE;        /* don't print the same thing twice */
  73. --- 95,101 ----
  74.   const char *new;
  75.   int out_flag;
  76.   {
  77. !     static char NEARDATA old[50];
  78.   
  79.       if (!strcmp(old, new))
  80.           return FALSE;        /* don't print the same thing twice */
  81. ***************
  82. *** 110,116 ****
  83.       register struct monst *mtmp;
  84.       register struct obj *otmp;
  85.       struct trap *trap;
  86. !     static char answer[50];
  87.       register char *s, *t;
  88.       uchar typ;
  89.   
  90. --- 120,126 ----
  91.       register struct monst *mtmp;
  92.       register struct obj *otmp;
  93.       struct trap *trap;
  94. !     static char NEARDATA answer[50];
  95.       register char *s, *t;
  96.       uchar typ;
  97.   
  98. ***************
  99. *** 133,138 ****
  100. --- 143,150 ----
  101.               u.mtimedone ? mons[u.umonnum].mname :
  102.   #endif
  103.               pl_character, plname);
  104. +     } else if (u.uswallow && is_swallow_sym(ch)) {
  105. +         Sprintf(answer, "interior of %s", defmonnam(u.ustuck));
  106.       } else if (mtmp && !mtmp->mimic)
  107.           Sprintf(answer, "%s%s",
  108.              mtmp->mtame ? "tame " :
  109. ***************
  110. *** 152,158 ****
  111.               if (mtmp->mappearance == STRANGE_OBJECT)
  112.                   Strcpy(answer, "strange object");
  113.               else {
  114. !                 otmp = mksobj((int) mtmp->mappearance,FALSE );
  115.                   Strcpy(answer, distant_name(otmp, xname));
  116.                   free((genericptr_t) otmp);
  117.               }
  118. --- 164,175 ----
  119.               if (mtmp->mappearance == STRANGE_OBJECT)
  120.                   Strcpy(answer, "strange object");
  121.               else {
  122. !                 int oindx = mtmp->mappearance;
  123. !                 otmp = mksobj(oindx,FALSE );
  124. !                 if(oindx == STATUE || oindx == FIGURINE)
  125. !                     otmp->corpsenm = PM_KOBOLD;
  126. !                 else if (oindx == DRAGON_SCALE_MAIL)
  127. !                     otmp->corpsenm = PM_RED_DRAGON;
  128.                   Strcpy(answer, distant_name(otmp, xname));
  129.                   free((genericptr_t) otmp);
  130.               }
  131. ***************
  132. *** 263,268 ****
  133. --- 280,286 ----
  134.       boolean oldverb = flags.verbose;
  135.       boolean found_in_file = FALSE, need_to_print = FALSE;
  136.       int    found = 0;
  137. +     static const char *mon_interior = "the interior of a monster";
  138.   
  139.   #ifdef OS2_CODEVIEW
  140.       char tmp[PATHLEN];
  141. ***************
  142. *** 321,329 ****
  143.                   return 0;
  144.           }
  145.           flags.verbose = FALSE;
  146. !         q = levl[cc.x][cc.y].scrsym;
  147. !         if (!q || (!levl[cc.x][cc.y].seen && !MON_AT(cc.x,cc.y)))
  148. !             q = ' ';
  149.       }
  150.   
  151.       if (!q)
  152. --- 339,365 ----
  153.                   return 0;
  154.           }
  155.           flags.verbose = FALSE;
  156. !         if (!u.uswallow) {
  157. !             q = levl[cc.x][cc.y].scrsym;
  158. !             if (!q || (!levl[cc.x][cc.y].seen && !MON_AT(cc.x,cc.y)))
  159. !                 q = ' ';
  160. !         }
  161. !         else if (cc.x == u.ux && cc.y == u.uy)
  162. !             q = u.usym;
  163. !         else {
  164. !             i = (u.uy - cc.y)+1;
  165. !             if (i < 0 || i > 2)
  166. !                 q = ' ';
  167. !             else {
  168. !                 firstmatch = (i == 0) ? "/-\\" :
  169. !                     (i == 1) ? "| |" : "\\-/";
  170. !                 i = (u.ux - cc.x)+1;
  171. !                 if (i < 0 || i > 2)
  172. !                     q = ' ';
  173. !                 else
  174. !                     q = firstmatch[i];
  175. !             }
  176. !         }
  177.       }
  178.   
  179.       if (!q)
  180. ***************
  181. *** 337,343 ****
  182.   /*
  183.    * if the user just typed one letter, or we're identifying from the
  184.    * screen, then we have to check all the possibilities and print them
  185. !  * out for him/her
  186.    */
  187.   
  188.   /* Check for monsters */
  189. --- 373,379 ----
  190.   /*
  191.    * if the user just typed one letter, or we're identifying from the
  192.    * screen, then we have to check all the possibilities and print them
  193. !  * out for him/her.
  194.    */
  195.   
  196.   /* Check for monsters */
  197. ***************
  198. *** 351,356 ****
  199. --- 387,406 ----
  200.           }
  201.       }
  202.   
  203. + /* Special case: if identifying from the screen, and
  204. +  * we're swallowed, and looking at something other than our own symbol,
  205. +  * then just say "the interior of a monster".
  206. +  */
  207. +     if (u.uswallow && is_swallow_sym(q)) {
  208. +         if (!found) {
  209. +             pline("%c       %s", q, mon_interior);
  210. +             (void)outspec(firstmatch=mon_interior, 0);
  211. +         }
  212. +         else
  213. +             (void)outspec(mon_interior, 1);
  214. +         found++; need_to_print = TRUE;
  215. +     }
  216.   /* Now check for objects */
  217.       for (i = 0; objsyms[i]; i++) {
  218.           if (q == objsyms[i]) {
  219. ***************
  220. *** 402,407 ****
  221. --- 452,459 ----
  222.   
  223.   checkfile:
  224.   
  225. +     if (!strncmp(inp, "interior of ", 12))
  226. +         inp += 12;
  227.       if (!strncmp(inp, "a ", 2))
  228.           inp += 2;
  229.       else if (!strncmp(inp, "an ", 3))
  230. ***************
  231. *** 415,434 ****
  232.       if (!strncmp(inp, "invisible ", 10))
  233.           inp += 10;
  234.   
  235. !     if ((!q || found) && *inp) {
  236.   /* adjust the input to remove "named " and convert to lower case */
  237.            for (ep = inp; *ep; ) {
  238.               if ((!strncmp(ep, " named ", 7) && (alt = ep + 7)) ||
  239.                   !strncmp(ep, " called ", 8))
  240.                   *ep = 0;
  241. !             else
  242. !                 (*ep = tolower(*ep)), ep++;
  243.           }
  244.   
  245.   /*
  246.    * If the object is named, then the name is the alternate search string;
  247.    * otherwise, the result of makesingular() applied to the name is. This
  248. !  * isn't strictly optimal, but named objects of interest to the user should
  249.    * will usually be found under their name, rather than under their
  250.    * object type, so looking for a singular form is pointless.
  251.    */
  252. --- 467,495 ----
  253.       if (!strncmp(inp, "invisible ", 10))
  254.           inp += 10;
  255.   
  256. ! /*
  257. !  * look in the file for more info if:
  258. !  * the user typed in the whole name (!q)
  259. !  * OR we've found a possible match with the character q (found) and
  260. !  *    flags.help is TRUE
  261. !  * and, of course, the name to look for must be non-empty.
  262. !  */
  263. !     if ((!q || (found && flags.help)) && *inp) {
  264.   /* adjust the input to remove "named " and convert to lower case */
  265.            for (ep = inp; *ep; ) {
  266.               if ((!strncmp(ep, " named ", 7) && (alt = ep + 7)) ||
  267.                   !strncmp(ep, " called ", 8))
  268.                   *ep = 0;
  269. !             else {
  270. !                 if(isupper(*ep)) *ep = tolower(*ep);
  271. !                 ep++;
  272. !             }
  273.           }
  274.   
  275.   /*
  276.    * If the object is named, then the name is the alternate search string;
  277.    * otherwise, the result of makesingular() applied to the name is. This
  278. !  * isn't strictly optimal, but named objects of interest to the user
  279.    * will usually be found under their name, rather than under their
  280.    * object type, so looking for a singular form is pointless.
  281.    */
  282. ***************
  283. *** 436,442 ****
  284.           if (!alt)
  285.               alt = makesingular(inp);
  286.           else
  287. !             for (ep = alt; *ep; ep++) *ep = tolower(*ep);
  288.   
  289.           while(fgets(buf,BUFSZ,fp)) {
  290.               if(*buf != '\t') {
  291. --- 497,504 ----
  292.           if (!alt)
  293.               alt = makesingular(inp);
  294.           else
  295. !             for (ep = alt; *ep; ep++) 
  296. !                 if(isupper(*ep)) *ep = tolower(*ep);
  297.   
  298.           while(fgets(buf,BUFSZ,fp)) {
  299.               if(*buf != '\t') {
  300. ***************
  301. *** 555,561 ****
  302.   }
  303.   
  304.   /* make the paging of a file interruptible */
  305. ! static int got_intrup;
  306.   
  307.   #if !defined(MSDOS) && !defined(TOS) && !defined(MACOS)
  308.   static int
  309. --- 617,623 ----
  310.   }
  311.   
  312.   /* make the paging of a file interruptible */
  313. ! static volatile int NEARDATA got_intrup;
  314.   
  315.   #if !defined(MSDOS) && !defined(TOS) && !defined(MACOS)
  316.   static int
  317. ***************
  318. *** 572,584 ****
  319.   FILE *fp;
  320.   int strip;    /* nr of chars to be stripped from each line (0 or 1) */
  321.   {
  322. -     register char *bufr;
  323. - #if !defined(MSDOS) && !defined(MINIMAL_TERM)
  324. -     register char *ep;
  325. - #endif
  326. - #if !defined(MSDOS) && !defined(TOS) && !defined(MACOS)
  327. -     int (*prevsig)() = (int (*)())signal(SIGINT, (SIG_RET_TYPE) intruph);
  328. - #endif
  329.   #ifdef MACOS
  330.       short tmpflags;
  331.       
  332. --- 634,639 ----
  333. ***************
  334. *** 590,595 ****
  335. --- 645,657 ----
  336.       }
  337.       macflags |= (tmpflags & fDoUpdate);
  338.   #else
  339. +     register char *bufr;
  340. + #if !defined(MSDOS) && !defined(MINIMAL_TERM)
  341. +     register char *ep;
  342. + #endif
  343. + #if !defined(MSDOS) && !defined(TOS)
  344. +     int (*prevsig)() = (int (*)())signal(SIGINT, (SIG_RET_TYPE) intruph);
  345. + #endif
  346.   #if defined(MSDOS) || defined(MINIMAL_TERM)
  347.       /* There seems to be a bug in ANSI.SYS  The first tab character
  348.        * after a clear screen sequence is not expanded correctly.  Thus
  349. ***************
  350. *** 603,608 ****
  351. --- 665,672 ----
  352.       while (fgets(buf, BUFSIZ, fp) && (!strip || *buf == '\t')){
  353.           bufp = buf;
  354.           bufrp = bufr;
  355. +         if (strip && *bufp && *bufp != '\n')
  356. +             *bufrp++ = *bufp++;
  357.           while (*bufp && *bufp != '\n') {
  358.               if (*bufp == '\t') {
  359.                   spaces = tabstop - (bufrp - bufr) % tabstop;
  360. ***************
  361. *** 631,641 ****
  362.   ret:
  363.       free((genericptr_t) bufr);
  364.       (void) fclose(fp);
  365. ! #if !defined(MSDOS) && !defined(TOS) && !defined(MACOS)
  366.       (void) signal(SIGINT, (SIG_RET_TYPE) prevsig);
  367.       got_intrup = 0;
  368.   #endif
  369. ! #endif
  370.   }
  371.   
  372.   #endif /* OVLB */
  373. --- 695,705 ----
  374.   ret:
  375.       free((genericptr_t) bufr);
  376.       (void) fclose(fp);
  377. ! #if !defined(MSDOS) && !defined(TOS)
  378.       (void) signal(SIGINT, (SIG_RET_TYPE) prevsig);
  379.       got_intrup = 0;
  380.   #endif
  381. ! #endif /* MACOS */
  382.   }
  383.   
  384.   #endif /* OVLB */
  385. ***************
  386. *** 644,654 ****
  387.   
  388.   #ifndef OVLB
  389.   
  390. ! OSTATIC boolean whole_screen;
  391.   
  392.   #else /* OVLB */
  393.   
  394. ! XSTATIC boolean whole_screen = TRUE;
  395.   
  396.   void
  397.   set_whole_screen() {    /* called in termcap as soon as LI is known */
  398. --- 708,718 ----
  399.   
  400.   #ifndef OVLB
  401.   
  402. ! STATIC_DCL boolean whole_screen;
  403.   
  404.   #else /* OVLB */
  405.   
  406. ! STATIC_OVL boolean NEARDATA whole_screen = TRUE;
  407.   
  408.   void
  409.   set_whole_screen() {    /* called in termcap as soon as LI is known */
  410. ***************
  411. *** 674,680 ****
  412.   #ifdef LINT    /* lint may handle static decl poorly -- static boolean so; */
  413.       boolean so;
  414.   #else
  415. !     static boolean so;
  416.   #endif
  417.       if(mode == 0) {
  418.           if(!whole_screen) {
  419. --- 738,744 ----
  420.   #ifdef LINT    /* lint may handle static decl poorly -- static boolean so; */
  421.       boolean so;
  422.   #else
  423. !     static boolean NEARDATA so;
  424.   #endif
  425.       if(mode == 0) {
  426.           if(!whole_screen) {
  427. ***************
  428. *** 688,700 ****
  429.           so = flags.standout;
  430.           flags.standout = 1;
  431.       } else {
  432. - #ifdef MACOS
  433. -         macflags |= fFullScrKluge;
  434. - #endif
  435.           if(mode == 1) {
  436. - #ifdef MACOS
  437. -             macflags |= fCornScrKluge;
  438. - #endif
  439.               curs(1, LI);
  440.               more();
  441.           }
  442. --- 752,758 ----
  443. ***************
  444. *** 705,713 ****
  445.               curs(1, ROWNO+4);
  446.               cl_eos();
  447.           }
  448. - #ifdef MACOS
  449. -         macflags &= ~fScreenKluges;
  450. - #endif
  451.       }
  452.   }
  453.   
  454. --- 763,768 ----
  455. ***************
  456. *** 718,723 ****
  457. --- 773,782 ----
  458.   page_line(s)        /* returns 1 if we should quit */
  459.   register const char *s;
  460.   {
  461. + #ifdef CLIPPING
  462. + /* we assume here that no data files have more than 80 chars/line */
  463. +     static char tmp[81], *t;
  464. + #endif
  465.       if(cury == LI-1) {
  466.           if(!*s)
  467.               return(0);    /* suppress blank lines at top */
  468. ***************
  469. *** 735,740 ****
  470. --- 794,821 ----
  471.               cl_eos();
  472.           }
  473.       }
  474. + #ifdef CLIPPING
  475. + /* if lines are too long for the screen, first try stripping leading blanks */
  476. +     if (strlen(s) >= CO) {
  477. +         while (*s == ' ' || *s == '\t') s++;
  478. +     }
  479. + /* if it's still too long, try compressing blanks */
  480. +     if (strlen(s) >= CO) {
  481. +         t = tmp;
  482. +         while ( (*t = *s) != 0) {
  483. +             if (*t == ' ') {
  484. +                 while (*s == ' ')
  485. +                     s++;
  486. +             }
  487. +             else
  488. +                 s++;
  489. +             t++;
  490. +         }
  491. +         s = tmp;
  492. +     }
  493. + #endif /* CLIPPING */
  494.   #ifdef TERMINFO
  495.       xputs(s); xputc('\n');
  496.   #else
  497. ***************
  498. *** 767,775 ****
  499.       static struct line {
  500.           struct line *next_line;
  501.           char *line_text;
  502. !     } *texthead, *texttail;
  503. !     static int maxlen;
  504. !     static int linect;
  505.       register struct line *tl;
  506.       register boolean hmenu = FALSE;
  507.   
  508. --- 848,856 ----
  509.       static struct line {
  510.           struct line *next_line;
  511.           char *line_text;
  512. !     } NEARDATA *texthead, NEARDATA *texttail;
  513. !     static int NEARDATA maxlen;
  514. !     static int NEARDATA linect;
  515.       register struct line *tl;
  516.       register boolean hmenu = FALSE;
  517.   
  518. ***************
  519. *** 817,833 ****
  520.       else
  521.       if(mode == 2) {
  522.           register int curline, lth;
  523. - #ifdef MACOS
  524. -         short tmpflags;
  525. -         extern struct line *mactexthead;
  526. -         extern int macmaxlen, maclinect;
  527. -         
  528. -         tmpflags = macflags;
  529. -         macflags |= fDoUpdate | fDisplayKluge;
  530. -         mactexthead = texthead;
  531. -         macmaxlen = maxlen;
  532. -         maclinect = linect;
  533. - #endif
  534.   
  535.           if(flags.toplin == 1) more();    /* ab@unido */
  536.           remember_topl();
  537. --- 898,903 ----
  538. ***************
  539. *** 862,870 ****
  540.   #endif
  541.           cl_end ();
  542.           if (!hmenu) {
  543. - #ifdef MACOS
  544. -             macflags |= fCornScrKluge;
  545. - #endif
  546.               cmore (text);
  547.           }
  548.           if (!hmenu || clear_help(hc)) {
  549. --- 932,937 ----
  550. ***************
  551. *** 872,886 ****
  552.               cl_end ();
  553.               docorner (lth, curline-1);
  554.           }
  555.   #ifdef MACOS
  556. !             mactexthead = NULL;
  557. !             macflags |= (tmpflags & (fDoUpdate | fDisplayKluge));
  558.   #endif
  559. -         } else {                    /* feed to pager */
  560.           set_pager(0);
  561.           for (tl = texthead; tl; tl = tl->next_line) {
  562.               if (page_line (tl->line_text)) {
  563.               set_pager(2);
  564.               while(tl = texthead) {
  565.                   texthead = tl->next_line;
  566.                   free((genericptr_t) tl);
  567. --- 939,958 ----
  568.               cl_end ();
  569.               docorner (lth, curline-1);
  570.           }
  571. +         } else {                    /* feed to pager */
  572.   #ifdef MACOS
  573. !         short    tmpflags;
  574. !         
  575. !         tmpflags = macflags;
  576. !         macflags &= ~fDoNonKeyEvt;
  577.   #endif
  578.           set_pager(0);
  579.           for (tl = texthead; tl; tl = tl->next_line) {
  580.               if (page_line (tl->line_text)) {
  581.               set_pager(2);
  582. + #ifdef MACOS
  583. +             macflags = tmpflags;
  584. + #endif
  585.               while(tl = texthead) {
  586.                   texthead = tl->next_line;
  587.                   free((genericptr_t) tl);
  588. ***************
  589. *** 893,898 ****
  590. --- 965,973 ----
  591.               set_pager(2);
  592.           } else
  593.               set_pager(1);
  594. + #ifdef MACOS
  595. +         macflags = tmpflags;
  596. + #endif
  597.           }
  598.       }
  599.   
  600. ***************
  601. *** 966,972 ****
  602.       cornline(-1,"");
  603.   }
  604.   
  605. ! XSTATIC boolean
  606.   clear_help(c)
  607.   char c;
  608.   {
  609. --- 1041,1047 ----
  610.       cornline(-1,"");
  611.   }
  612.   
  613. ! STATIC_OVL boolean
  614.   clear_help(c)
  615.   char c;
  616.   {
  617. ***************
  618. *** 1004,1010 ****
  619.           );
  620.   }
  621.   
  622. ! XSTATIC boolean
  623.   valid_help(c)
  624.   char c;
  625.   {
  626. --- 1079,1085 ----
  627.           );
  628.   }
  629.   
  630. ! STATIC_OVL boolean
  631.   valid_help(c)
  632.   char c;
  633.   {
  634. *** src/Old/pickup.c    Sun Jun  3 14:02:35 1990
  635. --- src/pickup.c    Sun May 27 17:58:15 1990
  636. ***************
  637. *** 7,26 ****
  638.    */
  639.   
  640.   #include    "hack.h"
  641. ! #ifndef OVERLAY
  642. ! static int FDECL(in_container,(struct obj *));
  643. ! static int FDECL(ck_container,(struct obj *));
  644. ! static int FDECL(ck_bag,(struct obj *));
  645. ! static int FDECL(out_container,(struct obj *));
  646. ! #else
  647. ! int FDECL(in_container,(struct obj *));
  648. ! int FDECL(ck_container,(struct obj *));
  649. ! int FDECL(ck_bag,(struct obj *));
  650. ! int FDECL(out_container,(struct obj *));
  651. ! #endif
  652.   void FDECL(explode_bag,(struct obj *));
  653.   
  654. ! #ifdef OVLB
  655.   
  656.   static const char nearloadmsg[] = "have a little trouble lifting";
  657.   
  658. --- 7,21 ----
  659.    */
  660.   
  661.   #include    "hack.h"
  662. ! STATIC_PTR int FDECL(in_container,(struct obj *));
  663. ! STATIC_PTR int FDECL(ck_container,(struct obj *));
  664. ! STATIC_PTR int FDECL(ck_bag,(struct obj *));
  665. ! STATIC_PTR int FDECL(out_container,(struct obj *));
  666.   void FDECL(explode_bag,(struct obj *));
  667.   
  668. ! #define DELTA_CWT(cont) ((cont)->cursed?(obj->owt*2):(obj->owt/((cont)->blessed?4:2)) + 1)
  669. ! #ifdef OVL0
  670.   
  671.   static const char nearloadmsg[] = "have a little trouble lifting";
  672.   
  673. ***************
  674. *** 257,265 ****
  675.           if(wt > 0) {
  676.               if(obj->quan > 1) {
  677.                   /* see how many we can lift */
  678. !                 int savequan = obj->quan;
  679.                   int iw = inv_weight();
  680. !                 int qq;
  681.                   for(qq = 1; qq < savequan; qq++){
  682.                       obj->quan = qq;
  683.                       if(iw + weight(obj) > 0)
  684. --- 252,260 ----
  685.           if(wt > 0) {
  686.               if(obj->quan > 1) {
  687.                   /* see how many we can lift */
  688. !                 unsigned savequan = obj->quan;
  689.                   int iw = inv_weight();
  690. !                 unsigned qq;
  691.                   for(qq = 1; qq < savequan; qq++){
  692.                       obj->quan = qq;
  693.                       if(iw + weight(obj) > 0)
  694. ***************
  695. *** 274,280 ****
  696.                   You("can only carry %s of the %s lying here.",
  697.                           (qq == 1) ? "one" : "some",
  698.                           doname(obj));
  699. !                     obj3 = splitobj(obj, qq);
  700.                       if(obj3->otyp == SCR_SCARE_MONSTER)
  701.                           if(obj3->spe) obj->spe = 0;
  702.                       goto lift_some;
  703. --- 269,275 ----
  704.                   You("can only carry %s of the %s lying here.",
  705.                           (qq == 1) ? "one" : "some",
  706.                           doname(obj));
  707. !                     obj3 = splitobj(obj, (int)qq);
  708.                       if(obj3->otyp == SCR_SCARE_MONSTER)
  709.                           if(obj3->spe) obj->spe = 0;
  710.                       goto lift_some;
  711. ***************
  712. *** 296,303 ****
  713.                   if(obj->spe) obj->spe = 0;
  714.               break;
  715.           }
  716. !         { int pickquan = obj->quan;
  717. !           int mergquan;
  718.   
  719.             obj = pick_obj(obj);
  720.             if(wt > -5) You(nearloadmsg);
  721. --- 291,298 ----
  722.                   if(obj->spe) obj->spe = 0;
  723.               break;
  724.           }
  725. !         { unsigned pickquan = obj->quan;
  726. !           unsigned mergquan;
  727.   
  728.             obj = pick_obj(obj);
  729.             if(wt > -5) You(nearloadmsg);
  730. ***************
  731. *** 324,329 ****
  732. --- 319,327 ----
  733.       return(addinv(otmp));    /* might merge it with other objects */
  734.   }
  735.   
  736. + #endif /* OVL1 */
  737. + #ifdef OVLB
  738.   int
  739.   doloot() {    /* loot a container on the floor. */
  740.   
  741. ***************
  742. *** 367,379 ****
  743.   }
  744.   
  745.   static
  746. ! struct obj *current_container;    /* a local variable of use_container, to be
  747.                   used by its local procedures in/ck_container */
  748.   #define Icebox (current_container->otyp == ICE_BOX)
  749.   int baggone;    /* used in askchain so bag isn't used after explosion */
  750.   
  751.   #endif /* OVLB */
  752. ! #ifdef OVL0
  753.   
  754.   void
  755.   inc_cwt(cobj, obj)
  756. --- 365,377 ----
  757.   }
  758.   
  759.   static
  760. ! struct obj NEARDATA *current_container;    /* a local variable of use_container, to be
  761.                   used by its local procedures in/ck_container */
  762.   #define Icebox (current_container->otyp == ICE_BOX)
  763.   int baggone;    /* used in askchain so bag isn't used after explosion */
  764.   
  765.   #endif /* OVLB */
  766. ! #ifdef OVL1
  767.   
  768.   void
  769.   inc_cwt(cobj, obj)
  770. ***************
  771. *** 380,396 ****
  772.   register struct obj *cobj, *obj;
  773.   {
  774.       if (cobj->otyp == BAG_OF_HOLDING)
  775. !         cobj->owt += (cobj->cursed?(obj->owt*2):(obj->owt/(cobj->blessed?4:2)) + 1);
  776.       else    cobj->owt += obj->owt;
  777.   }
  778.   
  779. ! #endif /* OVL0 */
  780.   #ifdef OVLB
  781.   
  782. ! #ifndef OVERLAY
  783. ! static 
  784. ! #endif
  785. ! int
  786.   in_container(obj)
  787.   register struct obj *obj;
  788.   {
  789. --- 378,391 ----
  790.   register struct obj *cobj, *obj;
  791.   {
  792.       if (cobj->otyp == BAG_OF_HOLDING)
  793. !         cobj->owt += DELTA_CWT(cobj);
  794.       else    cobj->owt += obj->owt;
  795.   }
  796.   
  797. ! #endif /* OVL1 */
  798.   #ifdef OVLB
  799.   
  800. ! STATIC_PTR int
  801.   in_container(obj)
  802.   register struct obj *obj;
  803.   {
  804. ***************
  805. *** 466,475 ****
  806.       return(1);
  807.   }
  808.   
  809. ! #ifndef OVERLAY
  810. ! static 
  811. ! #endif
  812. ! int
  813.   ck_container(obj)
  814.   register struct obj *obj;
  815.   {
  816. --- 461,467 ----
  817.       return(1);
  818.   }
  819.   
  820. ! STATIC_PTR int
  821.   ck_container(obj)
  822.   register struct obj *obj;
  823.   {
  824. ***************
  825. *** 479,488 ****
  826.   /* ck_bag() needs a formal argument to make the overlay/prototype mechanism
  827.    * work right */
  828.   /*ARGSUSED*/
  829. ! #ifndef OVERLAY
  830. ! static 
  831. ! #endif
  832. ! int
  833.   ck_bag(obj)
  834.   struct obj *obj;
  835.   {
  836. --- 471,477 ----
  837.   /* ck_bag() needs a formal argument to make the overlay/prototype mechanism
  838.    * work right */
  839.   /*ARGSUSED*/
  840. ! STATIC_PTR int
  841.   ck_bag(obj)
  842.   struct obj *obj;
  843.   {
  844. ***************
  845. *** 489,502 ****
  846.       return(!baggone);
  847.   }
  848.   
  849. ! #ifndef OVERLAY
  850. ! static 
  851. ! #endif
  852. ! int
  853.   out_container(obj)
  854.   register struct obj *obj;
  855.   {
  856. !     register struct obj *otmp;
  857.       register boolean near_capacity = (inv_weight() > -5);
  858.   
  859.       if(inv_cnt() >= 52) {
  860. --- 478,488 ----
  861.       return(!baggone);
  862.   }
  863.   
  864. ! STATIC_PTR int
  865.   out_container(obj)
  866.   register struct obj *obj;
  867.   {
  868. !     register struct obj *otmp, *ootmp;
  869.       register boolean near_capacity = (inv_weight() > -5);
  870.   
  871.       if(inv_cnt() >= 52) {
  872. ***************
  873. *** 503,509 ****
  874.           pline("You have no room to hold anything else.");
  875.           return(0);
  876.       }
  877. !     if(obj->otyp != LOADSTONE && inv_weight() + (int)obj->owt > 0) {
  878.           char buf[BUFSZ];
  879.   
  880.           Strcpy(buf, doname(obj));
  881. --- 489,498 ----
  882.           pline("You have no room to hold anything else.");
  883.           return(0);
  884.       }
  885. !     if(obj->otyp != LOADSTONE && inv_weight() + (int)obj->owt -
  886. !        (carried(current_container) ?
  887. !         (current_container->otyp == BAG_OF_HOLDING ?
  888. !             (int)DELTA_CWT(current_container) : (int)obj->owt) : 0) > 0) {
  889.           char buf[BUFSZ];
  890.   
  891.           Strcpy(buf, doname(obj));
  892. ***************
  893. *** 528,558 ****
  894.       if (Icebox) obj->age = monstermoves - obj->age;
  895.       /* simulated point of time */
  896.   
  897. !     (void) addinv(obj);
  898.       if (near_capacity) You("have a little trouble removing");
  899. !     prinv(obj);
  900.       return 0;
  901.   }
  902.   
  903. - void
  904. - get_all_from_box() {
  905. -     register struct obj *otmp, *cobj, *ootmp, *nxobj;
  906. -     for(otmp = invent; otmp; otmp = otmp->nobj) {
  907. -         cobj = otmp;
  908. -         if(Is_container(otmp)) {
  909. -         current_container = otmp;
  910. -         for(ootmp=fcobj,nxobj=(fcobj ? fcobj->nobj : 0); ootmp;
  911. -                 ootmp=nxobj,nxobj=(ootmp ? ootmp->nobj : 0) )
  912. -             if(ootmp->cobj == cobj)
  913. -             (void)out_container(ootmp);
  914. -         }
  915. -     }
  916. -     return;
  917. - }
  918.   /* for getobj: 0: allow cnt; #: allow all types; %: expect food */
  919. ! static const char frozen_food[] = { '0', '#', FOOD_SYM, 0 };
  920.   
  921.   void
  922.   use_container(obj, held)
  923. --- 517,530 ----
  924.       if (Icebox) obj->age = monstermoves - obj->age;
  925.       /* simulated point of time */
  926.   
  927. !     ootmp = addinv(obj);
  928.       if (near_capacity) You("have a little trouble removing");
  929. !     prinv(ootmp);
  930.       return 0;
  931.   }
  932.   
  933.   /* for getobj: 0: allow cnt; #: allow all types; %: expect food */
  934. ! static const char NEARDATA frozen_food[] = { '0', '#', FOOD_SYM, 0 };
  935.   
  936.   void
  937.   use_container(obj, held)
  938. ***************
  939. *** 662,669 ****
  940.   dec_cwt(cobj, obj)
  941.   register struct obj *cobj, *obj;
  942.   {
  943. !     if (Is_mbag(cobj))
  944. !         cobj->owt -= (cobj->cursed?(obj->owt*2):(obj->owt/(cobj->blessed?4:2)) + 1);
  945.       else    cobj->owt -= obj->owt;
  946.   
  947.       if(cobj->owt < objects[cobj->otyp].oc_weight)
  948. --- 634,641 ----
  949.   dec_cwt(cobj, obj)
  950.   register struct obj *cobj, *obj;
  951.   {
  952. !     if (cobj->otyp == BAG_OF_HOLDING)
  953. !         cobj->owt -= DELTA_CWT(cobj);
  954.       else    cobj->owt -= obj->owt;
  955.   
  956.       if(cobj->owt < objects[cobj->otyp].oc_weight)
  957. *** src/Old/polyself.c    Sun Jun  3 14:03:05 1990
  958. --- src/polyself.c    Thu May 31 22:11:33 1990
  959. ***************
  960. *** 5,15 ****
  961.   #include "hack.h"
  962.   
  963.   #ifdef POLYSELF
  964.   static void NDECL(break_armor);
  965.   static void FDECL(drop_weapon,(int));
  966.   static void NDECL(skinback);
  967.   static void NDECL(uunstick);
  968. - #ifdef OVLB
  969.   static boolean sticky;
  970.   #endif /* OVLB */
  971.   #endif
  972. --- 5,15 ----
  973.   #include "hack.h"
  974.   
  975.   #ifdef POLYSELF
  976. + #ifdef OVLB
  977.   static void NDECL(break_armor);
  978.   static void FDECL(drop_weapon,(int));
  979.   static void NDECL(skinback);
  980.   static void NDECL(uunstick);
  981.   static boolean sticky;
  982.   #endif /* OVLB */
  983.   #endif
  984. ***************
  985. *** 629,635 ****
  986.   #ifdef MACOS
  987.               char mac_tbuf[80];
  988.               if(!flags.silent) SysBeep(1);
  989. !             sprintf(mac_tbuf, "Really confuse %s?", mon_nam(mtmp));
  990.               if(UseMacAlertText(128, mac_tbuf) != 1) continue;
  991.   #else
  992.               pline("Really confuse %s? ", mon_nam(mtmp));
  993. --- 629,635 ----
  994.   #ifdef MACOS
  995.               char mac_tbuf[80];
  996.               if(!flags.silent) SysBeep(1);
  997. !             Sprintf(mac_tbuf, "Really confuse %s?", mon_nam(mtmp));
  998.               if(UseMacAlertText(128, mac_tbuf) != 1) continue;
  999.   #else
  1000.               pline("Really confuse %s? ", mon_nam(mtmp));
  1001. ***************
  1002. *** 705,710 ****
  1003. --- 705,712 ----
  1004.   }
  1005.   #endif
  1006.   
  1007. + #endif /* OVLB */
  1008. + #ifdef OVL1
  1009.   const char *
  1010.   body_part(part)
  1011.   int part;
  1012. ***************
  1013. *** 713,745 ****
  1014.        * plus the trailing null, after pluralizing (since sometimes a
  1015.        * buffer is made a fixed size and must be able to hold it)
  1016.        */
  1017. !     static const char *humanoid_parts[] = { "arm", "eye", "face", "finger",
  1018.           "fingertip", "foot", "hand", "handed", "head", "leg",
  1019.                   "light headed", "neck", "spine", "toe" };
  1020.   #ifdef POLYSELF
  1021. !     static const char *jelly_parts[] = { "pseudopod", "dark spot", "front",
  1022.           "pseudopod extension", "pseudopod extremity",
  1023.           "pseudopod root", "grasp", "grasped", "cerebral area",
  1024.           "lower pseudopod", "viscous", "middle", "surface",
  1025.           "pseudopod extremity" },
  1026. !     *animal_parts[] = { "forelimb", "eye", "face", "foreclaw", "claw tip",
  1027.           "rear claw", "foreclaw", "clawed", "head", "rear limb",
  1028.           "light headed", "neck", "spine", "rear claw tip" },
  1029. !     *horse_parts[] = { "forelimb", "eye", "face", "forehoof", "hoof tip",
  1030.           "rear hoof", "foreclaw", "hooved", "head", "rear limb",
  1031.           "light headed", "neck", "backbone", "rear hoof tip" },
  1032. !     *sphere_parts[] = { "appendage", "optic nerve", "body", "tentacle",
  1033.           "tentacle tip", "lower appendage", "tentacle", "tentacled",
  1034.           "body", "lower tentacle", "rotational", "equator", "body",
  1035.           "lower tentacle tip" },
  1036. !     *fungus_parts[] = { "mycelium", "visual area", "front", "hypha",
  1037.           "hypha", "root", "strand", "stranded", "cap area",
  1038.           "rhizome", "sporulated", "stalk", "root", "rhizome tip" },
  1039. !     *vortex_parts[] = { "region", "eye", "front", "minor current",
  1040.           "minor current", "lower current", "swirl", "swirled",
  1041.           "central core", "lower current", "addled", "center",
  1042.           "currents", "edge" },
  1043. !     *snake_parts[] = { "vestigial limb", "eye", "face", "large scale",
  1044.           "large scale tip", "rear region", "scale gap", "scale gapped",
  1045.           "head", "rear region", "light headed", "neck", "length",
  1046.           "rear scale" };
  1047. --- 715,747 ----
  1048.        * plus the trailing null, after pluralizing (since sometimes a
  1049.        * buffer is made a fixed size and must be able to hold it)
  1050.        */
  1051. !     static const char NEARDATA *humanoid_parts[] = { "arm", "eye", "face", "finger",
  1052.           "fingertip", "foot", "hand", "handed", "head", "leg",
  1053.                   "light headed", "neck", "spine", "toe" };
  1054.   #ifdef POLYSELF
  1055. !     static const char NEARDATA *jelly_parts[] = { "pseudopod", "dark spot", "front",
  1056.           "pseudopod extension", "pseudopod extremity",
  1057.           "pseudopod root", "grasp", "grasped", "cerebral area",
  1058.           "lower pseudopod", "viscous", "middle", "surface",
  1059.           "pseudopod extremity" },
  1060. !     NEARDATA *animal_parts[] = { "forelimb", "eye", "face", "foreclaw", "claw tip",
  1061.           "rear claw", "foreclaw", "clawed", "head", "rear limb",
  1062.           "light headed", "neck", "spine", "rear claw tip" },
  1063. !     NEARDATA *horse_parts[] = { "forelimb", "eye", "face", "forehoof", "hoof tip",
  1064.           "rear hoof", "foreclaw", "hooved", "head", "rear limb",
  1065.           "light headed", "neck", "backbone", "rear hoof tip" },
  1066. !     NEARDATA *sphere_parts[] = { "appendage", "optic nerve", "body", "tentacle",
  1067.           "tentacle tip", "lower appendage", "tentacle", "tentacled",
  1068.           "body", "lower tentacle", "rotational", "equator", "body",
  1069.           "lower tentacle tip" },
  1070. !     NEARDATA *fungus_parts[] = { "mycelium", "visual area", "front", "hypha",
  1071.           "hypha", "root", "strand", "stranded", "cap area",
  1072.           "rhizome", "sporulated", "stalk", "root", "rhizome tip" },
  1073. !     NEARDATA *vortex_parts[] = { "region", "eye", "front", "minor current",
  1074.           "minor current", "lower current", "swirl", "swirled",
  1075.           "central core", "lower current", "addled", "center",
  1076.           "currents", "edge" },
  1077. !     NEARDATA *snake_parts[] = { "vestigial limb", "eye", "face", "large scale",
  1078.           "large scale tip", "rear region", "scale gap", "scale gapped",
  1079.           "head", "rear region", "light headed", "neck", "length",
  1080.           "rear scale" };
  1081. ***************
  1082. *** 761,767 ****
  1083.   #endif
  1084.   }
  1085.   
  1086. ! #endif /* OVLB */
  1087.   #ifdef OVL0
  1088.   
  1089.   int
  1090. --- 763,769 ----
  1091.   #endif
  1092.   }
  1093.   
  1094. ! #endif /* OVL1 */
  1095.   #ifdef OVL0
  1096.   
  1097.   int
  1098. *** src/Old/potion.c    Sun Jun  3 14:03:42 1990
  1099. --- src/potion.c    Sat Jun  2 19:45:47 1990
  1100. ***************
  1101. *** 5,11 ****
  1102.   #include "hack.h"
  1103.   
  1104.   #ifdef OVLB
  1105. ! static int nothing, unkn;
  1106.   #endif /* OVLB */
  1107.   
  1108.   #ifdef WORM
  1109. --- 5,14 ----
  1110.   #include "hack.h"
  1111.   
  1112.   #ifdef OVLB
  1113. ! static void NDECL(ghost_from_bottle);
  1114. ! static boolean FDECL(neutralizes, (struct obj *,struct obj *));
  1115. ! static int NEARDATA nothing, NEARDATA unkn;
  1116.   #endif /* OVLB */
  1117.   
  1118.   #ifdef WORM
  1119. ***************
  1120. *** 22,28 ****
  1121.   
  1122.   #ifdef OVLB
  1123.   
  1124. ! static const char beverages[] = { POTION_SYM, 0 };
  1125.   
  1126.   void
  1127.   make_confused(xtime,talk)
  1128. --- 25,31 ----
  1129.   
  1130.   #ifdef OVLB
  1131.   
  1132. ! static const char NEARDATA beverages[] = { POTION_SYM, 0 };
  1133.   
  1134.   void
  1135.   make_confused(xtime,talk)
  1136. ***************
  1137. *** 157,167 ****
  1138.   static void
  1139.   ghost_from_bottle()
  1140.   {
  1141. !     if(!makemon(&mons[PM_GHOST], u.ux, u.uy)){
  1142.           pline("This bottle turns out to be empty.");
  1143.           return;
  1144.       }
  1145. !     pline("As you open the bottle, an enormous ghost emerges!");
  1146.       if(flags.verbose)
  1147.           You("are frightened to death, and unable to move.");
  1148.       nomul(-3);
  1149. --- 160,177 ----
  1150.   static void
  1151.   ghost_from_bottle()
  1152.   {
  1153. !     struct monst *mtmp = makemon(&mons[PM_GHOST], u.ux, u.uy);
  1154. !     if (!mtmp) {
  1155.           pline("This bottle turns out to be empty.");
  1156.           return;
  1157.       }
  1158. !     if (Blind) {
  1159. !         pline("As you open the bottle, something emerges.");
  1160. !         return;
  1161. !     }
  1162. !     pline("As you open the bottle, an enormous %s emerges!",
  1163. !         Hallucination ? rndmonnam() : "ghost");
  1164.       if(flags.verbose)
  1165.           You("are frightened to death, and unable to move.");
  1166.       nomul(-3);
  1167. ***************
  1168. *** 268,273 ****
  1169. --- 278,285 ----
  1170.               }
  1171.               if(++i >= A_MAX) i = 0;
  1172.               }
  1173. +             if((ABASE(A_STR) == AMAX(A_STR)) && (u.uhs >= 3))
  1174. +             losestr(1);        /* kludge - mrs */
  1175.           }
  1176.           break;
  1177.       case POT_HALLUCINATION:
  1178. ***************
  1179. *** 342,352 ****
  1180.               unkn++;
  1181.               You("have an uneasy feeling...");
  1182.           } else {
  1183. -             You("feel self-knowledgeable...");
  1184.               if (otmp->blessed) {
  1185.                   adjattrib(A_INT, 1, FALSE);
  1186.                   adjattrib(A_WIS, 1, FALSE);
  1187.               }
  1188.               more();
  1189.               enlightenment();
  1190.               pline("The feeling subsides.");
  1191. --- 354,364 ----
  1192.               unkn++;
  1193.               You("have an uneasy feeling...");
  1194.           } else {
  1195.               if (otmp->blessed) {
  1196.                   adjattrib(A_INT, 1, FALSE);
  1197.                   adjattrib(A_WIS, 1, FALSE);
  1198.               }
  1199. +             You("feel self-knowledgeable...");
  1200.               more();
  1201.               enlightenment();
  1202.               pline("The feeling subsides.");
  1203. ***************
  1204. *** 360,377 ****
  1205.           else {
  1206.                newsym(u.ux,u.uy);
  1207.                if(!Blind)
  1208. !                pline("Gee!  All of a sudden, you can't see yourself.");
  1209.                else
  1210.                  You("feel rather airy."), unkn++;
  1211.           }
  1212.           if (otmp->blessed && !(HInvis & INTRINSIC)) {
  1213.   #ifndef MACOS
  1214.               pline("Do you want the invisibility to be permanent? ");
  1215. -             nothing = 0;
  1216.               if (yn()=='n') HInvis += rn1(15,31);
  1217.               else HInvis |= INTRINSIC;
  1218.   #else
  1219. -             nothing = 0;
  1220.               if (UseMacAlertText(128,
  1221.                   "Do you want the invisibility to be permanent ?")
  1222.                   == 2) HInvis += rn1(15,31);
  1223. --- 372,390 ----
  1224.           else {
  1225.                newsym(u.ux,u.uy);
  1226.                if(!Blind)
  1227. !                pline(Hallucination ?
  1228. !              "Far out, man!  You can see right through yourself!" :
  1229. !              "Gee!  All of a sudden, you can't see yourself.");
  1230.                else
  1231.                  You("feel rather airy."), unkn++;
  1232.           }
  1233.           if (otmp->blessed && !(HInvis & INTRINSIC)) {
  1234. +             nothing = 0;
  1235.   #ifndef MACOS
  1236.               pline("Do you want the invisibility to be permanent? ");
  1237.               if (yn()=='n') HInvis += rn1(15,31);
  1238.               else HInvis |= INTRINSIC;
  1239.   #else
  1240.               if (UseMacAlertText(128,
  1241.                   "Do you want the invisibility to be permanent ?")
  1242.                   == 2) HInvis += rn1(15,31);
  1243. ***************
  1244. *** 520,529 ****
  1245.           if (otmp->cursed) {
  1246.               unkn++;
  1247.               /* they went up a level */
  1248. !             if(dlevel > 1 && dlevel <= MAXLEVEL) { 
  1249.                   You("rise up, through the ceiling!");
  1250.                   goto_level(dlevel-1, FALSE, FALSE);
  1251.               } else You("have an uneasy feeling.");
  1252.               break;
  1253.           }
  1254.           pluslvl();
  1255. --- 533,554 ----
  1256.           if (otmp->cursed) {
  1257.               unkn++;
  1258.               /* they went up a level */
  1259. ! #ifdef ENDGAME
  1260. !             if((dlevel > 1  || u.uhave_amulet) &&
  1261. !                             dlevel <= MAXLEVEL) { 
  1262.                   You("rise up, through the ceiling!");
  1263. +                 goto_level((dlevel==1) ? ENDLEVEL
  1264. +                     : dlevel-1, FALSE, FALSE);
  1265. +             } else You("have an uneasy feeling.");
  1266. + #else
  1267. +             if(dlevel > 1 && dlevel <= MAXLEVEL) {
  1268. +                 You("rise up, through the ceiling!");
  1269. + #ifdef MACOS
  1270. +                 segments |= SEG_POTION;
  1271. + #endif
  1272.                   goto_level(dlevel-1, FALSE, FALSE);
  1273.               } else You("have an uneasy feeling.");
  1274. + #endif
  1275.               break;
  1276.           }
  1277.           pluslvl();
  1278. ***************
  1279. *** 740,745 ****
  1280. --- 765,772 ----
  1281.                   if(!Blind)
  1282.                   pline("%s looks healthier.", Monnam(mon));
  1283.                   mon->mhp += d(2,6);
  1284. +                 if (mon->mhp > mon->mhpmax)
  1285. +                     mon->mhp = mon->mhpmax;
  1286.               }
  1287.           }
  1288.           /* TO DO: Gremlins multiply when doused with water */
  1289. ***************
  1290. *** 1023,1032 ****
  1291.                   return(1);
  1292.           }
  1293.   
  1294. !         obj->spe--; /* diluted */
  1295. !         if (obj->otyp == POT_WATER)
  1296. !             pline("The mixture bubbles violently, then clears.");
  1297. !         else {
  1298.               if (!Blind) {
  1299.                   pline("The mixture looks %s.", objects[obj->otyp].oc_descr);
  1300.                   obj->dknown = 1;
  1301. --- 1050,1061 ----
  1302.                   return(1);
  1303.           }
  1304.   
  1305. !         if (obj->otyp == POT_WATER) {
  1306. !             obj->spe = 0; /* in case it was diluted before */
  1307. !             pline("The mixture bubbles violently%s.",
  1308. !                 Blind ? "" : ", then clears");
  1309. !         } else {
  1310. !             obj->spe--; /* diluted */
  1311.               if (!Blind) {
  1312.                   pline("The mixture looks %s.", objects[obj->otyp].oc_descr);
  1313.                   obj->dknown = 1;
  1314. ***************
  1315. *** 1059,1064 ****
  1316. --- 1088,1094 ----
  1317.           potion->otyp = POT_WATER;
  1318.           potion->blessed = 0;
  1319.           potion->cursed = 0;
  1320. +         potion->spe = 0;
  1321.           return(1);
  1322.       }
  1323.   
  1324. ***************
  1325. *** 1159,1181 ****
  1326.   {
  1327.       register struct obj    *objs;
  1328.       register struct monst    *mtmp;
  1329. !     boolean mfound=FALSE;
  1330.   
  1331.       if(!fobj) {
  1332.           for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
  1333. !             if (mtmp->minvent) {
  1334. !                 /* OK, it's used for 2 different things */
  1335. !                 mfound = TRUE;
  1336.                   break;
  1337.               }
  1338.           }
  1339. !         if (!mfound) {
  1340.               if (otmp)
  1341.                   strange_feeling(otmp, "You feel a pull downward.");
  1342.               return(1);
  1343.           }
  1344.       }
  1345. !     mfound = FALSE;
  1346.       for(objs = fobj; objs; objs = objs->nobj)
  1347.           if(objs->ox != u.ux || objs->oy != u.uy)
  1348.               goto outobjmap;
  1349. --- 1189,1213 ----
  1350.   {
  1351.       register struct obj    *objs;
  1352.       register struct monst    *mtmp;
  1353. !     boolean mfound=FALSE, mofound=FALSE;
  1354.   
  1355.       if(!fobj) {
  1356.           for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
  1357. !             /* mofound can be 1 of 2 completely different things,
  1358. !              * either of which stops the "strange feeling"...
  1359. !              */
  1360. !             if (mtmp->minvent || (mtmp->mimic && otmp->cursed)) {
  1361. !                 mofound = TRUE;
  1362.                   break;
  1363.               }
  1364.           }
  1365. !         if (!mofound) {
  1366.               if (otmp)
  1367.                   strange_feeling(otmp, "You feel a pull downward.");
  1368.               return(1);
  1369.           }
  1370.       }
  1371. !     if (mofound) goto outobjmap;
  1372.       for(objs = fobj; objs; objs = objs->nobj)
  1373.           if(objs->ox != u.ux || objs->oy != u.uy)
  1374.               goto outobjmap;
  1375. *** src/Old/pray.c    Sun Jun  3 14:04:30 1990
  1376. --- src/pray.c    Sat May 12 16:07:09 1990
  1377. ***************
  1378. *** 650,658 ****
  1379.           case 6:    pline ("An object appears at your %s!",
  1380.                   makeplural(body_part(FOOT)));
  1381.   #ifdef SPELLS
  1382. !             bless(mkobj_at(SPBOOK_SYM, u.ux, u.uy));
  1383.   #else
  1384. !             bless(mkobj_at(SCROLL_SYM, u.ux, u.uy));
  1385.   #endif
  1386.               break;
  1387.   
  1388. --- 650,658 ----
  1389.           case 6:    pline ("An object appears at your %s!",
  1390.                   makeplural(body_part(FOOT)));
  1391.   #ifdef SPELLS
  1392. !             bless(mkobj_at(SPBOOK_SYM, u.ux, u.uy, TRUE));
  1393.   #else
  1394. !             bless(mkobj_at(SCROLL_SYM, u.ux, u.uy, TRUE));
  1395.   #endif
  1396.               break;
  1397.   
  1398. ***************
  1399. *** 692,698 ****
  1400.   }
  1401.   
  1402.   #ifdef ENDGAME
  1403. ! static const char sacrifice_types[] = { FOOD_SYM, AMULET_SYM, 0 };
  1404.   #endif
  1405.   
  1406.   static void
  1407. --- 692,698 ----
  1408.   }
  1409.   
  1410.   #ifdef ENDGAME
  1411. ! static const char NEARDATA sacrifice_types[] = { FOOD_SYM, AMULET_SYM, 0 };
  1412.   #endif
  1413.   
  1414.   static void
  1415. ***************
  1416. *** 772,789 ****
  1417.           } else {
  1418.               register struct monst *dmon;
  1419.       /* Human sacrifice on a chaotic altar is equivalent to demon summoning */
  1420. ! #ifdef THEOLOGY
  1421.               if (altaralign == U_CHAOTIC)
  1422.                   pline("The blood covers the altar!");
  1423.               else {
  1424. ! #endif
  1425.       pline("The blood floods over the altar, which vanishes in %s cloud!",
  1426.                     an(Hallucination ? hcolor() : black));
  1427.                   levl[u.ux][u.uy].typ = ROOM;
  1428.                   levl[u.ux][u.uy].altarmask = 0;
  1429. ! #ifdef THEOLOGY
  1430.               }
  1431. ! #endif
  1432.               change_luck(2);
  1433.               if(Invisible) newsym(u.ux, u.uy);
  1434.               if(dmon = makemon(&mons[dlord()], u.ux, u.uy)) {
  1435. --- 772,789 ----
  1436.           } else {
  1437.               register struct monst *dmon;
  1438.       /* Human sacrifice on a chaotic altar is equivalent to demon summoning */
  1439. ! # ifdef THEOLOGY
  1440.               if (altaralign == U_CHAOTIC)
  1441.                   pline("The blood covers the altar!");
  1442.               else {
  1443. ! # endif
  1444.       pline("The blood floods over the altar, which vanishes in %s cloud!",
  1445.                     an(Hallucination ? hcolor() : black));
  1446.                   levl[u.ux][u.uy].typ = ROOM;
  1447.                   levl[u.ux][u.uy].altarmask = 0;
  1448. ! # ifdef THEOLOGY
  1449.               }
  1450. ! # endif
  1451.               change_luck(2);
  1452.               if(Invisible) newsym(u.ux, u.uy);
  1453.               if(dmon = makemon(&mons[dlord()], u.ux, u.uy)) {
  1454. ***************
  1455. *** 817,822 ****
  1456. --- 817,823 ----
  1457.   #ifdef __GNULINT__
  1458.           else { impossible("Bad unicorn type??"); unicalign = 0; }
  1459.   #endif
  1460. + #ifdef ALTARS
  1461.           /* If same as altar, always a very bad action. */
  1462.           if (unicalign == altaralign) {
  1463.               pline("Such an action is an insult to %s!", (unicalign== -1)
  1464. ***************
  1465. *** 832,840 ****
  1466.               else You("feel you are thoroughly on the right path.");
  1467.               u.ualign = ALIGNLIM;
  1468.               value += 3;
  1469. !         } else if (unicalign == u.ualigntyp) {
  1470.           /* If sacrificing unicorn of your alignment to altar not of */
  1471.           /* your alignment, your god gets angry and it's a conversion */
  1472.               u.ualign = -1;
  1473.               value = 1;
  1474.           } else value += 3;
  1475. --- 833,843 ----
  1476.               else You("feel you are thoroughly on the right path.");
  1477.               u.ualign = ALIGNLIM;
  1478.               value += 3;
  1479. !         } else
  1480.           /* If sacrificing unicorn of your alignment to altar not of */
  1481.           /* your alignment, your god gets angry and it's a conversion */
  1482. + #endif
  1483. +         if (unicalign == u.ualigntyp) {
  1484.               u.ualign = -1;
  1485.               value = 1;
  1486.           } else value += 3;
  1487. ***************
  1488. *** 959,964 ****
  1489. --- 962,968 ----
  1490.               You("feel the power of %s increase.",
  1491.                       u_gname());
  1492.               change_luck(1);
  1493. +             /* Yes, this is supposed to be &=, not |= */
  1494.               levl[u.ux][u.uy].altarmask &= A_SHRINE;
  1495.               /* the following accommodates stupid compilers */
  1496.               levl[u.ux][u.uy].altarmask =
  1497. *** src/Old/pri.c    Sun Jun  3 14:05:14 1990
  1498. --- src/pri.c    Thu May 31 22:13:26 1990
  1499. ***************
  1500. *** 5,43 ****
  1501.   #define MONATTK_H    /* comment line for pre-compiled headers */
  1502.   /* block some unused #defines to avoid overloading some cpp's */
  1503.   #include "hack.h"
  1504. - #include <ctype.h>  /* for isalpha() */
  1505.   #if defined(ALTARS) && defined(THEOLOGY)
  1506.   #include "epri.h"
  1507.   #endif
  1508.   #include "termcap.h"
  1509.   
  1510. ! OSTATIC void FDECL(hilite, (int,int,UCHAR_P, UCHAR_P));
  1511. ! OSTATIC void FDECL(cornbot, (int));
  1512.   #ifdef TEXTCOLOR
  1513. ! OSTATIC uchar FDECL(mimic_color, (struct monst *));
  1514.   #endif
  1515.   
  1516. ! #ifndef ASCIIGRAPH
  1517.   # define g_putch  (void) putchar
  1518. ! #endif
  1519.   
  1520. ! #ifndef g_putch
  1521. ! #ifdef OVL0
  1522.   static boolean GFlag = FALSE; /* graphic flag */
  1523.   #endif /* OVL0 */
  1524. - #endif
  1525.   
  1526.   /* 100 suffices for bot(); must be larger than COLNO */
  1527.   #define MAXCO 100
  1528. ! VSTATIC char oldbot1[MAXCO], newbot1[MAXCO];
  1529. ! VSTATIC char oldbot2[MAXCO], newbot2[MAXCO];
  1530.   #ifdef OVL2
  1531. ! static const char *dispst = "*0#@#0#*0#@#0#*0#@#0#*0#@#0#*0#@#0#*";
  1532.   #endif /* OVL2 */
  1533.   #ifndef OVLB
  1534. ! OSTATIC int mrank_sz;
  1535.   #else /* OVLB */
  1536. ! XSTATIC int mrank_sz = 0;  /* loaded by max_rank_sz (called in u_init) */
  1537.   #endif /* OVLB */
  1538.   
  1539.   #ifdef CLIPPING
  1540. --- 5,49 ----
  1541.   #define MONATTK_H    /* comment line for pre-compiled headers */
  1542.   /* block some unused #defines to avoid overloading some cpp's */
  1543.   #include "hack.h"
  1544.   #if defined(ALTARS) && defined(THEOLOGY)
  1545.   #include "epri.h"
  1546.   #endif
  1547.   #include "termcap.h"
  1548.   
  1549. ! #ifdef OVL0
  1550. ! static void FDECL(fillbot, (int,char *,char *));
  1551. ! static void NDECL(bot1);
  1552. ! static void NDECL(bot2);
  1553. ! #endif /* OVL0 */
  1554. ! STATIC_DCL void FDECL(hilite, (int,int,UCHAR_P, UCHAR_P));
  1555. ! STATIC_DCL void FDECL(cornbot, (int));
  1556.   #ifdef TEXTCOLOR
  1557. ! STATIC_DCL uchar FDECL(mimic_color, (struct monst *));
  1558.   #endif
  1559.   
  1560. ! #ifdef OVL0
  1561. ! # ifndef ASCIIGRAPH
  1562.   # define g_putch  (void) putchar
  1563. ! # endif /* ASCIIGRAPH */
  1564.   
  1565. ! # ifndef g_putch
  1566. ! static void FDECL(g_putch, (UCHAR_P));
  1567.   static boolean GFlag = FALSE; /* graphic flag */
  1568. + # endif
  1569.   #endif /* OVL0 */
  1570.   
  1571.   /* 100 suffices for bot(); must be larger than COLNO */
  1572.   #define MAXCO 100
  1573. ! STATIC_VAR char NEARDATA oldbot1[MAXCO], NEARDATA newbot1[MAXCO];
  1574. ! STATIC_VAR char NEARDATA oldbot2[MAXCO], NEARDATA newbot2[MAXCO];
  1575.   #ifdef OVL2
  1576. ! static const char NEARDATA *dispst = "*0#@#0#*0#@#0#*0#@#0#*0#@#0#*0#@#0#*";
  1577.   #endif /* OVL2 */
  1578.   #ifndef OVLB
  1579. ! STATIC_DCL int mrank_sz;
  1580.   #else /* OVLB */
  1581. ! STATIC_OVL int NEARDATA mrank_sz = 0;  /* loaded by max_rank_sz (called in u_init) */
  1582.   #endif /* OVLB */
  1583.   
  1584.   #ifdef CLIPPING
  1585. ***************
  1586. *** 126,131 ****
  1587. --- 132,140 ----
  1588.   #endif
  1589.   }
  1590.   
  1591. + #endif /* OVLB */
  1592. + #ifdef OVL0
  1593.   #ifdef CLIPPING
  1594.   void
  1595.   cliparound(x, y)
  1596. ***************
  1597. *** 160,168 ****
  1598.   }
  1599.   #endif /* CLIPPING */
  1600.   
  1601. - #endif /* OVLB */
  1602. - #ifdef OVL0
  1603.   /*
  1604.    *  Allow for a different implementation than this...
  1605.    */
  1606. --- 169,174 ----
  1607. ***************
  1608. *** 173,179 ****
  1609.   g_putch(ch)
  1610.   uchar ch;
  1611.   {
  1612. !     if (IBMgraphics)    /* IBM-compatible displays don't need other stuff */
  1613.           (void) putchar(ch);
  1614.       else if (ch & 0x80) {
  1615.           if (!GFlag) {
  1616. --- 179,186 ----
  1617.   g_putch(ch)
  1618.   uchar ch;
  1619.   {
  1620. !     if (flags.IBMgraphics)
  1621. !         /* IBM-compatible displays don't need other stuff */
  1622.           (void) putchar(ch);
  1623.       else if (ch & 0x80) {
  1624.           if (!GFlag) {
  1625. ***************
  1626. *** 272,278 ****
  1627.       register const char *ch;
  1628.       register struct monst *mtmp = 0;
  1629.   
  1630. !     if((x != u.ux) || (y != u.uy)) {
  1631.           if(!(mtmp = m_at(x, y))) {
  1632.   
  1633.           impossible("shield effect at %d,%d", x, y);
  1634. --- 279,289 ----
  1635.       register const char *ch;
  1636.       register struct monst *mtmp = 0;
  1637.   
  1638. !     nscr();
  1639. !     if((x == u.ux) && (y == u.uy)) 
  1640. !         curs_on_u();
  1641. !     else {
  1642.           if(!(mtmp = m_at(x, y))) {
  1643.   
  1644.           impossible("shield effect at %d,%d", x, y);
  1645. ***************
  1646. *** 429,435 ****
  1647.   #endif /* OVL0 */
  1648.   #ifdef OVLB
  1649.   
  1650. ! XSTATIC void
  1651.   cornbot(lth)
  1652.   register int lth;
  1653.   {
  1654. --- 440,446 ----
  1655.   #endif /* OVL0 */
  1656.   #ifdef OVLB
  1657.   
  1658. ! STATIC_OVL void
  1659.   cornbot(lth)
  1660.   register int lth;
  1661.   {
  1662. ***************
  1663. *** 677,683 ****
  1664.   /* Make sure that there are 18 entries in the rank arrays. */
  1665.   /* 0 and even entries are male ranks, odd entries are female. */
  1666.   
  1667. ! static const char *mage_ranks[] = {
  1668.       "Evoker",
  1669.       "Evoker",
  1670.       "Conjurer",
  1671. --- 688,694 ----
  1672.   /* Make sure that there are 18 entries in the rank arrays. */
  1673.   /* 0 and even entries are male ranks, odd entries are female. */
  1674.   
  1675. ! static const char NEARDATA *mage_ranks[] = {
  1676.       "Evoker",
  1677.       "Evoker",
  1678.       "Conjurer",
  1679. ***************
  1680. *** 698,704 ****
  1681.       "Mage"
  1682.   };
  1683.   
  1684. ! static const char *priest_ranks[] = {
  1685.       "Aspirant",
  1686.       "Aspirant",
  1687.       "Acolyte",
  1688. --- 709,715 ----
  1689.       "Mage"
  1690.   };
  1691.   
  1692. ! static const char NEARDATA *priest_ranks[] = {
  1693.       "Aspirant",
  1694.       "Aspirant",
  1695.       "Acolyte",
  1696. ***************
  1697. *** 719,725 ****
  1698.       "High Priestess"
  1699.   };
  1700.   
  1701. ! static const char *thief_ranks[] = {
  1702.       "Footpad",
  1703.       "Footpad",
  1704.       "Cutpurse",
  1705. --- 730,736 ----
  1706.       "High Priestess"
  1707.   };
  1708.   
  1709. ! static const char NEARDATA *thief_ranks[] = {
  1710.       "Footpad",
  1711.       "Footpad",
  1712.       "Cutpurse",
  1713. ***************
  1714. *** 740,746 ****
  1715.       "Thief"
  1716.   };
  1717.   
  1718. ! static const char *fighter_ranks[] = {
  1719.       "Stripling",
  1720.       "Stripling",
  1721.       "Skirmisher",
  1722. --- 751,757 ----
  1723.       "Thief"
  1724.   };
  1725.   
  1726. ! static const char NEARDATA *fighter_ranks[] = {
  1727.       "Stripling",
  1728.       "Stripling",
  1729.       "Skirmisher",
  1730. ***************
  1731. *** 761,767 ****
  1732.       "Lady"
  1733.   };
  1734.   
  1735. ! static const char *tourist_ranks[] = {
  1736.       "Rambler",
  1737.       "Rambler",
  1738.       "Sightseer",
  1739. --- 772,778 ----
  1740.       "Lady"
  1741.   };
  1742.   
  1743. ! static const char NEARDATA *tourist_ranks[] = {
  1744.       "Rambler",
  1745.       "Rambler",
  1746.       "Sightseer",
  1747. ***************
  1748. *** 782,788 ****
  1749.       "Adventurer"
  1750.   };
  1751.   
  1752. ! static const char *nomad_ranks[] = {
  1753.       "Troglodyte",
  1754.       "Troglodyte",
  1755.       "Aborigine",
  1756. --- 793,799 ----
  1757.       "Adventurer"
  1758.   };
  1759.   
  1760. ! static const char NEARDATA *nomad_ranks[] = {
  1761.       "Troglodyte",
  1762.       "Troglodyte",
  1763.       "Aborigine",
  1764. ***************
  1765. *** 803,809 ****
  1766.       "Pioneer"
  1767.   };
  1768.   
  1769. ! static const char *knight_ranks[] = {
  1770.       "Gallant",
  1771.       "Gallant",
  1772.       "Esquire",
  1773. --- 814,820 ----
  1774.       "Pioneer"
  1775.   };
  1776.   
  1777. ! static const char NEARDATA *knight_ranks[] = {
  1778.       "Gallant",
  1779.       "Gallant",
  1780.       "Esquire",
  1781. ***************
  1782. *** 824,830 ****
  1783.       "Paladin"
  1784.   };
  1785.   
  1786. ! static const char *archeo_ranks[] = {
  1787.       "Digger",
  1788.       "Digger",
  1789.       "Field Worker",
  1790. --- 835,841 ----
  1791.       "Paladin"
  1792.   };
  1793.   
  1794. ! static const char NEARDATA *archeo_ranks[] = {
  1795.       "Digger",
  1796.       "Digger",
  1797.       "Field Worker",
  1798. ***************
  1799. *** 845,851 ****
  1800.       "Curator"
  1801.   };
  1802.   
  1803. ! static const char *healer_ranks[] = {
  1804.       "Pre-Med",
  1805.       "Pre-Med",
  1806.       "Med Student",
  1807. --- 856,862 ----
  1808.       "Curator"
  1809.   };
  1810.   
  1811. ! static const char NEARDATA *healer_ranks[] = {
  1812.       "Pre-Med",
  1813.       "Pre-Med",
  1814.       "Med Student",
  1815. ***************
  1816. *** 866,872 ****
  1817.       "Chief Surgeon"
  1818.   };
  1819.   
  1820. ! static const char *barbarian_ranks[] = {
  1821.       "Plunderer",
  1822.       "Plunderess",
  1823.       "Pillager",
  1824. --- 877,883 ----
  1825.       "Chief Surgeon"
  1826.   };
  1827.   
  1828. ! static const char NEARDATA *barbarian_ranks[] = {
  1829.       "Plunderer",
  1830.       "Plunderess",
  1831.       "Pillager",
  1832. ***************
  1833. *** 887,893 ****
  1834.       "Conqueress"
  1835.   };
  1836.   
  1837. ! static const char *ninja_ranks[] = {
  1838.       "Chigo",
  1839.       "Chigo",
  1840.       "Bushi",
  1841. --- 898,904 ----
  1842.       "Conqueress"
  1843.   };
  1844.   
  1845. ! static const char NEARDATA *ninja_ranks[] = {
  1846.       "Chigo",
  1847.       "Chigo",
  1848.       "Bushi",
  1849. ***************
  1850. *** 908,914 ****
  1851.       "Jonin",
  1852.   };
  1853.   
  1854. ! static const char *elf_ranks[] = {
  1855.       "Edhel",
  1856.       "Elleth",
  1857.       "Edhel",
  1858. --- 919,925 ----
  1859.       "Jonin",
  1860.   };
  1861.   
  1862. ! static const char NEARDATA *elf_ranks[] = {
  1863.       "Edhel",
  1864.       "Elleth",
  1865.       "Edhel",
  1866. ***************
  1867. *** 931,941 ****
  1868.   
  1869.   #endif /* OVL1 */
  1870.   
  1871. ! OSTATIC const char **NDECL(rank_array);
  1872.   
  1873.   #ifdef OVL1
  1874.   
  1875. ! XSTATIC const char **
  1876.   rank_array() {
  1877.       register const char **ranks;
  1878.   
  1879. --- 942,952 ----
  1880.   
  1881.   #endif /* OVL1 */
  1882.   
  1883. ! STATIC_DCL const char **NDECL(rank_array);
  1884.   
  1885.   #ifdef OVL1
  1886.   
  1887. ! STATIC_OVL const char **
  1888.   rank_array() {
  1889.       register const char **ranks;
  1890.   
  1891. ***************
  1892. *** 959,969 ****
  1893.   
  1894.   #endif /* OVL1 */
  1895.   
  1896. ! OSTATIC const char *rank();
  1897.   
  1898.   #ifdef OVL1
  1899.   
  1900. ! XSTATIC const char *
  1901.   rank() {
  1902.       register int place;
  1903.       register const char **ranks = rank_array();
  1904. --- 970,980 ----
  1905.   
  1906.   #endif /* OVL1 */
  1907.   
  1908. ! STATIC_DCL const char *NDECL(rank);
  1909.   
  1910.   #ifdef OVL1
  1911.   
  1912. ! STATIC_OVL const char *
  1913.   rank() {
  1914.       register int place;
  1915.       register const char **ranks = rank_array();
  1916. ***************
  1917. *** 1261,1267 ****
  1918.    * user programmable
  1919.    */
  1920.   
  1921. ! static const char rndobs[] = {
  1922.       WEAPON_SYM, ARMOR_SYM, POTION_SYM, SCROLL_SYM, WAND_SYM,
  1923.   #ifdef SPELLS
  1924.       SPBOOK_SYM,
  1925. --- 1272,1278 ----
  1926.    * user programmable
  1927.    */
  1928.   
  1929. ! static const char NEARDATA rndobs[] = {
  1930.       WEAPON_SYM, ARMOR_SYM, POTION_SYM, SCROLL_SYM, WAND_SYM,
  1931.   #ifdef SPELLS
  1932.       SPBOOK_SYM,
  1933. ***************
  1934. *** 1274,1280 ****
  1935.       return rndobs[rn2(SIZE(rndobs))];
  1936.   }
  1937.   
  1938. ! static const char *hcolors[] = {
  1939.               "ultraviolet", "infrared", "hot pink", "psychedelic",
  1940.               "bluish-orange", "reddish-green", "dark white",
  1941.               "light black", "loud", "salty", "sweet", "sour",
  1942. --- 1285,1291 ----
  1943.       return rndobs[rn2(SIZE(rndobs))];
  1944.   }
  1945.   
  1946. ! static const char NEARDATA *hcolors[] = {
  1947.               "ultraviolet", "infrared", "hot pink", "psychedelic",
  1948.               "bluish-orange", "reddish-green", "dark white",
  1949.               "light black", "loud", "salty", "sweet", "sour",
  1950. ***************
  1951. *** 1297,1303 ****
  1952.   #ifdef OVL0
  1953.   
  1954.   /*ARGSUSED*/
  1955. ! XSTATIC void
  1956.   hilite(x, y, let, typ)
  1957.   int x, y;
  1958.   uchar let, typ;
  1959. --- 1308,1314 ----
  1960.   #ifdef OVL0
  1961.   
  1962.   /*ARGSUSED*/
  1963. ! STATIC_OVL void
  1964.   hilite(x, y, let, typ)
  1965.   int x, y;
  1966.   uchar let, typ;
  1967. ***************
  1968. *** 1446,1452 ****
  1969.   #ifdef TEXTCOLOR
  1970.   /* pick an appropriate color for a mimic imitating an object */
  1971.   
  1972. ! XSTATIC uchar
  1973.   mimic_color(mtmp)
  1974.   struct monst *mtmp;
  1975.   {
  1976. --- 1457,1463 ----
  1977.   #ifdef TEXTCOLOR
  1978.   /* pick an appropriate color for a mimic imitating an object */
  1979.   
  1980. ! STATIC_OVL uchar
  1981.   mimic_color(mtmp)
  1982.   struct monst *mtmp;
  1983.   {
  1984. *** src/Old/priest.c    Sun Jun  3 14:06:04 1990
  1985. --- src/priest.c    Thu May 31 22:13:29 1990
  1986. ***************
  1987. *** 10,15 ****
  1988. --- 10,18 ----
  1989.   #include "eshk.h"
  1990.   #include "epri.h"
  1991.   
  1992. + #ifdef OVLB
  1993. + #if defined(ALTARS) && defined(THEOLOGY)
  1994.   static boolean FDECL(histemple_at,(struct monst *,int,int));
  1995.   static int FDECL(t_alignment,(struct mkroom *));
  1996.   static boolean FDECL(is_shrined,(struct mkroom *));
  1997. ***************
  1998. *** 16,23 ****
  1999.   static boolean FDECL(t_coaligned,(struct mkroom *));
  2000.   struct monst *FDECL(findpriest,(struct mkroom *));
  2001.   static boolean FDECL(p_inhistemple,(struct mkroom *));
  2002. ! #ifdef OVLB
  2003.   
  2004.   /* used for the insides of shk_move and pri_move */
  2005.   int
  2006. --- 19,25 ----
  2007.   static boolean FDECL(t_coaligned,(struct mkroom *));
  2008.   struct monst *FDECL(findpriest,(struct mkroom *));
  2009.   static boolean FDECL(p_inhistemple,(struct mkroom *));
  2010. ! #endif
  2011.   
  2012.   /* used for the insides of shk_move and pri_move */
  2013.   int
  2014. ***************
  2015. *** 236,252 ****
  2016.               cnt--;
  2017.           }
  2018.   #endif
  2019. !         if(p_coaligned(priest)) {
  2020.               (void) mongets(priest, rn2(2) ? CLOAK_OF_PROTECTION
  2021.                             : CLOAK_OF_MAGIC_RESISTANCE);
  2022. ! #ifdef NAMED_ITEMS
  2023. !             otmp = mk_aligned_artifact((unsigned)EPRI(priest)->shralign + 1);
  2024. !             if(otmp) {
  2025. !             otmp->spe = rnd(4);
  2026. !             mpickobj(priest, otmp);
  2027. !             }
  2028. ! #endif
  2029. !         } else {
  2030.               if(!rn2(5)) 
  2031.               otmp = mksobj(CLOAK_OF_MAGIC_RESISTANCE, FALSE); 
  2032.               else otmp = mksobj(CLOAK_OF_PROTECTION, FALSE); 
  2033. --- 238,247 ----
  2034.               cnt--;
  2035.           }
  2036.   #endif
  2037. !         if(p_coaligned(priest))
  2038.               (void) mongets(priest, rn2(2) ? CLOAK_OF_PROTECTION
  2039.                             : CLOAK_OF_MAGIC_RESISTANCE);
  2040. !         else {
  2041.               if(!rn2(5)) 
  2042.               otmp = mksobj(CLOAK_OF_MAGIC_RESISTANCE, FALSE); 
  2043.               else otmp = mksobj(CLOAK_OF_PROTECTION, FALSE); 
  2044. ***************
  2045. *** 254,265 ****
  2046.               if(!rn2(2)) curse(otmp);
  2047.               mpickobj(priest, otmp);
  2048.               }
  2049. !             otmp = mksobj(MACE, FALSE);
  2050. !             if(otmp) {
  2051. !             otmp->spe = rnd(3);
  2052. !             if(!rn2(2)) curse(otmp);
  2053. !             mpickobj(priest, otmp);
  2054. !             }
  2055.           }
  2056.       }
  2057.   }
  2058. --- 249,261 ----
  2059.               if(!rn2(2)) curse(otmp);
  2060.               mpickobj(priest, otmp);
  2061.               }
  2062. !         }
  2063. !         otmp = mksobj(MACE, FALSE);
  2064. !         if(otmp) {
  2065. !             otmp->spe = rnd(3);
  2066. !             if(!rn2(2)) curse(otmp);
  2067. !             mpickobj(priest, otmp);
  2068.           }
  2069.       }
  2070.   }
  2071. ***************
  2072. *** 268,274 ****
  2073.   priestname(priest)
  2074.   register struct monst *priest;
  2075.   {
  2076. !     static char pname[PL_NSIZ];
  2077.   
  2078.       Strcpy(pname, "the ");
  2079.       if(priest->minvis) Strcat(pname, "invisible ");
  2080. --- 264,270 ----
  2081.   priestname(priest)
  2082.   register struct monst *priest;
  2083.   {
  2084. !     static char NEARDATA pname[PL_NSIZ];
  2085.   
  2086.       Strcpy(pname, "the ");
  2087.       if(priest->minvis) Strcat(pname, "invisible ");
  2088. ***************
  2089. *** 447,452 ****
  2090. --- 443,449 ----
  2091.               kludge("%s gives you two bits for an ale.", Monnam(priest));
  2092.               u.ugold = 2L;
  2093.           if (priest->mgold) priest->mgold -= 2L;
  2094. +         flags.botl = 1;
  2095.           } else
  2096.           kludge("%s is not interested.", Monnam(priest));
  2097.           return;
  2098.  
  2099.