home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / games / volume16 / nethck31 / patch1n < prev    next >
Encoding:
Text File  |  1993-03-04  |  57.2 KB  |  1,987 lines

  1. Subject:  v17i055:  nethack31 - display oriented dungeons & dragons (Ver. 3.1), Patch1n/31
  2. Newsgroups: comp.sources.games
  3. Approved: billr@saab.CNA.TEK.COM
  4.  
  5. Submitted-by: izchak@linc.cis.upenn.edu (Izchak Miller)
  6. Posting-number: Volume 17, Issue 55
  7. Archive-name: nethack31/Patch1n
  8. Patch-To: nethack31: Volume 16, Issue 1-116
  9. Environment: Amiga, Atari, Mac, MS-DOS, Windows-NT, OS2, Unix, VMS, X11
  10.  
  11.  
  12.  
  13. #! /bin/sh
  14. # This is a shell archive.  Remove anything before this line, then unpack
  15. # it by saving it into a file and typing "sh file".  To overwrite existing
  16. # files, type "sh file -c".  You can also feed this as standard input via
  17. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  18. # will see the following message at the end:
  19. #        "End of archive 14 (of 31)."
  20. # Contents:  patches01g sys/winnt/nhico.uu
  21. # Wrapped by billr@saab on Fri Mar  5 10:50:45 1993
  22. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  23. if test -f 'patches01g' -a "${1}" != "-c" ; then 
  24.   echo shar: Renaming existing file \"'patches01g'\" to \"'patches01g.orig'\"
  25.   mv -f 'patches01g' 'patches01g.orig'
  26. fi
  27. echo shar: Extracting \"'patches01g'\" \(52954 characters\)
  28. sed "s/^X//" >'patches01g' <<'END_OF_FILE'
  29. X*** /tmp/da08437    Thu Feb 25 10:24:27 1993
  30. X--- src/objnam.c    Tue Feb 23 17:03:14 1993
  31. X***************
  32. X*** 1,4 ****
  33. X! /*    SCCS Id: @(#)objnam.c    3.1    92/12/13    */
  34. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  35. X  /* NetHack may be freely redistributed.  See license for details. */
  36. X  
  37. X--- 1,4 ----
  38. X! /*    SCCS Id: @(#)objnam.c    3.1    93/02/12    */
  39. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  40. X  /* NetHack may be freely redistributed.  See license for details. */
  41. X  
  42. X***************
  43. X*** 167,182 ****
  44. X  register struct obj *obj;
  45. X  {
  46. X  #ifdef LINT    /* lint may handle static decl poorly -- static char bufr[]; */
  47. X! char bufr[BUFSZ];
  48. X  #else
  49. X! static char bufr[BUFSZ];
  50. X  #endif
  51. X! register char *buf = &(bufr[PREFIX]);    /* leave room for "17 -3 " */
  52. X! register int typ = obj->otyp;
  53. X! register int nn = objects[typ].oc_name_known;
  54. X! register const char *actualn = OBJ_NAME(objects[typ]);
  55. X! register const char *dn = OBJ_DESCR(objects[typ]);
  56. X! register const char *un = objects[typ].oc_uname;
  57. X  
  58. X      if (pl_character[0] == 'S' && Japanese_item_name(typ))
  59. X          actualn = Japanese_item_name(typ);
  60. X--- 167,182 ----
  61. X  register struct obj *obj;
  62. X  {
  63. X  #ifdef LINT    /* lint may handle static decl poorly -- static char bufr[]; */
  64. X!     char bufr[BUFSZ];
  65. X  #else
  66. X!     static char bufr[BUFSZ];
  67. X  #endif
  68. X!     register char *buf = &(bufr[PREFIX]);    /* leave room for "17 -3 " */
  69. X!     register int typ = obj->otyp;
  70. X!     register int nn = objects[typ].oc_name_known;
  71. X!     register const char *actualn = OBJ_NAME(objects[typ]);
  72. X!     register const char *dn = OBJ_DESCR(objects[typ]);
  73. X!     register const char *un = objects[typ].oc_uname;
  74. X  
  75. X      if (pl_character[0] == 'S' && Japanese_item_name(typ))
  76. X          actualn = Japanese_item_name(typ);
  77. X***************
  78. X*** 385,398 ****
  79. X      default:
  80. X          Sprintf(buf,"glorkum %d %d %d", obj->oclass, typ, obj->spe);
  81. X      }
  82. X!     if(obj->quan != 1L) Strcpy(buf, makeplural(buf));
  83. X  
  84. X!     if(obj->onamelth &&
  85. X!        (!obj->oartifact || !objects[obj->otyp].oc_unique)) {
  86. X          Strcat(buf, " named ");
  87. X          nameit:
  88. X          Strcat(buf, ONAME(obj));
  89. X      }
  90. X      return(buf);
  91. X  }
  92. X  
  93. X--- 385,400 ----
  94. X      default:
  95. X          Sprintf(buf,"glorkum %d %d %d", obj->oclass, typ, obj->spe);
  96. X      }
  97. X!     if (obj->quan != 1L) Strcpy(buf, makeplural(buf));
  98. X  
  99. X!     if (obj->onamelth &&
  100. X!         (!obj->oartifact || !objects[obj->otyp].oc_unique)) {
  101. X          Strcat(buf, " named ");
  102. X          nameit:
  103. X          Strcat(buf, ONAME(obj));
  104. X      }
  105. X+ 
  106. X+     if (!strncmpi(buf, "the ", 4)) buf += 4;
  107. X      return(buf);
  108. X  }
  109. X  
  110. X***************
  111. X*** 487,493 ****
  112. X              Strcat(prefix,
  113. X                     is_rustprone(obj) ? "rusty " :
  114. X                     is_corrodeable(obj) ? "corroded " :
  115. X!                    is_flammable(obj) ? "burnt " : "");
  116. X          } else if (obj->rknown && obj->oerodeproof)
  117. X              Strcat(prefix,
  118. X                     is_rustprone(obj) ? "rustproof " :
  119. X--- 489,495 ----
  120. X              Strcat(prefix,
  121. X                     is_rustprone(obj) ? "rusty " :
  122. X                     is_corrodeable(obj) ? "corroded " :
  123. X!                    is_flammable(obj) ? "burnt " : "eroded ");
  124. X          } else if (obj->rknown && obj->oerodeproof)
  125. X              Strcat(prefix,
  126. X                     is_rustprone(obj) ? "rustproof " :
  127. X***************
  128. X*** 904,910 ****
  129. X  
  130. X      /* same singular and plural */
  131. X      /* note: also swine, trout, grouse */
  132. X!     if ((len >= 7 && !strcmp(spot-6, "samurai")) ||
  133. X  #ifdef TUTTI_FRUTTI
  134. X          (len >= 5 &&
  135. X           (!strcmp(spot-4, "manes") || !strcmp(spot-4, "sheep"))) ||
  136. X--- 906,912 ----
  137. X  
  138. X      /* same singular and plural */
  139. X      /* note: also swine, trout, grouse */
  140. X!     if ((len >= 2 && !strcmp(spot-1, "ai")) || /* samurai, Uruk-hai */
  141. X  #ifdef TUTTI_FRUTTI
  142. X          (len >= 5 &&
  143. X           (!strcmp(spot-4, "manes") || !strcmp(spot-4, "sheep"))) ||
  144. X***************
  145. X*** 971,977 ****
  146. X      }
  147. X  
  148. X      /* Japanese words: plurals are the same as singlar */
  149. X!     if (len == 2 && !strcmp(str, "ya"))
  150. X          goto bottom;
  151. X  
  152. X      /* Default: append an 's' */
  153. X--- 973,980 ----
  154. X      }
  155. X  
  156. X      /* Japanese words: plurals are the same as singlar */
  157. X!     if ((len == 2 && !strcmp(str, "ya")) ||
  158. X!         (len > 2 && !strcmp(spot-2, " ya")))
  159. X          goto bottom;
  160. X  
  161. X      /* Default: append an 's' */
  162. X***************
  163. X*** 1535,1540 ****
  164. X--- 1538,1544 ----
  165. X          p = eos(bp);
  166. X          if(!BSTRCMP(bp, p-8, "fountain")) {
  167. X              levl[u.ux][u.uy].typ = FOUNTAIN;
  168. X+             level.flags.nfountains++;
  169. X              if(!strncmpi(bp, "magic ", 6))
  170. X                  levl[u.ux][u.uy].blessedftn = 1;
  171. X              pline("A %sfountain.",
  172. X***************
  173. X*** 1542,1547 ****
  174. X--- 1546,1560 ----
  175. X              newsym(u.ux, u.uy);
  176. X              return(&zeroobj);
  177. X          }
  178. X+ # ifdef SINKS
  179. X+         if(!BSTRCMP(bp, p-4, "sink")) {
  180. X+             levl[u.ux][u.uy].typ = SINK;
  181. X+             level.flags.nsinks++;
  182. X+             pline("A sink.");
  183. X+             newsym(u.ux, u.uy);
  184. X+             return &zeroobj;
  185. X+         }
  186. X+ # endif
  187. X          if(!BSTRCMP(bp, p-5, "altar")) {
  188. X              aligntyp al;
  189. X  
  190. X***************
  191. X*** 1670,1685 ****
  192. X              typ = SPE_BLANK_PAPER;
  193. X              break;
  194. X          }
  195. X! 
  196. X!     /* venom isn't really an object and can't be wished for; but allow
  197. X!      * wizards to wish for it since it's faster than polymorphing and
  198. X!      * spitting.
  199. X!      */
  200. X!     if(let == VENOM_CLASS)
  201. X  #ifdef WIZARD
  202. X!         if (!wizard)
  203. X  #endif
  204. X!             return((struct obj *)0);
  205. X  
  206. X      if(typ) {
  207. X          otmp = mksobj(typ, TRUE, FALSE);
  208. X--- 1683,1695 ----
  209. X              typ = SPE_BLANK_PAPER;
  210. X              break;
  211. X          }
  212. X!     /* catch any other non-wishable objects */
  213. X!     if (objects[typ].oc_nowish
  214. X  #ifdef WIZARD
  215. X!         && !wizard
  216. X  #endif
  217. X!         )
  218. X!         return((struct obj *)0);
  219. X  
  220. X      if(typ) {
  221. X          otmp = mksobj(typ, TRUE, FALSE);
  222. X***************
  223. X*** 1696,1701 ****
  224. X--- 1706,1712 ----
  225. X  #ifdef WIZARD
  226. X          wizard ||
  227. X  #endif
  228. X+          (cnt <= 7 && Is_candle(otmp)) ||
  229. X           (cnt <= 20 &&
  230. X            ((let == WEAPON_CLASS && typ <= SHURIKEN) || (typ == ROCK)))))
  231. X              otmp->quan = (long) cnt;
  232. X***************
  233. X*** 1858,1863 ****
  234. X--- 1869,1889 ----
  235. X          otmp = oname(otmp, name, 0);
  236. X          if (otmp->oartifact) otmp->quan = 1L;
  237. X      }
  238. X+ 
  239. X+     /* more wishing abuse: don't allow wishing for certain artifacts */
  240. X+     /* and make them pay; charge them for the wish anyway! */
  241. X+     if ((is_quest_artifact(otmp) || 
  242. X+          (otmp->oartifact && rn2(nartifact_exist()) > 1))
  243. X+ # ifdef WIZARD
  244. X+         && !wizard
  245. X+ # endif
  246. X+         ) {
  247. X+         artifact_unexist(otmp);
  248. X+         obfree(otmp, (struct obj *) 0);
  249. X+         otmp = &zeroobj;
  250. X+         pline("For a moment, you feel something in your %s, but it disappears!", makeplural(body_part(HAND)));
  251. X+     }
  252. X+     
  253. X      otmp->owt = weight(otmp);
  254. X      if (very && otmp->otyp == HEAVY_IRON_BALL) otmp->owt += 160;
  255. X      if (halfeaten && otmp->oclass == FOOD_CLASS) {
  256. X*** /tmp/da08445    Thu Feb 25 10:24:31 1993
  257. X--- src/options.c    Mon Feb 22 11:02:49 1993
  258. X***************
  259. X*** 1,4 ****
  260. X! /*    SCCS Id: @(#)options.c    3.1    92/11/14    */
  261. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  262. X  /* NetHack may be freely redistributed.  See license for details. */
  263. X  
  264. X--- 1,4 ----
  265. X! /*    SCCS Id: @(#)options.c    3.1    93/02/19    */
  266. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  267. X  /* NetHack may be freely redistributed.  See license for details. */
  268. X  
  269. X***************
  270. X*** 9,15 ****
  271. X  /*
  272. X   *  NOTE:  If you add (or delete) an option, please update the short
  273. X   *  options help (option_help()), the long options help (dat/opthelp),
  274. X!  *  and the current options setting display function (doset()).
  275. X   */
  276. X  
  277. X  #if defined(TOS) && defined(TEXTCOLOR)
  278. X--- 9,16 ----
  279. X  /*
  280. X   *  NOTE:  If you add (or delete) an option, please update the short
  281. X   *  options help (option_help()), the long options help (dat/opthelp),
  282. X!  *  and the current options setting display function (doset()),
  283. X!  *  and also the Guidebooks.
  284. X   */
  285. X  
  286. X  #if defined(TOS) && defined(TEXTCOLOR)
  287. X***************
  288. X*** 20,33 ****
  289. X  extern char inv_order[];    /* from invent.c */
  290. X  
  291. X  static boolean initial, from_file;
  292. X- static boolean NEARDATA set_order;
  293. X  
  294. X  static void FDECL(nmcpy, (char *, const char *, int));
  295. X  static void FDECL(escapes, (const char *, char *));
  296. X  static void FDECL(rejectoption, (const char *));
  297. X  static void FDECL(badoption, (const char *));
  298. X  static char *FDECL(string_for_env_opt, (const char *, char *));
  299. X! static int FDECL(change_inv_order, (char *, int));
  300. X  static void FDECL(oc_to_str, (char *, char *));
  301. X  
  302. X  static struct Bool_Opt
  303. X--- 21,34 ----
  304. X  extern char inv_order[];    /* from invent.c */
  305. X  
  306. X  static boolean initial, from_file;
  307. X  
  308. X  static void FDECL(nmcpy, (char *, const char *, int));
  309. X  static void FDECL(escapes, (const char *, char *));
  310. X  static void FDECL(rejectoption, (const char *));
  311. X  static void FDECL(badoption, (const char *));
  312. X+ static char *FDECL(string_for_opt, (char *));
  313. X  static char *FDECL(string_for_env_opt, (const char *, char *));
  314. X! static int FDECL(change_inv_order, (char *));
  315. X  static void FDECL(oc_to_str, (char *, char *));
  316. X  
  317. X  static struct Bool_Opt
  318. X***************
  319. X*** 72,78 ****
  320. X      {"legacy",&flags.legacy, TRUE},
  321. X      {"lit_corridor", &flags.lit_corridor, FALSE},
  322. X  #ifdef MAC_GRAPHICS_ENV
  323. X!     {"MACgraphics", &flags.MACgraphics, TRUE},
  324. X  #endif
  325. X  #ifdef NEWS
  326. X      {"news", &flags.news, TRUE},
  327. X--- 73,79 ----
  328. X      {"legacy",&flags.legacy, TRUE},
  329. X      {"lit_corridor", &flags.lit_corridor, FALSE},
  330. X  #ifdef MAC_GRAPHICS_ENV
  331. X!     {"Macgraphics", &flags.MACgraphics, TRUE},
  332. X  #endif
  333. X  #ifdef NEWS
  334. X      {"news", &flags.news, TRUE},
  335. X***************
  336. X*** 79,84 ****
  337. X--- 80,88 ----
  338. X  #endif
  339. X      {"null", &flags.null, TRUE},
  340. X      {"number_pad", &flags.num_pad, FALSE},
  341. X+ #ifdef MAC
  342. X+     {"page_wait", &flags.page_wait, TRUE},
  343. X+ #endif
  344. X      {"pickup", &flags.pickup, TRUE},
  345. X  #ifdef MAC
  346. X      {"popup_dialog", &flags.popup_dialog, FALSE},
  347. X***************
  348. X*** 87,93 ****
  349. X      {"rawio", &flags.rawio, FALSE},
  350. X  #endif
  351. X      {"rest_on_space", &flags.rest_on_space, FALSE},
  352. X!     {"safepet", &flags.safe_dog, TRUE},
  353. X  #ifdef EXP_ON_BOTL
  354. X      {"showexp", &flags.showexp, FALSE},
  355. X  #endif
  356. X--- 91,97 ----
  357. X      {"rawio", &flags.rawio, FALSE},
  358. X  #endif
  359. X      {"rest_on_space", &flags.rest_on_space, FALSE},
  360. X!     {"safe_pet", &flags.safe_dog, TRUE},
  361. X  #ifdef EXP_ON_BOTL
  362. X      {"showexp", &flags.showexp, FALSE},
  363. X  #endif
  364. X***************
  365. X*** 129,135 ****
  366. X              monsyms[i] = (uchar) def_monsyms[i];
  367. X  
  368. X      switch_graphics(ASCII_GRAPHICS);    /* set default characters */
  369. X! #ifdef UNIX
  370. X      /*
  371. X       * Set defaults for some options depending on what we can
  372. X       * detect about the environment's capabilities.
  373. X--- 133,139 ----
  374. X              monsyms[i] = (uchar) def_monsyms[i];
  375. X  
  376. X      switch_graphics(ASCII_GRAPHICS);    /* set default characters */
  377. X! #if defined(UNIX) && defined(TTY_GRAPHICS)
  378. X      /*
  379. X       * Set defaults for some options depending on what we can
  380. X       * detect about the environment's capabilities.
  381. X***************
  382. X*** 144,156 ****
  383. X          flags.use_color = TRUE;
  384. X  # endif
  385. X      }
  386. X! #endif /* UNIX */
  387. X  #if defined(UNIX) || defined(VMS)
  388. X      /* detect whether a "vt" terminal can handle alternate charsets */
  389. X      if (!strncmpi(getenv("TERM"), "vt", 2) && (AS && AE) &&
  390. X          !strcmp(AS, "\016") && !strcmp(AE, "\017")) {
  391. X          switch_graphics(DEC_GRAPHICS);
  392. X      }
  393. X  #endif /* UNIX || VMS */
  394. X  
  395. X  #ifdef MAC_GRAPHICS_ENV
  396. X--- 148,162 ----
  397. X          flags.use_color = TRUE;
  398. X  # endif
  399. X      }
  400. X! #endif /* UNIX && TTY_GRAPHICS */
  401. X  #if defined(UNIX) || defined(VMS)
  402. X+ # ifdef TTY_GRAPHICS
  403. X      /* detect whether a "vt" terminal can handle alternate charsets */
  404. X      if (!strncmpi(getenv("TERM"), "vt", 2) && (AS && AE) &&
  405. X          !strcmp(AS, "\016") && !strcmp(AE, "\017")) {
  406. X          switch_graphics(DEC_GRAPHICS);
  407. X      }
  408. X+ # endif
  409. X  #endif /* UNIX || VMS */
  410. X  
  411. X  #ifdef MAC_GRAPHICS_ENV
  412. X***************
  413. X*** 186,192 ****
  414. X      /* result in the player's preferred fruit [better than "\033"].    */
  415. X      obj_descr[SLIME_MOLD].oc_name = "fruit";
  416. X  #endif
  417. X!     if(flags.female)  {    /* should have been set in NETHACKOPTIONS */
  418. X          roles[2] = "Cavewoman";
  419. X          roles[6] = "Priestess";
  420. X      }
  421. X--- 192,198 ----
  422. X      /* result in the player's preferred fruit [better than "\033"].    */
  423. X      obj_descr[SLIME_MOLD].oc_name = "fruit";
  424. X  #endif
  425. X!     if (flags.female)  {    /* should have been set in NETHACKOPTIONS */
  426. X          roles[2] = "Cavewoman";
  427. X          roles[6] = "Priestess";
  428. X      }
  429. X***************
  430. X*** 292,302 ****
  431. X  badoption(opts)
  432. X  const char *opts;
  433. X  {
  434. X!     if(!initial) {
  435. X!         if(!strncmp(opts, "h", 1) || !strncmp(opts, "?", 1))
  436. X          option_help();
  437. X          else
  438. X!         pline("Unknown option: %s.  Enter \"?g\" for help.", opts);
  439. X          return;
  440. X      }
  441. X  # ifdef AMIGA
  442. X--- 298,308 ----
  443. X  badoption(opts)
  444. X  const char *opts;
  445. X  {
  446. X!     if (!initial) {
  447. X!         if (!strncmp(opts, "h", 1) || !strncmp(opts, "?", 1))
  448. X          option_help();
  449. X          else
  450. X!         pline("Bad syntax: %s.  Enter \"?g\" for help.", opts);
  451. X          return;
  452. X      }
  453. X  # ifdef AMIGA
  454. X***************
  455. X*** 313,329 ****
  456. X  }
  457. X  
  458. X  static char *
  459. X! string_for_env_opt(optname, opts)
  460. X! const char *optname;
  461. X  char *opts;
  462. X  {
  463. X      register char *colon;
  464. X  
  465. X!     if(!initial) {
  466. X!         rejectoption(optname);
  467. X!         return NULL;
  468. X!     }
  469. X!     colon = index(opts,':');
  470. X      if(!colon) {
  471. X          badoption(opts);
  472. X          return NULL;
  473. X--- 319,330 ----
  474. X  }
  475. X  
  476. X  static char *
  477. X! string_for_opt(opts)
  478. X  char *opts;
  479. X  {
  480. X      register char *colon;
  481. X  
  482. X!     colon = index(opts, ':');
  483. X      if(!colon) {
  484. X          badoption(opts);
  485. X          return NULL;
  486. X***************
  487. X*** 331,351 ****
  488. X      return ++colon;
  489. X  }
  490. X  
  491. X  /*
  492. X   * Change the inventory order, using the given string as the new order.
  493. X   * Missing characters in the new order are filled in at the end from
  494. X   * the current inv_order.
  495. X   *
  496. X!  * This routine always returns 1 unless the parameter 'fail' is true
  497. X!  * and there is a duplicate or bad char in the string.
  498. X   */
  499. X  static int
  500. X! change_inv_order(op, fail)
  501. X!     char *op;
  502. X!     int  fail;    /* If TRUE, return 0 if any duplicates or bad chars. */
  503. X  {
  504. X      int oc_sym, num;
  505. X!     char *sp, *tmp, buf[BUFSZ];
  506. X  
  507. X      for (sp = op; *sp; sp++) {
  508. X      oc_sym = def_char_to_objclass(*sp);
  509. X--- 332,363 ----
  510. X      return ++colon;
  511. X  }
  512. X  
  513. X+ static char *
  514. X+ string_for_env_opt(optname, opts)
  515. X+ const char *optname;
  516. X+ char *opts;
  517. X+ {
  518. X+     if(!initial) {
  519. X+         rejectoption(optname);
  520. X+         return NULL;
  521. X+     }
  522. X+     return string_for_opt(opts);
  523. X+ }
  524. X+ 
  525. X  /*
  526. X   * Change the inventory order, using the given string as the new order.
  527. X   * Missing characters in the new order are filled in at the end from
  528. X   * the current inv_order.
  529. X   *
  530. X!  * This routine returns 1 unless there is a duplicate or bad char in
  531. X!  * the string.
  532. X   */
  533. X  static int
  534. X! change_inv_order(op)
  535. X! char *op;
  536. X  {
  537. X      int oc_sym, num;
  538. X!     char *sp, buf[BUFSZ];
  539. X  
  540. X      for (sp = op; *sp; sp++) {
  541. X      oc_sym = def_char_to_objclass(*sp);
  542. X***************
  543. X*** 352,365 ****
  544. X  
  545. X      /* Remove bad or duplicate entries. */
  546. X      if (oc_sym == MAXOCLASSES ||
  547. X!         (!index(inv_order, oc_sym)) || (index(sp+1, *sp))) {
  548. X  
  549. X!         if (fail) return 0;
  550. X!         for(tmp = sp; *tmp; tmp++)
  551. X!         tmp[0] = tmp[1];
  552. X!         sp--;
  553. X!     } else
  554. X!         *sp = (char) oc_sym;
  555. X      } 
  556. X      Strcpy(buf, op);
  557. X      for (sp = inv_order, num = strlen(buf); *sp; sp++)
  558. X--- 364,374 ----
  559. X  
  560. X      /* Remove bad or duplicate entries. */
  561. X      if (oc_sym == MAXOCLASSES ||
  562. X!         (!index(inv_order, oc_sym)) || (index(sp+1, *sp)))
  563. X  
  564. X!         return 0;
  565. X! 
  566. X!     *sp = (char) oc_sym;
  567. X      } 
  568. X      Strcpy(buf, op);
  569. X      for (sp = inv_order, num = strlen(buf); *sp; sp++)
  570. X***************
  571. X*** 393,489 ****
  572. X      op = eos(opts);
  573. X      while (--op >= opts && isspace(*op)) *op = '\0';
  574. X  
  575. X!     if(!*opts) return;
  576. X      negated = FALSE;
  577. X!     while((*opts == '!') || !strncmpi(opts, "no", 2)) {
  578. X!         if(*opts == '!') opts++; else opts += 2;
  579. X          negated = !negated;
  580. X      }
  581. X      
  582. X! #if defined(MICRO) && !defined(AMIGA)
  583. X!     /* included for compatibility with old NetHack.cnf files */
  584. X!     if (!strncmp(opts, "IBM_", 4)) {
  585. X!         flags.BIOS = !negated;
  586. X!         return;
  587. X!     }
  588. X  
  589. X!     /* put here cause it has to come from the config file */
  590. X!     if (!strncmpi(opts, "raw", 3)) {
  591. X!         if (initial)
  592. X!             flags.rawio = !negated;
  593. X!         else
  594. X!             rejectoption("rawio");
  595. X!         return;
  596. X!     }
  597. X! #endif /* MICRO */
  598. X! 
  599. X! #if defined(TOS) && defined(TEXTCOLOR)
  600. X!     if (!strncmpi(opts, "col", 3)) {
  601. X!         flags.use_color = !negated;
  602. X!         if (flags.BIOS && !initial) {
  603. X!             if (colors_changed)
  604. X!                 restore_colors();
  605. X!             else
  606. X!                 set_colors();
  607. X!         }
  608. X!     }
  609. X! #endif
  610. X!     /* other special-case boolean options */
  611. X! #ifdef TERMLIB
  612. X!     if (!strncmpi(opts, "DEC", 3)) {
  613. X! #ifdef REINCARNATION
  614. X!         if (!initial && Is_rogue_level(&u.uz))
  615. X!             assign_rogue_graphics(FALSE);
  616. X! #endif
  617. X!         flags.DECgraphics = !negated;
  618. X!         need_redraw = TRUE;
  619. X!         switch_graphics(flags.DECgraphics ?
  620. X!                 DEC_GRAPHICS : ASCII_GRAPHICS);
  621. X! #ifdef REINCARNATION
  622. X!         if (!initial && Is_rogue_level(&u.uz))
  623. X!             assign_rogue_graphics(TRUE);
  624. X! #endif
  625. X!         return;
  626. X!     }
  627. X! #endif /* TERMLIB */
  628. X! #ifdef ASCIIGRAPH
  629. X!     if (!strncmpi(opts, "IBMg", 4)) {
  630. X! #ifdef REINCARNATION
  631. X!         if (!initial && Is_rogue_level(&u.uz))
  632. X!             assign_rogue_graphics(FALSE);
  633. X! #endif
  634. X!         flags.IBMgraphics = !negated;
  635. X!         need_redraw = TRUE;
  636. X!         switch_graphics(flags.IBMgraphics ?
  637. X!                 IBM_GRAPHICS : ASCII_GRAPHICS);
  638. X! #ifdef REINCARNATION
  639. X!         if (!initial && Is_rogue_level(&u.uz))
  640. X!             assign_rogue_graphics(TRUE);
  641. X! #endif
  642. X!         return;
  643. X!     }
  644. X! #endif /* ASCIIGRAPH */
  645. X! #ifdef MAC_GRAPHICS_ENV
  646. X!     if (!strncmpi(opts, "MACg", 4)) {
  647. X! #ifdef REINCARNATION
  648. X!         if (!initial && Is_rogue_level(&u.uz))
  649. X!             assign_rogue_graphics(FALSE);
  650. X! #endif
  651. X!         flags.MACgraphics = !negated;
  652. X!         need_redraw = TRUE;
  653. X!         switch_graphics(flags.MACgraphics ?
  654. X!                 MAC_GRAPHICS : ASCII_GRAPHICS);
  655. X! #ifdef REINCARNATION
  656. X!         if (!initial && Is_rogue_level(&u.uz))
  657. X!             assign_rogue_graphics(TRUE);
  658. X! #endif
  659. X!         return;
  660. X!     }
  661. X! #endif /* MAC_GRAPHICS_ENV */
  662. X! 
  663. X!     /* common boolean options */
  664. X! 
  665. X!     if (!strncmpi(opts, "fem", 3)) {
  666. X          if(!initial && flags.female == negated)
  667. X              pline("That is not anatomically possible.");
  668. X          else
  669. X--- 402,417 ----
  670. X      op = eos(opts);
  671. X      while (--op >= opts && isspace(*op)) *op = '\0';
  672. X  
  673. X!     if (!*opts) return;
  674. X      negated = FALSE;
  675. X!     while ((*opts == '!') || !strncmpi(opts, "no", 2)) {
  676. X!         if (*opts == '!') opts++; else opts += 2;
  677. X          negated = !negated;
  678. X      }
  679. X      
  680. X!     /* special boolean options */
  681. X  
  682. X!     if (!strncmpi(opts, "female", 3)) {
  683. X          if(!initial && flags.female == negated)
  684. X              pline("That is not anatomically possible.");
  685. X          else
  686. X***************
  687. X*** 491,502 ****
  688. X          return;
  689. X      }
  690. X  
  691. X-     if (!strncmpi(opts, "fix", 3)) {
  692. X-         flags.invlet_constant = !negated;
  693. X-         if (!initial && flags.invlet_constant) reassign();
  694. X-         return;
  695. X-     }
  696. X- 
  697. X      if (!strncmpi(opts, "male", 4)) {
  698. X          if(!initial && flags.female != negated)
  699. X              pline("That is not anatomically possible.");
  700. X--- 419,424 ----
  701. X***************
  702. X*** 505,544 ****
  703. X          return;
  704. X      }
  705. X  
  706. X!     if (!strncmpi(opts, "num", 3)) {
  707. X!         flags.num_pad = !negated;
  708. X!         if (!initial) number_pad(flags.num_pad ? 1 : 0);
  709. X          return;
  710. X      }
  711. X! #ifdef EXP_ON_BOTL
  712. X!     if (!strncmpi(opts, "showexp", 7)) {
  713. X!         flags.showexp = !negated;
  714. X!         flags.botl = 1;
  715. X!         return;
  716. X!     }
  717. X! #endif
  718. X! #ifdef SCORE_ON_BOTL
  719. X!     if (!strncmpi(opts, "showscore", 9)) {
  720. X!         flags.showscore = !negated;
  721. X!         flags.botl = 1;
  722. X!         return;
  723. X!     }
  724. X! #endif
  725. X!     if (!strncmpi(opts, "time", 4)) {
  726. X!         flags.time = !negated;
  727. X!         flags.botl = 1;
  728. X!         return;
  729. X!     }
  730. X  
  731. X-     if (!strncmpi(opts, "legacy", 6)) {
  732. X-             if(!initial) rejectoption("legacy");
  733. X-         else flags.legacy = !negated;
  734. X-         return;
  735. X-     }
  736. X- 
  737. X      /* compound options */
  738. X  
  739. X!     if (!strncmpi(opts, "pet", 3)) {
  740. X          if ((op = string_for_env_opt("pettype", opts)) != 0)
  741. X              switch (*op) {
  742. X              case 'd':    /* dog */
  743. X--- 427,443 ----
  744. X          return;
  745. X      }
  746. X  
  747. X! #if defined(MICRO) && !defined(AMIGA)
  748. X!     /* included for compatibility with old NetHack.cnf files */
  749. X!     if (!strncmp(opts, "IBM_", 4)) {
  750. X!         flags.BIOS = !negated;
  751. X          return;
  752. X      }
  753. X! #endif /* MICRO */
  754. X  
  755. X      /* compound options */
  756. X  
  757. X!     if (!strncmpi(opts, "pettype", 3)) {
  758. X          if ((op = string_for_env_opt("pettype", opts)) != 0)
  759. X              switch (*op) {
  760. X              case 'd':    /* dog */
  761. X***************
  762. X*** 552,576 ****
  763. X                  preferred_pet = 'c';
  764. X                  break;
  765. X              default:
  766. X!                 pline("Unrecognized pettype '%s'", op);
  767. X                  break;
  768. X              }
  769. X          return;
  770. X      }
  771. X  
  772. X!     if (!strncmpi(opts, "cat", 3)) {
  773. X          if ((op = string_for_env_opt("catname", opts)) != 0)
  774. X              nmcpy(catname, op, 62);
  775. X          return;
  776. X      }
  777. X  
  778. X!     if (!strncmpi(opts, "dog", 3)) {
  779. X          if ((op = string_for_env_opt("dogname", opts)) != 0)
  780. X              nmcpy(dogname, op, 62);
  781. X          return;
  782. X      }
  783. X  
  784. X!     if (!strncmpi(opts, "msg", 3)) {
  785. X          if ((op = string_for_env_opt("msghistory", opts)) != 0) {
  786. X              flags.msg_history = atoi(op);
  787. X          }
  788. X--- 451,475 ----
  789. X                  preferred_pet = 'c';
  790. X                  break;
  791. X              default:
  792. X!                 pline("Unrecognized pet type '%s'", op);
  793. X                  break;
  794. X              }
  795. X          return;
  796. X      }
  797. X  
  798. X!     if (!strncmpi(opts, "catname", 3)) {
  799. X          if ((op = string_for_env_opt("catname", opts)) != 0)
  800. X              nmcpy(catname, op, 62);
  801. X          return;
  802. X      }
  803. X  
  804. X!     if (!strncmpi(opts, "dogname", 3)) {
  805. X          if ((op = string_for_env_opt("dogname", opts)) != 0)
  806. X              nmcpy(dogname, op, 62);
  807. X          return;
  808. X      }
  809. X  
  810. X!     if (!strncmpi(opts, "msghistory", 3)) {
  811. X          if ((op = string_for_env_opt("msghistory", opts)) != 0) {
  812. X              flags.msg_history = atoi(op);
  813. X          }
  814. X***************
  815. X*** 577,598 ****
  816. X          return;
  817. X      }
  818. X  #ifdef TUTTI_FRUTTI
  819. X!     if (!strncmpi(opts, "fr", 2)) {
  820. X!         op = index(opts, ':');
  821. X!         if (!op) {
  822. X!             badoption(opts);
  823. X!             return;
  824. X!         }
  825. X!         op++;
  826. X          if (!initial) {
  827. X              struct fruit *f;
  828. X-             int numfruits = 0;
  829. X  
  830. X              for(f=ffruit; f; f=f->nextf) {
  831. X              if (!strcmp(op, f->fname)) goto goodfruit;
  832. X!             numfruits++;
  833. X              }
  834. X!             if (numfruits >= 100) {
  835. X              pline("Doing that so many times isn't very fruitful.");
  836. X              return;
  837. X              }
  838. X--- 476,492 ----
  839. X          return;
  840. X      }
  841. X  #ifdef TUTTI_FRUTTI
  842. X!     if (!strncmpi(opts, "fruit", 2)) {
  843. X!         if (!(op = string_for_opt(opts))) return;
  844. X          if (!initial) {
  845. X              struct fruit *f;
  846. X  
  847. X+             num = 0;
  848. X              for(f=ffruit; f; f=f->nextf) {
  849. X              if (!strcmp(op, f->fname)) goto goodfruit;
  850. X!             num++;
  851. X              }
  852. X!             if (num >= 100) {
  853. X              pline("Doing that so many times isn't very fruitful.");
  854. X              return;
  855. X              }
  856. X***************
  857. X*** 612,637 ****
  858. X      }
  859. X  #endif
  860. X      /* graphics:string */
  861. X!     if (!strncmpi(opts, "gr", 2)) {
  862. X          uchar translate[MAXPCHARS+1];
  863. X!         int lth;
  864. X  
  865. X          if (!(opts = string_for_env_opt("graphics", opts)))
  866. X              return;
  867. X          escapes(opts, opts);
  868. X  
  869. X!         lth = strlen(opts);
  870. X!         if (lth > MAXPCHARS) lth = MAXPCHARS;
  871. X          /* match the form obtained from PC configuration files */
  872. X!         for (i = 0; i < lth; i++)
  873. X              translate[i] = (uchar) opts[i];
  874. X!         assign_graphics(translate, lth);
  875. X          return;
  876. X      }
  877. X  
  878. X      /* objects:string */
  879. X      if (!strncmpi(opts, "objects", 7)) {
  880. X!         int k, length;
  881. X  
  882. X          if (!(opts = string_for_env_opt("objects", opts)))
  883. X              return;
  884. X--- 506,531 ----
  885. X      }
  886. X  #endif
  887. X      /* graphics:string */
  888. X!     if (!strncmpi(opts, "graphics", 2)) {
  889. X          uchar translate[MAXPCHARS+1];
  890. X!         int length;
  891. X  
  892. X          if (!(opts = string_for_env_opt("graphics", opts)))
  893. X              return;
  894. X          escapes(opts, opts);
  895. X  
  896. X!         length = strlen(opts);
  897. X!         if (length > MAXPCHARS) length = MAXPCHARS;
  898. X          /* match the form obtained from PC configuration files */
  899. X!         for (i = 0; i < length; i++)
  900. X              translate[i] = (uchar) opts[i];
  901. X!         assign_graphics(translate, length);
  902. X          return;
  903. X      }
  904. X  
  905. X      /* objects:string */
  906. X      if (!strncmpi(opts, "objects", 7)) {
  907. X!         int length;
  908. X  
  909. X          if (!(opts = string_for_env_opt("objects", opts)))
  910. X              return;
  911. X***************
  912. X*** 650,663 ****
  913. X          if (length >= MAXOCLASSES)
  914. X              length = MAXOCLASSES-1;    /* don't count RANDOM_OBJECT */
  915. X  
  916. X!         for (k = 0; k < length; k++)
  917. X!             oc_syms[k+1] = (uchar) opts[k];
  918. X          return;
  919. X      }
  920. X  
  921. X      /* monsters:string */
  922. X      if (!strncmpi(opts, "monsters", 8)) {
  923. X!         int k, length;
  924. X  
  925. X          if (!(opts = string_for_env_opt("monsters", opts)))
  926. X              return;
  927. X--- 544,557 ----
  928. X          if (length >= MAXOCLASSES)
  929. X              length = MAXOCLASSES-1;    /* don't count RANDOM_OBJECT */
  930. X  
  931. X!         for (i = 0; i < length; i++)
  932. X!             oc_syms[i+1] = (uchar) opts[i];
  933. X          return;
  934. X      }
  935. X  
  936. X      /* monsters:string */
  937. X      if (!strncmpi(opts, "monsters", 8)) {
  938. X!         int length;
  939. X  
  940. X          if (!(opts = string_for_env_opt("monsters", opts)))
  941. X              return;
  942. X***************
  943. X*** 668,675 ****
  944. X          if (length >= MAXMCLASSES)
  945. X              length = MAXMCLASSES-1;    /* mon class 0 unused */
  946. X  
  947. X!         for (k = 0; k < length; k++)
  948. X!             monsyms[k+1] = (uchar) opts[k];
  949. X          return;
  950. X      }
  951. X  
  952. X--- 562,569 ----
  953. X          if (length >= MAXMCLASSES)
  954. X              length = MAXMCLASSES-1;    /* mon class 0 unused */
  955. X  
  956. X!         for (i = 0; i < length; i++)
  957. X!             monsyms[i+1] = (uchar) opts[i];
  958. X          return;
  959. X      }
  960. X  
  961. X***************
  962. X*** 681,697 ****
  963. X      }
  964. X  
  965. X      /* the order to list the pack */
  966. X!     if (!strncmpi(opts, "pack", 4)) {
  967. X!         op = index(opts,':');
  968. X!         if(!op) {
  969. X!             badoption(opts);
  970. X!             return;
  971. X!         }
  972. X!         op++;            /* skip : */
  973. X  
  974. X!         if (!change_inv_order(op, 1))
  975. X!                 set_order = TRUE;
  976. X!         else
  977. X                  badoption(opts);
  978. X          return;
  979. X      }
  980. X--- 575,584 ----
  981. X      }
  982. X  
  983. X      /* the order to list the pack */
  984. X!     if (!strncmpi(opts, "packorder", 4)) {
  985. X!         if (!(op = string_for_opt(opts))) return;
  986. X  
  987. X!         if (!change_inv_order(op))
  988. X                  badoption(opts);
  989. X          return;
  990. X      }
  991. X***************
  992. X*** 698,710 ****
  993. X  
  994. X      /* scores:5t[op] 5a[round] o[wn] */
  995. X      if (!strncmpi(opts, "scores", 6)) {
  996. X!         op = index(opts,':');
  997. X!         if(!op) {
  998. X!             badoption(opts);
  999. X!             return;
  1000. X!         }
  1001. X!         op++;
  1002. X!         while(*op) {
  1003. X              num = 1;
  1004. X              if(digit(*op)) {
  1005. X                  num = atoi(op);
  1006. X--- 585,593 ----
  1007. X  
  1008. X      /* scores:5t[op] 5a[round] o[wn] */
  1009. X      if (!strncmpi(opts, "scores", 6)) {
  1010. X!         if (!(op = string_for_opt(opts))) return;
  1011. X! 
  1012. X!         while (*op) {
  1013. X              num = 1;
  1014. X              if(digit(*op)) {
  1015. X                  num = atoi(op);
  1016. X***************
  1017. X*** 737,743 ****
  1018. X          }
  1019. X          return;
  1020. X      }
  1021. X!     if (!strncmpi(opts, "win", 3)) {
  1022. X          if ((op = string_for_env_opt("windowtype", opts)) != 0) {
  1023. X          char buf[16];
  1024. X          nmcpy(buf, op, 15);
  1025. X--- 620,627 ----
  1026. X          }
  1027. X          return;
  1028. X      }
  1029. X! 
  1030. X!     if (!strncmpi(opts, "windowtype", 3)) {
  1031. X          if ((op = string_for_env_opt("windowtype", opts)) != 0) {
  1032. X          char buf[16];
  1033. X          nmcpy(buf, op, 15);
  1034. X***************
  1035. X*** 750,765 ****
  1036. X       * options list
  1037. X       */
  1038. X      for (i = 0; boolopt[i].name; i++) {
  1039. X!         if (boolopt[i].addr && !strncmpi(boolopt[i].name, opts, 3)) {
  1040. X              *(boolopt[i].addr) = !negated;
  1041. X- #ifdef TEXTCOLOR
  1042. X-             if((boolopt[i].addr) == &flags.use_color)
  1043. X-                 need_redraw = TRUE;
  1044. X  
  1045. X!             if((boolopt[i].addr) == &flags.hilite_pet)
  1046. X                  need_redraw = TRUE;
  1047. X  #endif
  1048. X!             if (!initial && boolopt[i].addr==&flags.lit_corridor) {
  1049. X                  /*
  1050. X                   * All corridor squares seen via night vision or
  1051. X                   * candles & lamps change.  Update them by calling
  1052. X--- 634,714 ----
  1053. X       * options list
  1054. X       */
  1055. X      for (i = 0; boolopt[i].name; i++) {
  1056. X!         if (boolopt[i].addr && strlen(opts) >= 3 &&
  1057. X!             !strncmpi(boolopt[i].name, opts, strlen(opts))) {
  1058. X!                 /* options that must come from config file */
  1059. X!             if (!initial &&
  1060. X!                 ((boolopt[i].addr) == &flags.legacy
  1061. X! #if defined(MICRO) && !defined(AMIGA)
  1062. X!               || (boolopt[i].addr) == &flags.rawio
  1063. X! #endif
  1064. X!                  )) {
  1065. X!                 rejectoption(boolopt[i].name);
  1066. X!                 return;
  1067. X!             }
  1068. X! 
  1069. X              *(boolopt[i].addr) = !negated;
  1070. X  
  1071. X! #if defined(TERMLIB) || defined(ASCIIGRAPH) || defined(MAC_GRAPHICS_ENV)
  1072. X!             if (FALSE
  1073. X! # ifdef TERMLIB
  1074. X!                  || (boolopt[i].addr) == &flags.DECgraphics
  1075. X! # endif
  1076. X! # ifdef ASCIIGRAPH
  1077. X!                  || (boolopt[i].addr) == &flags.IBMgraphics
  1078. X! # endif
  1079. X! # ifdef MAC_GRAPHICS_ENV
  1080. X!                  || (boolopt[i].addr) == &flags.MACgraphics
  1081. X! # endif
  1082. X!                 ) {
  1083. X! # ifdef REINCARNATION
  1084. X!                 if (!initial && Is_rogue_level(&u.uz))
  1085. X!                 assign_rogue_graphics(FALSE);
  1086. X! # endif
  1087. X                  need_redraw = TRUE;
  1088. X+ # ifdef TERMLIB
  1089. X+                 if ((boolopt[i].addr) == &flags.DECgraphics)
  1090. X+                 switch_graphics(flags.DECgraphics ?
  1091. X+                         DEC_GRAPHICS : ASCII_GRAPHICS);
  1092. X+ # endif
  1093. X+ # ifdef ASCIIGRAPH
  1094. X+                 if ((boolopt[i].addr) == &flags.IBMgraphics)
  1095. X+                 switch_graphics(flags.IBMgraphics ?
  1096. X+                         IBM_GRAPHICS : ASCII_GRAPHICS);
  1097. X+ # endif
  1098. X+ # ifdef MAC_GRAPHICS_ENV
  1099. X+                 if ((boolopt[i].addr) == &flags.MACgraphics)
  1100. X+                 switch_graphics(flags.MACgraphics ?
  1101. X+                         MAC_GRAPHICS : ASCII_GRAPHICS);
  1102. X+ # endif
  1103. X+ # ifdef REINCARNATION
  1104. X+                 if (!initial && Is_rogue_level(&u.uz))
  1105. X+                 assign_rogue_graphics(TRUE);
  1106. X+ # endif
  1107. X+             }
  1108. X+ #endif /* TERMLIB || ASCIIGRAPH || MAC_GRAPHICS_ENV */
  1109. X+ 
  1110. X+             /* only do processing below if setting with doset() */
  1111. X+             if (initial) return;
  1112. X+ 
  1113. X+             if ((boolopt[i].addr) == &flags.time
  1114. X+ #ifdef EXP_ON_BOTL
  1115. X+              || (boolopt[i].addr) == &flags.showexp
  1116. X  #endif
  1117. X! #ifdef SCORE_ON_BOTL
  1118. X!              || (boolopt[i].addr) == &flags.showscore
  1119. X! #endif
  1120. X!                 )
  1121. X!                 flags.botl = TRUE;
  1122. X! 
  1123. X!             else if ((boolopt[i].addr) == &flags.invlet_constant) {
  1124. X!                 if (flags.invlet_constant) reassign();
  1125. X!             }
  1126. X! 
  1127. X!             else if ((boolopt[i].addr) == &flags.num_pad)
  1128. X!                 number_pad(flags.num_pad ? 1 : 0);
  1129. X! 
  1130. X!             else if ((boolopt[i].addr) == &flags.lit_corridor) {
  1131. X                  /*
  1132. X                   * All corridor squares seen via night vision or
  1133. X                   * candles & lamps change.  Update them by calling
  1134. X***************
  1135. X*** 770,775 ****
  1136. X--- 719,741 ----
  1137. X                  vision_recalc(2);        /* shut down vision */
  1138. X                  vision_full_recalc = 1;    /* delayed recalc */
  1139. X              }
  1140. X+ 
  1141. X+ #ifdef TEXTCOLOR
  1142. X+             else if ((boolopt[i].addr) == &flags.use_color
  1143. X+                   || (boolopt[i].addr) == &flags.hilite_pet) {
  1144. X+                 need_redraw = TRUE;
  1145. X+ # ifdef TOS
  1146. X+                 if ((boolopt[i].addr) == &flags.use_color
  1147. X+                 && flags.BIOS) {
  1148. X+                 if (colors_changed)
  1149. X+                     restore_colors();
  1150. X+                 else
  1151. X+                     set_colors();
  1152. X+                 }
  1153. X+ # endif
  1154. X+             }
  1155. X+ #endif
  1156. X+ 
  1157. X              return;
  1158. X          }
  1159. X      }
  1160. X***************
  1161. X*** 869,875 ****
  1162. X      case 's':
  1163. X          clear_nhwindow(WIN_MESSAGE);
  1164. X          getlin("What options do you want to set?", buf);
  1165. X-         clear_nhwindow(WIN_MESSAGE);
  1166. X          if(buf[0] == '\033') return 0;
  1167. X          need_redraw = FALSE;
  1168. X          parseoptions(buf, FALSE, FALSE);
  1169. X--- 835,840 ----
  1170. X*** /tmp/da08454    Thu Feb 25 10:24:34 1993
  1171. X--- src/pager.c    Mon Feb  8 14:31:40 1993
  1172. X***************
  1173. X*** 1,4 ****
  1174. X! /*    SCCS Id: @(#)pager.c    3.1    92/09/01          */
  1175. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1176. X  /* NetHack may be freely redistributed.  See license for details. */
  1177. X  
  1178. X--- 1,4 ----
  1179. X! /*    SCCS Id: @(#)pager.c    3.1    93/02/04    */
  1180. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1181. X  /* NetHack may be freely redistributed.  See license for details. */
  1182. X  
  1183. X***************
  1184. X*** 93,103 ****
  1185. X              (hp ? "high priest" : l_monnam(mtmp)),
  1186. X              u.ustuck == mtmp ?
  1187. X  #ifdef POLYSELF
  1188. X!             (u.mtimedone ? ", being held" :
  1189. X  #endif
  1190. X!             ", holding you"
  1191. X  #ifdef POLYSELF
  1192. X!             )
  1193. X  #endif
  1194. X              : "");
  1195. X      }
  1196. X--- 93,103 ----
  1197. X              (hp ? "high priest" : l_monnam(mtmp)),
  1198. X              u.ustuck == mtmp ?
  1199. X  #ifdef POLYSELF
  1200. X!             ((u.mtimedone && sticks(uasmon)) ? ", being held" :
  1201. X  #endif
  1202. X!              ", holding you"
  1203. X  #ifdef POLYSELF
  1204. X!              )
  1205. X  #endif
  1206. X              : "");
  1207. X      }
  1208. X***************
  1209. X*** 313,319 ****
  1210. X      cc.y = u.uy;
  1211. X      } else {
  1212. X      getlin("Specify what? (type the word)", out_str);
  1213. X!     if (out_str[0] == '\033')
  1214. X          return 0;
  1215. X  
  1216. X      if (out_str[1]) {    /* user typed in a complete string */
  1217. X--- 313,319 ----
  1218. X      cc.y = u.uy;
  1219. X      } else {
  1220. X      getlin("Specify what? (type the word)", out_str);
  1221. X!     if (out_str[0] == '\0' || out_str[0] == '\033')
  1222. X          return 0;
  1223. X  
  1224. X      if (out_str[1]) {    /* user typed in a complete string */
  1225. X*** /tmp/da08462    Thu Feb 25 10:24:36 1993
  1226. X--- src/pickup.c    Wed Feb 17 09:51:58 1993
  1227. X***************
  1228. X*** 1,4 ****
  1229. X! /*    SCCS Id: @(#)pickup.c    3.1    93/01/04    */
  1230. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1231. X  /* NetHack may be freely redistributed.  See license for details. */
  1232. X  
  1233. X--- 1,4 ----
  1234. X! /*    SCCS Id: @(#)pickup.c    3.1    93/02/16    */
  1235. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1236. X  /* NetHack may be freely redistributed.  See license for details. */
  1237. X  
  1238. X***************
  1239. X*** 138,147 ****
  1240. X          Sprintf(qbuf,"What kinds of thing do you want to %s? [%s]",
  1241. X              action, ilets);
  1242. X          getlin(qbuf,inbuf);
  1243. X!         if (*inbuf == '\033') {
  1244. X!             clear_nhwindow(WIN_MESSAGE);
  1245. X!             return FALSE;
  1246. X!         }
  1247. X          for (p = inbuf; (sym = *p++); ) {
  1248. X              /* new A function (selective all) added by GAN 01/09/87 */
  1249. X              if (sym == ' ') continue;
  1250. X--- 138,145 ----
  1251. X          Sprintf(qbuf,"What kinds of thing do you want to %s? [%s]",
  1252. X              action, ilets);
  1253. X          getlin(qbuf,inbuf);
  1254. X!         if (*inbuf == '\033') return FALSE;
  1255. X! 
  1256. X          for (p = inbuf; (sym = *p++); ) {
  1257. X              /* new A function (selective all) added by GAN 01/09/87 */
  1258. X              if (sym == ' ') continue;
  1259. X***************
  1260. X*** 236,248 ****
  1261. X          }
  1262. X      }
  1263. X  
  1264. X- #ifdef POLYSELF
  1265. X-     if (nolimbs(uasmon)) {
  1266. X-         You("cannot pick things up without limbs.");
  1267. X-         return;
  1268. X-     }
  1269. X- #endif
  1270. X- 
  1271. X      /* added by GAN 10/24/86 to allow selective picking up */
  1272. X      if (!all) {
  1273. X          if (!query_classes(olets, &selective, &all_of_a_type,
  1274. X--- 234,239 ----
  1275. X***************
  1276. X*** 261,267 ****
  1277. X  
  1278. X              if (!all_of_a_type) {
  1279. X              char qbuf[QBUFSZ];
  1280. X!             Sprintf(qbuf,"Pick up %s?", doname(obj));
  1281. X              switch ((obj->quan < 2L) ? ynaq(qbuf) : ynNaq(qbuf)) {
  1282. X              case 'q': return;
  1283. X              case 'n': continue;
  1284. X--- 252,258 ----
  1285. X  
  1286. X              if (!all_of_a_type) {
  1287. X              char qbuf[QBUFSZ];
  1288. X!             Sprintf(qbuf, "Pick up %s?", doname(obj));
  1289. X              switch ((obj->quan < 2L) ? ynaq(qbuf) : ynNaq(qbuf)) {
  1290. X              case 'q': return;
  1291. X              case 'n': continue;
  1292. X***************
  1293. X*** 276,282 ****
  1294. X              case '#':    /* count was entered */
  1295. X                  if (!yn_number) continue; /* 0 count => No */
  1296. X                  else count = yn_number;
  1297. X!                 /* fall thru :-} */
  1298. X              default:    /* 'y' */
  1299. X                  break;
  1300. X              }
  1301. X--- 267,273 ----
  1302. X              case '#':    /* count was entered */
  1303. X                  if (!yn_number) continue; /* 0 count => No */
  1304. X                  else count = yn_number;
  1305. X!                 /* fall thru */
  1306. X              default:    /* 'y' */
  1307. X                  break;
  1308. X              }
  1309. X***************
  1310. X*** 384,390 ****
  1311. X          exercise(A_WIS, FALSE);
  1312. X          return FALSE;
  1313. X          }
  1314. X- 
  1315. X      } else  if (obj->otyp == SCR_SCARE_MONSTER) {
  1316. X          if (obj->blessed) obj->blessed = 0;
  1317. X          else if (!obj->spe && !obj->cursed) obj->spe = 1;
  1318. X--- 375,380 ----
  1319. X***************
  1320. X*** 454,464 ****
  1321. X  lift_some:
  1322. X      if (inv_cnt() >= 52) {
  1323. X          if (objx) unsplitobj(obj, objx, 0L);
  1324. X-         Your("knapsack cannot accommodate any more items.");
  1325. X          if (obj->otyp == SCR_SCARE_MONSTER) obj->spe = 0;
  1326. X          return TRUE;
  1327. X      }
  1328. X  
  1329. X      pickquan = obj->quan;    /* save number picked up */
  1330. X      obj = pick_obj(obj);
  1331. X  
  1332. X--- 444,472 ----
  1333. X  lift_some:
  1334. X      if (inv_cnt() >= 52) {
  1335. X          if (objx) unsplitobj(obj, objx, 0L);
  1336. X          if (obj->otyp == SCR_SCARE_MONSTER) obj->spe = 0;
  1337. X+         Your("knapsack cannot accommodate any more items.");
  1338. X          return TRUE;
  1339. X      }
  1340. X  
  1341. X+     if (obj->otyp != LOADSTONE &&
  1342. X+         (wt*2 / weight_cap()) + 1 > SLT_ENCUMBER) {
  1343. X+         /* as in near_capacity() */
  1344. X+         char qbuf[QBUFSZ];
  1345. X+         char ch;
  1346. X+ 
  1347. X+         Sprintf(qbuf, "%s %s.  Continue?", nearloadmsg, doname(obj));
  1348. X+         switch (ch = ynq(qbuf)) {
  1349. X+             case 'n':
  1350. X+             case 'q':
  1351. X+                 if (objx) unsplitobj(obj, objx, 0L);
  1352. X+                 if (obj->otyp == SCR_SCARE_MONSTER)
  1353. X+                     obj->spe = 0;
  1354. X+                 return (ch == 'q');
  1355. X+             default:  break;    /* 'y' */
  1356. X+         }
  1357. X+     }
  1358. X+ 
  1359. X      pickquan = obj->quan;    /* save number picked up */
  1360. X      obj = pick_obj(obj);
  1361. X  
  1362. X***************
  1363. X*** 465,473 ****
  1364. X      if (!Blind) obj->dknown = 1;
  1365. X      if (uwep && uwep == obj) mrg_to_wielded = TRUE;
  1366. X      nearload = near_capacity();
  1367. X!     prinv(nearload > SLT_ENCUMBER ? nearloadmsg :
  1368. X!           nearload > UNENCUMBERED ? moderateloadmsg : NULL,
  1369. X!           obj, pickquan);
  1370. X      mrg_to_wielded = FALSE;
  1371. X      return FALSE;
  1372. X  }
  1373. X--- 473,480 ----
  1374. X      if (!Blind) obj->dknown = 1;
  1375. X      if (uwep && uwep == obj) mrg_to_wielded = TRUE;
  1376. X      nearload = near_capacity();
  1377. X!     prinv(nearload > UNENCUMBERED && nearload < MOD_ENCUMBER ?
  1378. X!           moderateloadmsg : NULL, obj, pickquan);
  1379. X      mrg_to_wielded = FALSE;
  1380. X      return FALSE;
  1381. X  }
  1382. X***************
  1383. X*** 612,618 ****
  1384. X  
  1385. X  /* A variable set in use_container(), to be used by the callback routines */
  1386. X  /* chk_bg(), in_container(), and out_container() from askchain().      */
  1387. X! static struct obj NEARDATA *current_container;
  1388. X  #define Icebox (current_container->otyp == ICE_BOX)
  1389. X  
  1390. X  STATIC_PTR int
  1391. X--- 619,625 ----
  1392. X  
  1393. X  /* A variable set in use_container(), to be used by the callback routines */
  1394. X  /* chk_bg(), in_container(), and out_container() from askchain().      */
  1395. X! static NEARDATA struct obj *current_container;
  1396. X  #define Icebox (current_container->otyp == ICE_BOX)
  1397. X  
  1398. X  STATIC_PTR int
  1399. X***************
  1400. X*** 806,811 ****
  1401. X--- 813,820 ----
  1402. X      if(!obj->unpaid && !carried(current_container) &&
  1403. X           costly_spot(current_container->ox, current_container->oy)) {
  1404. X  
  1405. X+         obj->ox = current_container->ox;
  1406. X+         obj->oy = current_container->oy;
  1407. X          addtobill(obj, FALSE, FALSE, FALSE);
  1408. X      }
  1409. X  
  1410. X***************
  1411. X*** 826,832 ****
  1412. X  }
  1413. X  
  1414. X  /* for getobj: allow counts, allow all types, expect food */
  1415. X! static const char NEARDATA frozen_food[] =
  1416. X      { ALLOW_COUNT, ALL_CLASSES, FOOD_CLASS, 0 };
  1417. X  
  1418. X  int
  1419. X--- 835,841 ----
  1420. X  }
  1421. X  
  1422. X  /* for getobj: allow counts, allow all types, expect food */
  1423. X! static NEARDATA const char frozen_food[] =
  1424. X      { ALLOW_COUNT, ALL_CLASSES, FOOD_CLASS, 0 };
  1425. X  
  1426. X  int
  1427. X*** /tmp/da08478    Thu Feb 25 10:24:41 1993
  1428. X--- src/polyself.c    Tue Feb 23 20:56:32 1993
  1429. X***************
  1430. X*** 244,250 ****
  1431. X          if(flags.female) dochange = TRUE;
  1432. X      } else if (is_female(&mons[mntmp])) {
  1433. X          if(!flags.female) dochange = TRUE;
  1434. X!     } else if (!is_neuter(&mons[mntmp])) {
  1435. X          if(!rn2(10)) dochange = TRUE;
  1436. X      }
  1437. X      if (dochange) {
  1438. X--- 244,250 ----
  1439. X          if(flags.female) dochange = TRUE;
  1440. X      } else if (is_female(&mons[mntmp])) {
  1441. X          if(!flags.female) dochange = TRUE;
  1442. X!     } else if (!is_neuter(&mons[mntmp]) && mntmp != u.ulycn) {
  1443. X          if(!rn2(10)) dochange = TRUE;
  1444. X      }
  1445. X      if (dochange) {
  1446. X***************
  1447. X*** 777,809 ****
  1448. X       * plus the trailing null, after pluralizing (since sometimes a
  1449. X       * buffer is made a fixed size and must be able to hold it)
  1450. X       */
  1451. X!     static const char NEARDATA *humanoid_parts[] = { "arm", "eye", "face", "finger",
  1452. X          "fingertip", "foot", "hand", "handed", "head", "leg",
  1453. X          "light headed", "neck", "spine", "toe" };
  1454. X  #ifdef POLYSELF
  1455. X!     static const char NEARDATA *jelly_parts[] = { "pseudopod", "dark spot", "front",
  1456. X          "pseudopod extension", "pseudopod extremity",
  1457. X          "pseudopod root", "grasp", "grasped", "cerebral area",
  1458. X          "lower pseudopod", "viscous", "middle", "surface",
  1459. X          "pseudopod extremity" },
  1460. X!     NEARDATA *animal_parts[] = { "forelimb", "eye", "face", "foreclaw", "claw tip",
  1461. X          "rear claw", "foreclaw", "clawed", "head", "rear limb",
  1462. X          "light headed", "neck", "spine", "rear claw tip" },
  1463. X!     NEARDATA *horse_parts[] = { "forelimb", "eye", "face", "forehoof", "hoof tip",
  1464. X          "rear hoof", "foreclaw", "hooved", "head", "rear limb",
  1465. X          "light headed", "neck", "backbone", "rear hoof tip" },
  1466. X!     NEARDATA *sphere_parts[] = { "appendage", "optic nerve", "body", "tentacle",
  1467. X          "tentacle tip", "lower appendage", "tentacle", "tentacled",
  1468. X          "body", "lower tentacle", "rotational", "equator", "body",
  1469. X          "lower tentacle tip" },
  1470. X!     NEARDATA *fungus_parts[] = { "mycelium", "visual area", "front", "hypha",
  1471. X          "hypha", "root", "strand", "stranded", "cap area",
  1472. X          "rhizome", "sporulated", "stalk", "root", "rhizome tip" },
  1473. X!     NEARDATA *vortex_parts[] = { "region", "eye", "front", "minor current",
  1474. X          "minor current", "lower current", "swirl", "swirled",
  1475. X          "central core", "lower current", "addled", "center",
  1476. X          "currents", "edge" },
  1477. X!     NEARDATA *snake_parts[] = { "vestigial limb", "eye", "face", "large scale",
  1478. X          "large scale tip", "rear region", "scale gap", "scale gapped",
  1479. X          "head", "rear region", "light headed", "neck", "length",
  1480. X          "rear scale" };
  1481. X--- 777,809 ----
  1482. X       * plus the trailing null, after pluralizing (since sometimes a
  1483. X       * buffer is made a fixed size and must be able to hold it)
  1484. X       */
  1485. X!     static NEARDATA const char *humanoid_parts[] = { "arm", "eye", "face", "finger",
  1486. X          "fingertip", "foot", "hand", "handed", "head", "leg",
  1487. X          "light headed", "neck", "spine", "toe" };
  1488. X  #ifdef POLYSELF
  1489. X!     static NEARDATA const char *jelly_parts[] = { "pseudopod", "dark spot", "front",
  1490. X          "pseudopod extension", "pseudopod extremity",
  1491. X          "pseudopod root", "grasp", "grasped", "cerebral area",
  1492. X          "lower pseudopod", "viscous", "middle", "surface",
  1493. X          "pseudopod extremity" },
  1494. X!     *animal_parts[] = { "forelimb", "eye", "face", "foreclaw", "claw tip",
  1495. X          "rear claw", "foreclaw", "clawed", "head", "rear limb",
  1496. X          "light headed", "neck", "spine", "rear claw tip" },
  1497. X!     *horse_parts[] = { "forelimb", "eye", "face", "forehoof", "hoof tip",
  1498. X          "rear hoof", "foreclaw", "hooved", "head", "rear limb",
  1499. X          "light headed", "neck", "backbone", "rear hoof tip" },
  1500. X!     *sphere_parts[] = { "appendage", "optic nerve", "body", "tentacle",
  1501. X          "tentacle tip", "lower appendage", "tentacle", "tentacled",
  1502. X          "body", "lower tentacle", "rotational", "equator", "body",
  1503. X          "lower tentacle tip" },
  1504. X!     *fungus_parts[] = { "mycelium", "visual area", "front", "hypha",
  1505. X          "hypha", "root", "strand", "stranded", "cap area",
  1506. X          "rhizome", "sporulated", "stalk", "root", "rhizome tip" },
  1507. X!     *vortex_parts[] = { "region", "eye", "front", "minor current",
  1508. X          "minor current", "lower current", "swirl", "swirled",
  1509. X          "central core", "lower current", "addled", "center",
  1510. X          "currents", "edge" },
  1511. X!     *snake_parts[] = { "vestigial limb", "eye", "face", "large scale",
  1512. X          "large scale tip", "rear region", "scale gap", "scale gapped",
  1513. X          "head", "rear region", "light headed", "neck", "length",
  1514. X          "rear scale" };
  1515. X*** /tmp/da08486    Thu Feb 25 10:24:43 1993
  1516. X--- src/potion.c    Thu Feb 11 13:27:58 1993
  1517. X***************
  1518. X*** 1,4 ****
  1519. X! /*    SCCS Id: @(#)potion.c    3.1    92/12/10          */
  1520. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1521. X  /* NetHack may be freely redistributed.  See license for details. */
  1522. X  
  1523. X--- 1,4 ----
  1524. X! /*    SCCS Id: @(#)potion.c    3.1    93/02/06          */
  1525. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1526. X  /* NetHack may be freely redistributed.  See license for details. */
  1527. X  
  1528. X***************
  1529. X*** 8,14 ****
  1530. X  static void NDECL(ghost_from_bottle);
  1531. X  static boolean FDECL(neutralizes, (struct obj *,struct obj *));
  1532. X  
  1533. X! static int NEARDATA nothing, NEARDATA unkn;
  1534. X  #endif /* OVLB */
  1535. X  
  1536. X  extern boolean notonhead;    /* for long worms */
  1537. X--- 8,14 ----
  1538. X  static void NDECL(ghost_from_bottle);
  1539. X  static boolean FDECL(neutralizes, (struct obj *,struct obj *));
  1540. X  
  1541. X! static NEARDATA int nothing, unkn;
  1542. X  #endif /* OVLB */
  1543. X  
  1544. X  extern boolean notonhead;    /* for long worms */
  1545. X***************
  1546. X*** 18,24 ****
  1547. X  
  1548. X  #ifdef OVLB
  1549. X  
  1550. X! static const char NEARDATA beverages[] = { POTION_CLASS, 0 };
  1551. X  
  1552. X  void
  1553. X  make_confused(xtime,talk)
  1554. X--- 18,24 ----
  1555. X  
  1556. X  #ifdef OVLB
  1557. X  
  1558. X! static NEARDATA const char beverages[] = { POTION_CLASS, 0 };
  1559. X  
  1560. X  void
  1561. X  make_confused(xtime,talk)
  1562. X***************
  1563. X*** 310,317 ****
  1564. X      case POT_WATER:
  1565. X          if(!otmp->blessed && !otmp->cursed) {
  1566. X              pline("This tastes like %swater.",
  1567. X!                   otmp->spe == -1 ? "impure " : "");
  1568. X!             lesshungry(rnd(otmp->spe == -1 ? 3 : 10));
  1569. X              break;
  1570. X          }
  1571. X          unkn++;
  1572. X--- 310,317 ----
  1573. X      case POT_WATER:
  1574. X          if(!otmp->blessed && !otmp->cursed) {
  1575. X              pline("This tastes like %swater.",
  1576. X!                   otmp->odiluted ? "impure " : "");
  1577. X!             lesshungry(rnd(otmp->odiluted ? 3 : 10));
  1578. X              break;
  1579. X          }
  1580. X          unkn++;
  1581. X***************
  1582. X*** 365,375 ****
  1583. X          break;
  1584. X      case POT_BOOZE:
  1585. X          unkn++;
  1586. X!         pline("Ooph!  This tastes like %s!",
  1587. X                Hallucination ? "furniture polish" : "liquid fire");
  1588. X          if (!otmp->blessed) make_confused(HConfusion + d(3,8),FALSE);
  1589. X          /* the whiskey makes us feel better */
  1590. X!         if(u.uhp < u.uhpmax) losehp(-1, "", 0); /* can't kill you */
  1591. X          lesshungry(10 * (2 + bcsign(otmp)));
  1592. X          exercise(A_WIS, FALSE);
  1593. X          if(otmp->cursed) {
  1594. X--- 365,377 ----
  1595. X          break;
  1596. X      case POT_BOOZE:
  1597. X          unkn++;
  1598. X!         pline("Ooph!  This tastes like %s%s!",
  1599. X!               otmp->odiluted ? "watered down " : "",
  1600. X                Hallucination ? "furniture polish" : "liquid fire");
  1601. X          if (!otmp->blessed) make_confused(HConfusion + d(3,8),FALSE);
  1602. X          /* the whiskey makes us feel better */
  1603. X!         if (u.uhp < u.uhpmax && !otmp->odiluted)
  1604. X!             losehp(-1, "", 0); /* can't kill you */
  1605. X          lesshungry(10 * (2 + bcsign(otmp)));
  1606. X          exercise(A_WIS, FALSE);
  1607. X          if(otmp->cursed) {
  1608. X***************
  1609. X*** 429,442 ****
  1610. X          else pline (Hallucination ?
  1611. X  #ifdef TUTTI_FRUTTI
  1612. X             "This tastes like 10%% real %s juice all-natural beverage." :
  1613. X!            "This tastes like %s juice.", pl_fruit
  1614. X  #else
  1615. X             "This tastes like 10%% real fruit juice all-natural beverage." :
  1616. X!            "This tastes like fruit juice."
  1617. X  #endif
  1618. X                  );
  1619. X          if (otmp->otyp == POT_FRUIT_JUICE) {
  1620. X!             lesshungry(10 * (2 + bcsign(otmp)));
  1621. X              break;
  1622. X          }
  1623. X          if (!otmp->cursed) {
  1624. X--- 431,446 ----
  1625. X          else pline (Hallucination ?
  1626. X  #ifdef TUTTI_FRUTTI
  1627. X             "This tastes like 10%% real %s juice all-natural beverage." :
  1628. X!            "This tastes like %s%s juice.",
  1629. X!            otmp->odiluted ? "reconstituted " : "", pl_fruit
  1630. X  #else
  1631. X             "This tastes like 10%% real fruit juice all-natural beverage." :
  1632. X!            "This tastes like %sfruit juice.",
  1633. X!            otmp->odiluted ? "reconstituted " : ""
  1634. X  #endif
  1635. X                  );
  1636. X          if (otmp->otyp == POT_FRUIT_JUICE) {
  1637. X!             lesshungry((otmp->odiluted ? 5 : 10) * (2 + bcsign(otmp)));
  1638. X              break;
  1639. X          }
  1640. X          if (!otmp->cursed) {
  1641. X***************
  1642. X*** 985,995 ****
  1643. X          case POTION_CLASS:
  1644. X          if (obj->otyp == POT_WATER) return FALSE;
  1645. X          Your("%s.", aobjnam(obj,"dilute"));
  1646. X!         if (obj->spe == -1) {
  1647. X!             obj->spe = 0;
  1648. X              obj->blessed = obj->cursed = FALSE;
  1649. X              obj->otyp = POT_WATER;
  1650. X!         } else obj->spe--;
  1651. X          return TRUE;
  1652. X          case SCROLL_CLASS:
  1653. X          if (obj->otyp != SCR_BLANK_PAPER
  1654. X--- 989,999 ----
  1655. X          case POTION_CLASS:
  1656. X          if (obj->otyp == POT_WATER) return FALSE;
  1657. X          Your("%s.", aobjnam(obj,"dilute"));
  1658. X!         if (obj->odiluted) {
  1659. X!             obj->odiluted = 0;
  1660. X              obj->blessed = obj->cursed = FALSE;
  1661. X              obj->otyp = POT_WATER;
  1662. X!         } else obj->odiluted++;
  1663. X          return TRUE;
  1664. X          case SCROLL_CLASS:
  1665. X          if (obj->otyp != SCR_BLANK_PAPER
  1666. X***************
  1667. X*** 1139,1145 ****
  1668. X          if (Blind) obj->dknown = 0;
  1669. X  
  1670. X          switch (neutralizes(obj, potion) ||
  1671. X!             obj->spe == -1 /* diluted */ ? 1 : rnd(8)) {
  1672. X              case 1:
  1673. X                  obj->otyp = POT_WATER;
  1674. X                  obj->blessed = obj->cursed = 0;
  1675. X--- 1143,1149 ----
  1676. X          if (Blind) obj->dknown = 0;
  1677. X  
  1678. X          switch (neutralizes(obj, potion) ||
  1679. X!             obj->odiluted ? 1 : rnd(8)) {
  1680. X              case 1:
  1681. X                  obj->otyp = POT_WATER;
  1682. X                  obj->blessed = obj->cursed = 0;
  1683. X***************
  1684. X*** 1165,1175 ****
  1685. X          }
  1686. X  
  1687. X          if (obj->otyp == POT_WATER) {
  1688. X!             obj->spe = 0; /* in case it was diluted before */
  1689. X              pline("The mixture bubbles violently%s.",
  1690. X                  Blind ? "" : ", then clears");
  1691. X          } else {
  1692. X!             obj->spe--; /* diluted */
  1693. X              if (!Blind) {
  1694. X                  pline("The mixture looks %s.",
  1695. X                      OBJ_DESCR(objects[obj->otyp]));
  1696. X--- 1169,1179 ----
  1697. X          }
  1698. X  
  1699. X          if (obj->otyp == POT_WATER) {
  1700. X!             obj->odiluted = 0; /* in case it was diluted before */
  1701. X              pline("The mixture bubbles violently%s.",
  1702. X                  Blind ? "" : ", then clears");
  1703. X          } else {
  1704. X!             obj->odiluted++;
  1705. X              if (!Blind) {
  1706. X                  pline("The mixture looks %s.",
  1707. X                      OBJ_DESCR(objects[obj->otyp]));
  1708. X***************
  1709. X*** 1208,1214 ****
  1710. X          potion->otyp = POT_WATER;
  1711. X          potion->blessed = 0;
  1712. X          potion->cursed = 0;
  1713. X!         potion->spe = 0;
  1714. X          return(1);
  1715. X      }
  1716. X  
  1717. X--- 1212,1218 ----
  1718. X          potion->otyp = POT_WATER;
  1719. X          potion->blessed = 0;
  1720. X          potion->cursed = 0;
  1721. X!         potion->odiluted = 0;
  1722. X          return(1);
  1723. X      }
  1724. X  
  1725. X*** /tmp/da08494    Thu Feb 25 10:24:46 1993
  1726. X--- src/pray.c    Tue Feb 23 16:07:40 1993
  1727. X***************
  1728. X*** 524,530 ****
  1729. X      case 0:    break;
  1730. X      case 1:
  1731. X          if (uwep && (welded(uwep) || uwep->oclass == WEAPON_CLASS ||
  1732. X!              uwep->otyp == PICK_AXE) && (!uwep->blessed)) {
  1733. X          if (uwep->cursed) {
  1734. X              uwep->cursed = FALSE;
  1735. X              uwep->bknown = TRUE;
  1736. X--- 524,531 ----
  1737. X      case 0:    break;
  1738. X      case 1:
  1739. X          if (uwep && (welded(uwep) || uwep->oclass == WEAPON_CLASS ||
  1740. X!              uwep->otyp == PICK_AXE || uwep->otyp == UNICORN_HORN)
  1741. X!                 && (!uwep->blessed)) {
  1742. X          if (uwep->cursed) {
  1743. X              uwep->cursed = FALSE;
  1744. X              uwep->bknown = TRUE;
  1745. X***************
  1746. X*** 533,539 ****
  1747. X                   Hallucination ? hcolor() : amber);
  1748. X              else You("feel the power of %s over your %s.",
  1749. X              u_gname(), xname(uwep));
  1750. X!         } else if(uwep->otyp < BOW) {
  1751. X              uwep->blessed = uwep->bknown = TRUE;
  1752. X              if (!Blind)
  1753. X              Your("%s with %s aura.",
  1754. X--- 534,540 ----
  1755. X                   Hallucination ? hcolor() : amber);
  1756. X              else You("feel the power of %s over your %s.",
  1757. X              u_gname(), xname(uwep));
  1758. X!         } else if(uwep->otyp < BOW || uwep->otyp > CROSSBOW) {
  1759. X              uwep->blessed = uwep->bknown = TRUE;
  1760. X              if (!Blind)
  1761. X              Your("%s with %s aura.",
  1762. X***************
  1763. X*** 696,702 ****
  1764. X              break;
  1765. X          }
  1766. X          /* enhance weapon regardless of alignment or artifact status */
  1767. X!         if (obj && (obj->oclass == WEAPON_CLASS)) {
  1768. X              bless(obj);
  1769. X              obj->oeroded = 0;
  1770. X              obj->oerodeproof = TRUE;
  1771. X--- 697,703 ----
  1772. X              break;
  1773. X          }
  1774. X          /* enhance weapon regardless of alignment or artifact status */
  1775. X!         if (obj && obj->oclass == WEAPON_CLASS) {
  1776. X              bless(obj);
  1777. X              obj->oeroded = 0;
  1778. X              obj->oerodeproof = TRUE;
  1779. X***************
  1780. X*** 788,794 ****
  1781. X      angrygods(g_align);
  1782. X  }
  1783. X  
  1784. X! static const char NEARDATA sacrifice_types[] = { FOOD_CLASS, AMULET_CLASS, 0 };
  1785. X  
  1786. X  static void
  1787. X  consume_offering(otmp)
  1788. X--- 789,795 ----
  1789. X      angrygods(g_align);
  1790. X  }
  1791. X  
  1792. X! static NEARDATA const char sacrifice_types[] = { FOOD_CLASS, AMULET_CLASS, 0 };
  1793. X  
  1794. X  static void
  1795. X  consume_offering(otmp)
  1796. X***************
  1797. X*** 866,872 ****
  1798. X              exercise(A_WIS, FALSE);
  1799. X          }
  1800. X  
  1801. X!         if (altaralign != A_CHAOTIC) {
  1802. X          /* curse the lawful/neutral altar */
  1803. X          pline("The altar is stained with %sn blood.",
  1804. X                (pl_character[0]=='E') ? "elve" : "huma");
  1805. X--- 867,873 ----
  1806. X              exercise(A_WIS, FALSE);
  1807. X          }
  1808. X  
  1809. X!         if (altaralign != A_CHAOTIC && altaralign != A_NONE) {
  1810. X          /* curse the lawful/neutral altar */
  1811. X          pline("The altar is stained with %sn blood.",
  1812. X                (pl_character[0]=='E') ? "elve" : "huma");
  1813. X***************
  1814. X*** 874,881 ****
  1815. X          angry_priest();
  1816. X          } else {
  1817. X          register struct monst *dmon;
  1818. X!         /* Human sacrifice on a chaotic altar is equivalent */
  1819. X!         /* to demon summoning */
  1820. X          if(u.ualign.type != A_CHAOTIC) {
  1821. X          pline("The blood floods the altar, which vanishes in %s cloud!",
  1822. X                an(Hallucination ? hcolor() : Black));
  1823. X--- 875,882 ----
  1824. X          angry_priest();
  1825. X          } else {
  1826. X          register struct monst *dmon;
  1827. X!         /* Human sacrifice on a chaotic or unaligned altar */
  1828. X!         /* is equivalent to demon summoning */
  1829. X          if(u.ualign.type != A_CHAOTIC) {
  1830. X          pline("The blood floods the altar, which vanishes in %s cloud!",
  1831. X                an(Hallucination ? hcolor() : Black));
  1832. X***************
  1833. X*** 886,894 ****
  1834. X              pline("The blood covers the altar!");
  1835. X              change_luck(2);
  1836. X          }
  1837. X!         if ((dmon = makemon(&mons[dlord()], u.ux, u.uy)) != 0) {
  1838. X              You("have summoned %s!", a_monnam(dmon));
  1839. X!             if (u.ualign.type == A_CHAOTIC)
  1840. X              dmon->mpeaceful = TRUE;
  1841. X              You("are terrified, and unable to move.");
  1842. X              nomul(-3);
  1843. X--- 887,895 ----
  1844. X              pline("The blood covers the altar!");
  1845. X              change_luck(2);
  1846. X          }
  1847. X!         if ((dmon = makemon(&mons[dlord(altaralign)], u.ux, u.uy))) {
  1848. X              You("have summoned %s!", a_monnam(dmon));
  1849. X!             if (sgn(u.ualign.type) == sgn(dmon->data->maligntyp))
  1850. X              dmon->mpeaceful = TRUE;
  1851. X              You("are terrified, and unable to move.");
  1852. X              nomul(-3);
  1853. X***************
  1854. X*** 1279,1285 ****
  1855. X  doturn()
  1856. X  {    /* Knights & Priest(esse)s only please */
  1857. X  
  1858. X!     register struct monst *mtmp;
  1859. X      register int    xlev = 6;
  1860. X  
  1861. X      if((pl_character[0] != 'P') &&
  1862. X--- 1280,1286 ----
  1863. X  doturn()
  1864. X  {    /* Knights & Priest(esse)s only please */
  1865. X  
  1866. X!     register struct monst *mtmp, *mtmp2;
  1867. X      register int    xlev = 6;
  1868. X  
  1869. X      if((pl_character[0] != 'P') &&
  1870. X***************
  1871. X*** 1319,1325 ****
  1872. X      }
  1873. X      pline("Calling upon %s, you chant an arcane formula.", u_gname());
  1874. X      exercise(A_WIS, TRUE);
  1875. X!     for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
  1876. X          if(cansee(mtmp->mx,mtmp->my)) {
  1877. X          if(!mtmp->mpeaceful && (is_undead(mtmp->data) ||
  1878. X             (is_demon(mtmp->data) && (u.ulevel > (MAXULEV/2))))) {
  1879. X--- 1320,1327 ----
  1880. X      }
  1881. X      pline("Calling upon %s, you chant an arcane formula.", u_gname());
  1882. X      exercise(A_WIS, TRUE);
  1883. X!     for(mtmp = fmon; mtmp; mtmp = mtmp2) {
  1884. X!         mtmp2 = mtmp->nmon;
  1885. X          if(cansee(mtmp->mx,mtmp->my)) {
  1886. X          if(!mtmp->mpeaceful && (is_undead(mtmp->data) ||
  1887. X             (is_demon(mtmp->data) && (u.ulevel > (MAXULEV/2))))) {
  1888. X***************
  1889. X*** 1328,1334 ****
  1890. X              pline("Unfortunately, your voice falters.");
  1891. X              mtmp->mflee = mtmp->mfrozen = mtmp->msleep = FALSE;
  1892. X              mtmp->mcanmove = TRUE;
  1893. X!             } else if (! resist(mtmp, '\0', 0, TELL))
  1894. X              switch (mtmp->data->mlet) {
  1895. X                  /* this is intentional, lichs are tougher
  1896. X                     than zombies. */
  1897. X--- 1330,1336 ----
  1898. X              pline("Unfortunately, your voice falters.");
  1899. X              mtmp->mflee = mtmp->mfrozen = mtmp->msleep = FALSE;
  1900. X              mtmp->mcanmove = TRUE;
  1901. X!             } else if (! resist(mtmp, '\0', 0, TELL)) {
  1902. X              switch (mtmp->data->mlet) {
  1903. X                  /* this is intentional, lichs are tougher
  1904. X                     than zombies. */
  1905. X***************
  1906. X*** 1352,1359 ****
  1907. X              default:    mtmp->mflee = TRUE;
  1908. X                  break;
  1909. X              }
  1910. X!            }
  1911. X          }
  1912. X      nomul(-5);
  1913. X      return(1);
  1914. X  }
  1915. X--- 1354,1363 ----
  1916. X              default:    mtmp->mflee = TRUE;
  1917. X                  break;
  1918. X              }
  1919. X!             }
  1920. X!         }
  1921. X          }
  1922. X+     }
  1923. X      nomul(-5);
  1924. X      return(1);
  1925. X  }
  1926. X
  1927. END_OF_FILE
  1928. if test 52954 -ne `wc -c <'patches01g'`; then
  1929.     echo shar: \"'patches01g'\" unpacked with wrong size!
  1930. fi
  1931. # end of 'patches01g'
  1932. if test -f 'sys/winnt/nhico.uu' -a "${1}" != "-c" ; then 
  1933.   echo shar: Renaming existing file \"'sys/winnt/nhico.uu'\" to \"'sys/winnt/nhico.uu.orig'\"
  1934.   mv -f 'sys/winnt/nhico.uu' 'sys/winnt/nhico.uu.orig'
  1935. fi
  1936. echo shar: Extracting \"'sys/winnt/nhico.uu'\" \(1263 characters\)
  1937. sed "s/^X//" >'sys/winnt/nhico.uu' <<'END_OF_FILE'
  1938. Xsection 1 of uuencode 4.13 of file NETHACK.ICO    by R.E.M.
  1939. X
  1940. Xbegin 644 NETHACK.ICO
  1941. XM```!``$`("`0``````#H`@``%@```"@````@````0`````$`!```````@`(`.
  1942. XM``````````````````````````````"```"`````@(``@````(``@`"`@```6
  1943. XM@("``,#`P````/\``/\```#__P#_````_P#_`/__``#___\`]F9F9F9F9F9F*
  1944. XM9F9F9F9F9O]F9F9F9F9F9F9F9F9F9F;_B(B(B(B(B(B(B(B(B&9F_XB(B(B(D
  1945. XMB(B(B(B(B(AF9O^(B(B(A555B(B(B(B(9F;_B(B(B`!5!8B(B(B(B&9F_XB('
  1946. XMB(@```6(B(B(B(AF9O^(B%554`!56(B(B(B(9F;_B(N[N[`.XU6(B(B(B&9F[
  1947. XM_XB[N[L`ONXU6(B(B(AF9O^+N[N[N[ONXUB(B(B(9F;_B[N[N[N[ONY3B(B(N
  1948. XMB&9F_XN[NYF9F[ONXSB(B(AF9O^+N[F9F9F[ONXSB(B(9F;_B[N9F9F9F[ON?
  1949. XMXSB(B&9F_XNYF9F9F9F[7NXSB(AF9O^+N9F9F9F9NUCNXSB(9F;_B[F9F9F9J
  1950. XMF;M8CNXSB&9F_XNYF9F9F9F[6(CNXXAF9O^+N9F9F9F9NUB(CNZ(9F;_B[N9]
  1951. XMF9F9F[M8B(CNB&9F_XN[N9F9F;N[6(B(B(AF9O^+N[N9F9N[NUB(B(B(9F;_R
  1952. XMB[N[N[N[N[M8B(B(B&9F_XN[N[N[N[N[B(B(B(AF9O^+NXB(B(B+NXB(B(B(F
  1953. XM9F;_B[B(B(B(B+N(B(B(B&9F_XB(B(B(B(B(B(B(B(AF9O^(B(B(B(B(B(B(J
  1954. XMB(B(9F;_B(B(B(B(B(B(B(B(B&9F___________________V9O__________%
  1955. XM__________\`````````````````````````````````````````````````R
  1956. XM`````````````````````````````````````````````````````````````
  1957. XM`````````````````````````````````````````````````````````````
  1958. X!`````
  1959. X``
  1960. Xend
  1961. Xsum -r/size 23881/1107 section (from "begin" to "end")
  1962. Xsum -r/size 55184/766 entire input file
  1963. END_OF_FILE
  1964. if test 1263 -ne `wc -c <'sys/winnt/nhico.uu'`; then
  1965.     echo shar: \"'sys/winnt/nhico.uu'\" unpacked with wrong size!
  1966. fi
  1967. chmod +x 'sys/winnt/nhico.uu'
  1968. # end of 'sys/winnt/nhico.uu'
  1969. echo shar: End of archive 14 \(of 31\).
  1970. cp /dev/null ark14isdone
  1971. MISSING=""
  1972. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ; do
  1973.     if test ! -f ark${I}isdone ; then
  1974.     MISSING="${MISSING} ${I}"
  1975.     fi
  1976. done
  1977. if test "${MISSING}" = "" ; then
  1978.     echo You have unpacked all 31 archives.
  1979.     echo "Now execute 'patchit.sh'"
  1980.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1981. else
  1982.     echo You still need to unpack the following archives:
  1983.     echo "        " ${MISSING}
  1984. fi
  1985. ##  End of shell archive.
  1986. exit 0
  1987.