home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / games / volume16 / nethck31 / patch2t < prev    next >
Encoding:
Internet Message Format  |  1993-06-15  |  55.2 KB

  1. Path: uunet!news.tek.com!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v17i095:  nethack31 - display oriented dungeons & dragons (Ver. 3.1), Patch2t/33
  5. Date: 11 Jun 1993 00:14:48 GMT
  6. Organization: Tektronix, Inc, Redmond, OR, USA
  7. Lines: 2031
  8. Approved: billr@saab.CNA.TEK.COM
  9. Message-ID: <1v8ipo$j5m@ying.cna.tek.com>
  10. NNTP-Posting-Host: saab.cna.tek.com
  11. Xref: uunet comp.sources.games:1781
  12.  
  13. Submitted-by: izchak@linc.cis.upenn.edu (Izchak Miller)
  14. Posting-number: Volume 17, Issue 95
  15. Archive-name: nethack31/Patch2t
  16. Patch-To: nethack31: Volume 16, Issue 1-116
  17. Environment: Amiga, Atari, Mac, MS-DOS, Windows-NT, OS2, Unix, VMS, X11
  18.  
  19.  
  20.  
  21. #! /bin/sh
  22. # This is a shell archive.  Remove anything before this line, then unpack
  23. # it by saving it into a file and typing "sh file".  To overwrite existing
  24. # files, type "sh file -c".  You can also feed this as standard input via
  25. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  26. # will see the following message at the end:
  27. #        "End of archive 20 (of 33)."
  28. # Contents:  patches02g
  29. # Wrapped by billr@saab on Thu Jun 10 16:55:05 1993
  30. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  31. if test -f 'patches02g' -a "${1}" != "-c" ; then 
  32.   echo shar: Renaming existing file \"'patches02g'\" to \"'patches02g.orig'\"
  33.   mv -f 'patches02g' 'patches02g.orig'
  34. fi
  35. echo shar: Extracting \"'patches02g'\" \(52366 characters\)
  36. sed "s/^X//" >'patches02g' <<'END_OF_FILE'
  37. X*** /tmp/da11242    Tue Jun  1 16:15:08 1993
  38. X--- src/pickup.c    Tue May 11 13:53:18 1993
  39. X***************
  40. X*** 1,4 ****
  41. X! /*    SCCS Id: @(#)pickup.c    3.1    93/02/16    */
  42. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  43. X  /* NetHack may be freely redistributed.  See license for details. */
  44. X  
  45. X--- 1,4 ----
  46. X! /*    SCCS Id: @(#)pickup.c    3.1    93/04/11    */
  47. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  48. X  /* NetHack may be freely redistributed.  See license for details. */
  49. X  
  50. X***************
  51. X*** 12,18 ****
  52. X  static void FDECL(simple_look, (struct obj *,BOOLEAN_P));
  53. X  static boolean FDECL(query_classes, (char *,boolean *,boolean *,
  54. X                   const char *,struct obj *,BOOLEAN_P,BOOLEAN_P));
  55. X! static boolean FDECL(pickup_object, (struct obj *,struct obj *));
  56. X  static boolean FDECL(mbag_explodes, (struct obj *,int));
  57. X  STATIC_PTR int FDECL(in_container,(struct obj *));
  58. X  STATIC_PTR int FDECL(ck_bag,(struct obj *));
  59. X--- 12,19 ----
  60. X  static void FDECL(simple_look, (struct obj *,BOOLEAN_P));
  61. X  static boolean FDECL(query_classes, (char *,boolean *,boolean *,
  62. X                   const char *,struct obj *,BOOLEAN_P,BOOLEAN_P));
  63. X! static void FDECL(check_here, (BOOLEAN_P));
  64. X! static int FDECL(pickup_object, (struct obj *,struct obj *));
  65. X  static boolean FDECL(mbag_explodes, (struct obj *,int));
  66. X  STATIC_PTR int FDECL(in_container,(struct obj *));
  67. X  STATIC_PTR int FDECL(ck_bag,(struct obj *));
  68. X***************
  69. X*** 104,111 ****
  70. X  }
  71. X  
  72. X  static boolean
  73. X! query_classes(olets, one_at_a_time, everything, action, objs, here, incl_gold)
  74. X! char olets[];
  75. X  boolean *one_at_a_time, *everything;
  76. X  const char *action;
  77. X  struct obj *objs;
  78. X--- 105,112 ----
  79. X  }
  80. X  
  81. X  static boolean
  82. X! query_classes(oclasses, one_at_a_time, everything, action, objs, here, incl_gold)
  83. X! char oclasses[];
  84. X  boolean *one_at_a_time, *everything;
  85. X  const char *action;
  86. X  struct obj *objs;
  87. X***************
  88. X*** 112,128 ****
  89. X  boolean here, incl_gold;
  90. X  {
  91. X      char ilets[20], inbuf[BUFSZ];
  92. X!     int iletct, oletct;
  93. X      char qbuf[QBUFSZ];
  94. X  
  95. X!     olets[oletct = 0] = '\0';
  96. X      *one_at_a_time = *everything = FALSE;
  97. X      iletct = collect_obj_classes(ilets, objs, here, incl_gold);
  98. X      if (iletct == 0) {
  99. X          return FALSE;
  100. X      } else if (iletct == 1) {
  101. X!         olets[0] = def_char_to_objclass(ilets[0]);
  102. X!         olets[1] = '\0';
  103. X      } else  {    /* more than one choice available */
  104. X          const char *where = 0;
  105. X          register char sym, oc_of_sym, *p;
  106. X--- 113,129 ----
  107. X  boolean here, incl_gold;
  108. X  {
  109. X      char ilets[20], inbuf[BUFSZ];
  110. X!     int iletct, oclassct;
  111. X      char qbuf[QBUFSZ];
  112. X  
  113. X!     oclasses[oclassct = 0] = '\0';
  114. X      *one_at_a_time = *everything = FALSE;
  115. X      iletct = collect_obj_classes(ilets, objs, here, incl_gold);
  116. X      if (iletct == 0) {
  117. X          return FALSE;
  118. X      } else if (iletct == 1) {
  119. X!         oclasses[0] = def_char_to_objclass(ilets[0]);
  120. X!         oclasses[1] = '\0';
  121. X      } else  {    /* more than one choice available */
  122. X          const char *where = 0;
  123. X          register char sym, oc_of_sym, *p;
  124. X***************
  125. X*** 133,139 ****
  126. X          ilets[iletct++] = (objs == invent ? 'i' : ':');
  127. X          ilets[iletct] = '\0';
  128. X  ask_again:
  129. X!         olets[oletct = 0] = '\0';
  130. X          *one_at_a_time = *everything = FALSE;
  131. X          Sprintf(qbuf,"What kinds of thing do you want to %s? [%s]",
  132. X              action, ilets);
  133. X--- 134,140 ----
  134. X          ilets[iletct++] = (objs == invent ? 'i' : ':');
  135. X          ilets[iletct] = '\0';
  136. X  ask_again:
  137. X!         oclasses[oclassct = 0] = '\0';
  138. X          *one_at_a_time = *everything = FALSE;
  139. X          Sprintf(qbuf,"What kinds of thing do you want to %s? [%s]",
  140. X              action, ilets);
  141. X***************
  142. X*** 154,161 ****
  143. X              } else {
  144. X              oc_of_sym = def_char_to_objclass(sym);
  145. X              if (index(ilets,sym)) {
  146. X!                 olets[oletct++] = oc_of_sym;
  147. X!                 olets[oletct] = '\0';
  148. X              } else {
  149. X                  if (!where)
  150. X                  where = !strcmp(action,"pick up")  ? "here" :
  151. X--- 155,162 ----
  152. X              } else {
  153. X              oc_of_sym = def_char_to_objclass(sym);
  154. X              if (index(ilets,sym)) {
  155. X!                 oclasses[oclassct++] = oc_of_sym;
  156. X!                 oclasses[oclassct] = '\0';
  157. X              } else {
  158. X                  if (!where)
  159. X                  where = !strcmp(action,"pick up")  ? "here" :
  160. X***************
  161. X*** 168,178 ****
  162. X              }
  163. X              }
  164. X          }
  165. X!         if (!oletct && !*everything) *one_at_a_time = TRUE;
  166. X      }
  167. X      return TRUE;
  168. X  }
  169. X  
  170. X  void
  171. X  pickup(all)
  172. X  int all;    /* all >= 0 => yes/no; < 0 => -count */
  173. X--- 169,209 ----
  174. X              }
  175. X              }
  176. X          }
  177. X!         if (!oclassct && !*everything) *one_at_a_time = TRUE;
  178. X      }
  179. X      return TRUE;
  180. X  }
  181. X  
  182. X+ /* look at the objects at our location, unless there are too many of them */
  183. X+ static void
  184. X+ check_here(picked_some)
  185. X+ boolean picked_some;
  186. X+ {
  187. X+     register struct obj *obj;
  188. X+     register int ct = 0;
  189. X+ 
  190. X+     /* count the objects here */
  191. X+     for (obj = level.objects[u.ux][u.uy]; obj; obj = obj->nexthere) {
  192. X+         if (obj != uchain)
  193. X+         ct++;
  194. X+     }
  195. X+ 
  196. X+     /* If there are objects here, take a look. */
  197. X+     if (ct) {
  198. X+         if (flags.run) nomul(0);
  199. X+         flush_screen(1);
  200. X+         if (ct < 5) {
  201. X+         (void) dolook();
  202. X+         } else {
  203. X+         read_engr_at(u.ux,u.uy);
  204. X+         pline("There are several %sobjects here.",
  205. X+               picked_some ? "more " : "");
  206. X+         }
  207. X+     } else {
  208. X+         read_engr_at(u.ux,u.uy);
  209. X+     }
  210. X+ }
  211. X+ 
  212. X  void
  213. X  pickup(all)
  214. X  int all;    /* all >= 0 => yes/no; < 0 => -count */
  215. X***************
  216. X*** 179,192 ****
  217. X  {
  218. X      register struct obj *obj;
  219. X      struct obj *obj2, *objx;
  220. X!     boolean all_of_a_type = FALSE, selective = FALSE;
  221. X!     char olets[20];
  222. X      long count;
  223. X  
  224. X      count = (all < 0) ? (-1L * all) : 0L;
  225. X      if (count) all = 0;
  226. X  
  227. X!     if(Levitation && !Is_airlevel(&u.uz) && !Is_waterlevel(&u.uz)) {
  228. X          if ((multi && !flags.run) || (all && !flags.pickup))
  229. X              read_engr_at(u.ux,u.uy);
  230. X          return;
  231. X--- 210,230 ----
  232. X  {
  233. X      register struct obj *obj;
  234. X      struct obj *obj2, *objx;
  235. X!     boolean all_of_a_type, selective;
  236. X!     char oclasses[20];
  237. X      long count;
  238. X+     int pick, pick_count = 0;
  239. X  
  240. X      count = (all < 0) ? (-1L * all) : 0L;
  241. X      if (count) all = 0;
  242. X  
  243. X!     if (all && (flags.nopick || !OBJ_AT(u.ux, u.uy) ||
  244. X!             (is_pool(u.ux, u.uy) && !Underwater))) {
  245. X!         read_engr_at(u.ux, u.uy);
  246. X!         return;
  247. X!     }
  248. X! 
  249. X!     if (Levitation && !Is_airlevel(&u.uz) && !Is_waterlevel(&u.uz)) {
  250. X          if ((multi && !flags.run) || (all && !flags.pickup))
  251. X              read_engr_at(u.ux,u.uy);
  252. X          return;
  253. X***************
  254. X*** 197,276 ****
  255. X       * teleported onto the object.  They shouldn't pick it up.
  256. X       */
  257. X      if ((multi && !flags.run) || (all && !flags.pickup)) {
  258. X!         int ct = 0;
  259. X! 
  260. X!         for (obj = level.objects[u.ux][u.uy]; obj;
  261. X!                          obj = obj->nexthere)
  262. X!             if(obj != uchain)
  263. X!                 ct++;
  264. X! 
  265. X!         /* If there are objects here, take a look.
  266. X!          */
  267. X!         if (ct) {
  268. X!             if (flags.run)
  269. X!                 nomul(0);
  270. X!             flush_screen(1);
  271. X!             if (ct < 5)
  272. X!                 (void) dolook();
  273. X!             else {
  274. X!                 read_engr_at(u.ux,u.uy);
  275. X!                 pline("There are several objects here.");
  276. X!             }
  277. X!         } else read_engr_at(u.ux,u.uy);
  278. X          return;
  279. X      }
  280. X  
  281. X!     /* check for more than one object */
  282. X!     if(!all) {
  283. X          register int ct = 0;
  284. X  
  285. X!         for(obj = level.objects[u.ux][u.uy]; obj; obj = obj->nexthere)
  286. X!             ct++;
  287. X!         if(ct < 2)
  288. X!             all++;
  289. X!         else {
  290. X!             pline("There are several objects here.");
  291. X!             count = 0;
  292. X!         }
  293. X!     }
  294. X  
  295. X!     /* added by GAN 10/24/86 to allow selective picking up */
  296. X!     if (!all) {
  297. X!         if (!query_classes(olets, &selective, &all_of_a_type,
  298. X                "pick up", level.objects[u.ux][u.uy], TRUE, FALSE))
  299. X              return;
  300. X      }
  301. X-     if(all_of_a_type && !olets[0]) all = TRUE;
  302. X  
  303. X!     for(obj = level.objects[u.ux][u.uy]; obj; obj = obj2) {
  304. X          obj2 = obj->nexthere;    /* perhaps obj will be picked up */
  305. X          objx = 0;
  306. X!         if(flags.run) nomul(0);
  307. X  
  308. X!         if(!all)  {
  309. X!             if(!selective && !index(olets,obj->oclass)) continue;
  310. X  
  311. X!             if (!all_of_a_type) {
  312. X!             char qbuf[QBUFSZ];
  313. X!             Sprintf(qbuf, "Pick up %s?", doname(obj));
  314. X!             switch ((obj->quan < 2L) ? ynaq(qbuf) : ynNaq(qbuf)) {
  315. X!             case 'q': return;
  316. X!             case 'n': continue;
  317. X!             case 'a':
  318. X!                 all_of_a_type = TRUE;
  319. X!                 if (selective) {
  320. X!                 selective = FALSE;
  321. X!                 olets[0] = obj->oclass;
  322. X!                 olets[1] = '\0';
  323. X!                 }
  324. X!                 break;
  325. X!             case '#':    /* count was entered */
  326. X!                 if (!yn_number) continue; /* 0 count => No */
  327. X!                 else count = yn_number;
  328. X!                 /* fall thru */
  329. X!             default:    /* 'y' */
  330. X!                 break;
  331. X              }
  332. X              }
  333. X          }
  334. X  
  335. X--- 235,296 ----
  336. X       * teleported onto the object.  They shouldn't pick it up.
  337. X       */
  338. X      if ((multi && !flags.run) || (all && !flags.pickup)) {
  339. X!         check_here(FALSE);
  340. X          return;
  341. X      }
  342. X  
  343. X!     oclasses[0] = '\0';    /* types to consider (empty for all) */
  344. X!     all_of_a_type = TRUE;    /* take all of considered types */
  345. X!     selective = FALSE;    /* ask for each item */
  346. X! 
  347. X!     if (all) {
  348. X!         if (flags.pickup) Strcpy(oclasses, flags.pickup_types);
  349. X!     } else {
  350. X!         /* check for more than one object */
  351. X          register int ct = 0;
  352. X  
  353. X!         for (obj = level.objects[u.ux][u.uy]; obj; obj = obj->nexthere)
  354. X!             ct++;
  355. X  
  356. X!         if (ct >= 2) {
  357. X!             pline("There are several objects here.");
  358. X!             count = 0;
  359. X! 
  360. X!             /* added by GAN 10/24/86 to allow selective picking up */
  361. X!             if (!query_classes(oclasses, &selective, &all_of_a_type,
  362. X                "pick up", level.objects[u.ux][u.uy], TRUE, FALSE))
  363. X              return;
  364. X+         }
  365. X      }
  366. X  
  367. X!     for (obj = level.objects[u.ux][u.uy]; obj; obj = obj2) {
  368. X          obj2 = obj->nexthere;    /* perhaps obj will be picked up */
  369. X          objx = 0;
  370. X!         if (flags.run) nomul(0);
  371. X  
  372. X!         if (!selective && oclasses[0] && !index(oclasses,obj->oclass))
  373. X!             continue;
  374. X  
  375. X!         if (!all_of_a_type) {
  376. X!             char qbuf[QBUFSZ];
  377. X!             Sprintf(qbuf, "Pick up %s?", doname(obj));
  378. X!             switch ((obj->quan < 2L) ? ynaq(qbuf) : ynNaq(qbuf)) {
  379. X!             case 'q': return;
  380. X!             case 'n': continue;
  381. X!             case 'a':
  382. X!             all_of_a_type = TRUE;
  383. X!             if (selective) {
  384. X!                 selective = FALSE;
  385. X!                 oclasses[0] = obj->oclass;
  386. X!                 oclasses[1] = '\0';
  387. X              }
  388. X+             break;
  389. X+             case '#':    /* count was entered */
  390. X+             if (!yn_number) continue; /* 0 count => No */
  391. X+             else count = yn_number;
  392. X+             /* fall thru */
  393. X+             default:    /* 'y' */
  394. X+             break;
  395. X              }
  396. X          }
  397. X  
  398. X***************
  399. X*** 287,293 ****
  400. X              }
  401. X              count = 0;    /* reset */
  402. X          }
  403. X!         if (pickup_object(obj, objx)) break;
  404. X      }
  405. X  
  406. X      /*
  407. X--- 307,314 ----
  408. X              }
  409. X              count = 0;    /* reset */
  410. X          }
  411. X!         if ((pick = pickup_object(obj, objx)) < 0) break;
  412. X!         pick_count += pick;
  413. X      }
  414. X  
  415. X      /*
  416. X***************
  417. X*** 295,307 ****
  418. X       *  map is correct.
  419. X       */
  420. X      newsym(u.ux,u.uy);
  421. X  }
  422. X  
  423. X  /*
  424. X   * Pick up an object from the ground or out of a container and add it to
  425. X!  * the inventory.  Returns true if pickup() should break out of its loop.
  426. X   */
  427. X! static boolean
  428. X  pickup_object(obj, objx)
  429. X  struct obj *obj, *objx;
  430. X  {
  431. X--- 316,332 ----
  432. X       *  map is correct.
  433. X       */
  434. X      newsym(u.ux,u.uy);
  435. X+ 
  436. X+     /* see whether there's anything else here, after auto-pickup is done */
  437. X+     if (all && flags.pickup) check_here(pick_count > 0);
  438. X  }
  439. X  
  440. X  /*
  441. X   * Pick up an object from the ground or out of a container and add it to
  442. X!  * the inventory.  Returns -1 if pickup() should break out of its loop,
  443. X!  * 0 if nothing picked up, 1 if otherwise.
  444. X   */
  445. X! static int
  446. X  pickup_object(obj, objx)
  447. X  struct obj *obj, *objx;
  448. X  {
  449. X***************
  450. X*** 308,317 ****
  451. X      int wt, nearload;
  452. X      long pickquan;
  453. X  
  454. X      if (obj == uchain) {    /* do not pick up attached chain */
  455. X!         return FALSE;
  456. X      } else if (obj->oartifact && !touch_artifact(obj,&youmonst)) {
  457. X!         return FALSE;
  458. X      } else if (obj->otyp == GOLD_PIECE) {
  459. X          /*
  460. X           *  Special consideration for gold pieces...
  461. X--- 333,346 ----
  462. X      int wt, nearload;
  463. X      long pickquan;
  464. X  
  465. X+     /* in case of auto-pickup, where we haven't had a chance
  466. X+        to look at it yet; affects docall(SCR_SCARE_MONSTER) */
  467. X+     if (!Blind) obj->dknown = 1;
  468. X+ 
  469. X      if (obj == uchain) {    /* do not pick up attached chain */
  470. X!         return 0;
  471. X      } else if (obj->oartifact && !touch_artifact(obj,&youmonst)) {
  472. X!         return 0;
  473. X      } else if (obj->otyp == GOLD_PIECE) {
  474. X          /*
  475. X           *  Special consideration for gold pieces...
  476. X***************
  477. X*** 324,330 ****
  478. X         pline("There %s %ld gold piece%s here, but you cannot carry any more.",
  479. X              (obj->quan == 1L) ? "is" : "are",
  480. X              obj->quan, plur(obj->quan));
  481. X!         return FALSE;
  482. X          } else if (gold_capacity < obj->quan) {
  483. X          if (objx) unsplitobj(obj, objx, 0L);
  484. X          You("can only carry %s of the %ld gold pieces lying here.",
  485. X--- 353,359 ----
  486. X         pline("There %s %ld gold piece%s here, but you cannot carry any more.",
  487. X              (obj->quan == 1L) ? "is" : "are",
  488. X              obj->quan, plur(obj->quan));
  489. X!         return 0;
  490. X          } else if (gold_capacity < obj->quan) {
  491. X          if (objx) unsplitobj(obj, objx, 0L);
  492. X          You("can only carry %s of the %ld gold pieces lying here.",
  493. X***************
  494. X*** 348,354 ****
  495. X          }
  496. X          flags.botl = 1;
  497. X          if (flags.run) nomul(0);
  498. X!         return FALSE;
  499. X      } else if (obj->otyp == CORPSE) {
  500. X  
  501. X          if (obj->corpsenm == PM_COCKATRICE && !uarmg
  502. X--- 377,383 ----
  503. X          }
  504. X          flags.botl = 1;
  505. X          if (flags.run) nomul(0);
  506. X!         return 1;
  507. X      } else if (obj->otyp == CORPSE) {
  508. X  
  509. X          if (obj->corpsenm == PM_COCKATRICE && !uarmg
  510. X***************
  511. X*** 368,379 ****
  512. X              killer_format = KILLED_BY_AN;
  513. X              killer = "cockatrice corpse";
  514. X              done(STONING);
  515. X          }
  516. X          } else if (is_rider(&mons[obj->corpsenm])) {
  517. X          pline("At your touch, the corpse suddenly moves...");
  518. X          revive_corpse(obj, 1, FALSE);
  519. X          exercise(A_WIS, FALSE);
  520. X!         return FALSE;
  521. X          }
  522. X      } else  if (obj->otyp == SCR_SCARE_MONSTER) {
  523. X          if (obj->blessed) obj->blessed = 0;
  524. X--- 397,409 ----
  525. X              killer_format = KILLED_BY_AN;
  526. X              killer = "cockatrice corpse";
  527. X              done(STONING);
  528. X+             return -1;
  529. X          }
  530. X          } else if (is_rider(&mons[obj->corpsenm])) {
  531. X          pline("At your touch, the corpse suddenly moves...");
  532. X          revive_corpse(obj, 1, FALSE);
  533. X          exercise(A_WIS, FALSE);
  534. X!         return -1;
  535. X          }
  536. X      } else  if (obj->otyp == SCR_SCARE_MONSTER) {
  537. X          if (obj->blessed) obj->blessed = 0;
  538. X***************
  539. X*** 386,392 ****
  540. X                      !(objects[SCR_SCARE_MONSTER].oc_uname))
  541. X              docall(obj);
  542. X          useupf(obj);
  543. X!         return FALSE;
  544. X          }
  545. X      }
  546. X  
  547. X--- 416,423 ----
  548. X                      !(objects[SCR_SCARE_MONSTER].oc_uname))
  549. X              docall(obj);
  550. X          useupf(obj);
  551. X!         return 1;    /* tried to pick something up and failed, but
  552. X!                    don't want to terminate pickup loop yet   */
  553. X          }
  554. X      }
  555. X  
  556. X***************
  557. X*** 438,444 ****
  558. X                  "they are too heavy for you to lift") :
  559. X              "you cannot carry any more");
  560. X          if (obj->otyp == SCR_SCARE_MONSTER) obj->spe = 0;
  561. X!         return TRUE;
  562. X      }
  563. X  
  564. X  lift_some:
  565. X--- 469,475 ----
  566. X                  "they are too heavy for you to lift") :
  567. X              "you cannot carry any more");
  568. X          if (obj->otyp == SCR_SCARE_MONSTER) obj->spe = 0;
  569. X!         return -1;
  570. X      }
  571. X  
  572. X  lift_some:
  573. X***************
  574. X*** 446,452 ****
  575. X          if (objx) unsplitobj(obj, objx, 0L);
  576. X          if (obj->otyp == SCR_SCARE_MONSTER) obj->spe = 0;
  577. X          Your("knapsack cannot accommodate any more items.");
  578. X!         return TRUE;
  579. X      }
  580. X  
  581. X      if (obj->otyp != LOADSTONE &&
  582. X--- 477,483 ----
  583. X          if (objx) unsplitobj(obj, objx, 0L);
  584. X          if (obj->otyp == SCR_SCARE_MONSTER) obj->spe = 0;
  585. X          Your("knapsack cannot accommodate any more items.");
  586. X!         return -1;
  587. X      }
  588. X  
  589. X      if (obj->otyp != LOADSTONE &&
  590. X***************
  591. X*** 462,468 ****
  592. X                  if (objx) unsplitobj(obj, objx, 0L);
  593. X                  if (obj->otyp == SCR_SCARE_MONSTER)
  594. X                      obj->spe = 0;
  595. X!                 return (ch == 'q');
  596. X              default:  break;    /* 'y' */
  597. X          }
  598. X      }
  599. X--- 493,499 ----
  600. X                  if (objx) unsplitobj(obj, objx, 0L);
  601. X                  if (obj->otyp == SCR_SCARE_MONSTER)
  602. X                      obj->spe = 0;
  603. X!                 return (ch == 'q') ? -1 : 0;
  604. X              default:  break;    /* 'y' */
  605. X          }
  606. X      }
  607. X***************
  608. X*** 470,482 ****
  609. X      pickquan = obj->quan;    /* save number picked up */
  610. X      obj = pick_obj(obj);
  611. X  
  612. X-     if (!Blind) obj->dknown = 1;
  613. X      if (uwep && uwep == obj) mrg_to_wielded = TRUE;
  614. X      nearload = near_capacity();
  615. X!     prinv(nearload > UNENCUMBERED && nearload < MOD_ENCUMBER ?
  616. X!           moderateloadmsg : NULL, obj, pickquan);
  617. X      mrg_to_wielded = FALSE;
  618. X!     return FALSE;
  619. X  }
  620. X  
  621. X  /* Gold never reaches this routine. */
  622. X--- 501,512 ----
  623. X      pickquan = obj->quan;    /* save number picked up */
  624. X      obj = pick_obj(obj);
  625. X  
  626. X      if (uwep && uwep == obj) mrg_to_wielded = TRUE;
  627. X      nearload = near_capacity();
  628. X!     prinv(nearload == SLT_ENCUMBER ? moderateloadmsg : NULL,
  629. X!         obj, pickquan);
  630. X      mrg_to_wielded = FALSE;
  631. X!     return 1;
  632. X  }
  633. X  
  634. X  /* Gold never reaches this routine. */
  635. X***************
  636. X*** 608,614 ****
  637. X      if ((Is_mbag(obj) || (obj->otyp == WAN_CANCELLATION && obj->spe > 0)) &&
  638. X      (rn2(1 << (depthin > 7 ? 7 : depthin)) <= depthin))
  639. X      return TRUE;
  640. X!     else if (Is_container(obj)) {
  641. X      struct obj *otmp;
  642. X  
  643. X      for (otmp = obj->cobj; otmp; otmp = otmp->nobj)
  644. X--- 638,644 ----
  645. X      if ((Is_mbag(obj) || (obj->otyp == WAN_CANCELLATION && obj->spe > 0)) &&
  646. X      (rn2(1 << (depthin > 7 ? 7 : depthin)) <= depthin))
  647. X      return TRUE;
  648. X!     else if (Has_contents(obj)) {
  649. X      struct obj *otmp;
  650. X  
  651. X      for (otmp = obj->cobj; otmp; otmp = otmp->nobj)
  652. X***************
  653. X*** 860,867 ****
  654. X      }
  655. X      /* Count the number of contained objects. Sometimes toss objects if */
  656. X      /* a cursed magic bag.                            */
  657. X!     for(curr = obj->cobj, prev = (struct obj *) 0; curr;
  658. X!                         prev = curr, curr = otmp) {
  659. X          otmp = curr->nobj;
  660. X          if (Is_mbag(obj) && obj->cursed && !rn2(13)) {
  661. X          if (curr->known)
  662. X--- 890,897 ----
  663. X      }
  664. X      /* Count the number of contained objects. Sometimes toss objects if */
  665. X      /* a cursed magic bag.                            */
  666. X!     prev = (struct obj *) 0;
  667. X!     for (curr = obj->cobj; curr; curr = otmp) {
  668. X          otmp = curr->nobj;
  669. X          if (Is_mbag(obj) && obj->cursed && !rn2(13)) {
  670. X          if (curr->known)
  671. X***************
  672. X*** 888,895 ****
  673. X          }
  674. X          /* obfree() will free all contained objects */
  675. X          obfree(curr, (struct obj *) 0);
  676. X!         } else
  677. X          cnt++;
  678. X      }
  679. X  
  680. X      if (cnt && loss)
  681. X--- 918,927 ----
  682. X          }
  683. X          /* obfree() will free all contained objects */
  684. X          obfree(curr, (struct obj *) 0);
  685. X!         } else {
  686. X!         prev = curr;
  687. X          cnt++;
  688. X+         }
  689. X      }
  690. X  
  691. X      if (cnt && loss)
  692. X*** /tmp/da11258    Tue Jun  1 16:15:13 1993
  693. X--- src/polyself.c    Tue Jun  1 10:47:50 1993
  694. X***************
  695. X*** 1,4 ****
  696. X! /*    SCCS Id: @(#)polyself.c 3.1    92/11/24
  697. X  /*    Copyright (C) 1987, 1988, 1989 by Ken Arromdee */
  698. X  /* NetHack may be freely redistributed.  See license for details. */
  699. X  
  700. X--- 1,4 ----
  701. X! /*    SCCS Id: @(#)polyself.c 3.1    93/05/15    */
  702. X  /*    Copyright (C) 1987, 1988, 1989 by Ken Arromdee */
  703. X  /* NetHack may be freely redistributed.  See license for details. */
  704. X  
  705. X***************
  706. X*** 96,102 ****
  707. X      redist_attr();
  708. X      u.uhunger = rn1(500,500);
  709. X      newuhs(FALSE);
  710. X!     Sick = 0;
  711. X      Stoned = 0;
  712. X      if (u.uhp <= 0 || u.uhpmax <= 0) {
  713. X  #ifdef POLYSELF
  714. X--- 96,102 ----
  715. X      redist_attr();
  716. X      u.uhunger = rn1(500,500);
  717. X      newuhs(FALSE);
  718. X!     if (Sick) make_sick(0L, FALSE);
  719. X      Stoned = 0;
  720. X      if (u.uhp <= 0 || u.uhpmax <= 0) {
  721. X  #ifdef POLYSELF
  722. X***************
  723. X*** 274,280 ****
  724. X          You("no longer seem to be petrifying.");
  725. X      }
  726. X      if (u.usym == S_FUNGUS && Sick) {
  727. X!         Sick = 0;
  728. X          You("no longer feel sick.");
  729. X      }
  730. X  
  731. X--- 274,280 ----
  732. X          You("no longer seem to be petrifying.");
  733. X      }
  734. X      if (u.usym == S_FUNGUS && Sick) {
  735. X!         make_sick(0L, FALSE);
  736. X          You("no longer feel sick.");
  737. X      }
  738. X  
  739. X***************
  740. X*** 360,365 ****
  741. X--- 360,369 ----
  742. X          u.utrap = 0;
  743. X          pline("The rock seems to no longer trap you.");
  744. X      }
  745. X+     if ((amorphous(uasmon) || is_whirly(uasmon)) && Punished) {
  746. X+         You("slip out of the iron chain.");
  747. X+         unpunish();
  748. X+     }
  749. X      flags.botl = 1;
  750. X      vision_full_recalc = 1;
  751. X      exercise(A_CON, FALSE);
  752. X***************
  753. X*** 371,380 ****
  754. X  static void
  755. X  break_armor()
  756. X  {
  757. X!      struct obj *otmp;
  758. X  
  759. X!      if (breakarm(uasmon)) {
  760. X!     if (otmp = uarm) {
  761. X          if (donning(otmp)) cancel_don();
  762. X          You("break out of your armor!");
  763. X          exercise(A_STR, FALSE);
  764. X--- 375,384 ----
  765. X  static void
  766. X  break_armor()
  767. X  {
  768. X!     register struct obj *otmp;
  769. X  
  770. X!     if (breakarm(uasmon)) {
  771. X!     if ((otmp = uarm) != 0) {
  772. X          if (donning(otmp)) cancel_don();
  773. X          You("break out of your armor!");
  774. X          exercise(A_STR, FALSE);
  775. X***************
  776. X*** 381,387 ****
  777. X          (void) Armor_gone();
  778. X          useup(otmp);
  779. X      }
  780. X!     if (otmp = uarmc) {
  781. X          if(otmp->oartifact) {
  782. X          Your("cloak falls off!");
  783. X          (void) Cloak_off();
  784. X--- 385,391 ----
  785. X          (void) Armor_gone();
  786. X          useup(otmp);
  787. X      }
  788. X!     if ((otmp = uarmc) != 0) {
  789. X          if(otmp->oartifact) {
  790. X          Your("cloak falls off!");
  791. X          (void) Cloak_off();
  792. X***************
  793. X*** 398,411 ****
  794. X          useup(uarmu);
  795. X      }
  796. X  #endif
  797. X!      } else if (sliparm(uasmon)) {
  798. X!     if (otmp = uarm) {
  799. X          if (donning(otmp)) cancel_don();
  800. X          Your("armor falls around you!");
  801. X          (void) Armor_gone();
  802. X          dropx(otmp);
  803. X      }
  804. X!     if (otmp = uarmc) {
  805. X          if (is_whirly(uasmon))
  806. X              Your("cloak falls, unsupported!");
  807. X          else You("shrink out of your cloak!");
  808. X--- 402,415 ----
  809. X          useup(uarmu);
  810. X      }
  811. X  #endif
  812. X!     } else if (sliparm(uasmon)) {
  813. X!     if ((otmp = uarm) != 0) {
  814. X          if (donning(otmp)) cancel_don();
  815. X          Your("armor falls around you!");
  816. X          (void) Armor_gone();
  817. X          dropx(otmp);
  818. X      }
  819. X!     if ((otmp = uarmc) != 0) {
  820. X          if (is_whirly(uasmon))
  821. X              Your("cloak falls, unsupported!");
  822. X          else You("shrink out of your cloak!");
  823. X***************
  824. X*** 413,419 ****
  825. X          dropx(otmp);
  826. X      }
  827. X  #ifdef TOURIST
  828. X!     if (otmp = uarmu) {
  829. X          if (is_whirly(uasmon))
  830. X              You("seep right through your shirt!");
  831. X          else You("become much too small for your shirt!");
  832. X--- 417,423 ----
  833. X          dropx(otmp);
  834. X      }
  835. X  #ifdef TOURIST
  836. X!     if ((otmp = uarmu) != 0) {
  837. X          if (is_whirly(uasmon))
  838. X              You("seep right through your shirt!");
  839. X          else You("become much too small for your shirt!");
  840. X***************
  841. X*** 421,457 ****
  842. X          dropx(otmp);
  843. X      }
  844. X  #endif
  845. X!      }
  846. X!      if (nohands(uasmon) || verysmall(uasmon)) {
  847. X!       if (otmp = uarmg) {
  848. X!            if (donning(otmp)) cancel_don();
  849. X!            /* Drop weapon along with gloves */
  850. X!            You("drop your gloves%s!", uwep ? " and weapon" : "");
  851. X!            drop_weapon(0);
  852. X!            (void) Gloves_off();
  853. X!            dropx(otmp);
  854. X!       }
  855. X!       if (otmp = uarms) {
  856. X!            You("can no longer hold your shield!");
  857. X!            (void) Shield_off();
  858. X!            dropx(otmp);
  859. X!       }
  860. X!       if (otmp = uarmh) {
  861. X!            if (donning(otmp)) cancel_don();
  862. X!            Your("helmet falls to the floor!");
  863. X!            (void) Helmet_off();
  864. X!            dropx(otmp);
  865. X!       }
  866. X!       if (otmp = uarmf) {
  867. X!            if (donning(otmp)) cancel_don();
  868. X!            if (is_whirly(uasmon))
  869. X!            Your("boots fall away!");
  870. X!            else Your("boots %s off your feet!",
  871. X              verysmall(uasmon) ? "slide" : "are pushed");
  872. X!            (void) Boots_off();
  873. X!            dropx(otmp);
  874. X!       }
  875. X!      }
  876. X  }
  877. X  
  878. X  static void
  879. X--- 425,464 ----
  880. X          dropx(otmp);
  881. X      }
  882. X  #endif
  883. X!     }
  884. X!     if (nohands(uasmon) || verysmall(uasmon)) {
  885. X!     if ((otmp = uarmg) != 0) {
  886. X!         if (donning(otmp)) cancel_don();
  887. X!         /* Drop weapon along with gloves */
  888. X!         You("drop your gloves%s!", uwep ? " and weapon" : "");
  889. X!         drop_weapon(0);
  890. X!         (void) Gloves_off();
  891. X!         dropx(otmp);
  892. X!     }
  893. X!     if ((otmp = uarms) != 0) {
  894. X!         You("can no longer hold your shield!");
  895. X!         (void) Shield_off();
  896. X!         dropx(otmp);
  897. X!     }
  898. X!     if ((otmp = uarmh) != 0) {
  899. X!         if (donning(otmp)) cancel_don();
  900. X!         Your("helmet falls to the floor!");
  901. X!         (void) Helmet_off();
  902. X!         dropx(otmp);
  903. X!     }
  904. X!     }
  905. X!     if (nohands(uasmon) || verysmall(uasmon) || slithy(uasmon) || 
  906. X!         u.usym == S_CENTAUR) {
  907. X!     if ((otmp = uarmf) != 0) {
  908. X!         if (donning(otmp)) cancel_don();
  909. X!         if (is_whirly(uasmon))
  910. X!         Your("boots fall away!");
  911. X!         else Your("boots %s off your feet!",
  912. X              verysmall(uasmon) ? "slide" : "are pushed");
  913. X!         (void) Boots_off();
  914. X!         dropx(otmp);
  915. X!     }
  916. X!     }
  917. X  }
  918. X  
  919. X  static void
  920. X***************
  921. X*** 459,465 ****
  922. X  int alone;
  923. X  {
  924. X       struct obj *otmp;
  925. X!      if (otmp = uwep) {
  926. X        /* !alone check below is currently superfluous but in the
  927. X         * future it might not be so if there are monsters which cannot
  928. X         * wear gloves but can wield weapons
  929. X--- 466,472 ----
  930. X  int alone;
  931. X  {
  932. X       struct obj *otmp;
  933. X!      if ((otmp = uwep) != 0) {
  934. X        /* !alone check below is currently superfluous but in the
  935. X         * future it might not be so if there are monsters which cannot
  936. X         * wear gloves but can wield weapons
  937. X***************
  938. X*** 587,593 ****
  939. X          case PIT:
  940. X          case SPIKED_PIT: You("spin a web, covering up the pit.");
  941. X              deltrap(ttmp);
  942. X!             delallobj(u.ux, u.uy);
  943. X              if (Invisible) newsym(u.ux, u.uy);
  944. X              return(1);
  945. X          case SQKY_BOARD: pline("The squeaky board is muffled.");
  946. X--- 594,600 ----
  947. X          case PIT:
  948. X          case SPIKED_PIT: You("spin a web, covering up the pit.");
  949. X              deltrap(ttmp);
  950. X!             bury_objs(u.ux, u.uy);
  951. X              if (Invisible) newsym(u.ux, u.uy);
  952. X              return(1);
  953. X          case SQKY_BOARD: pline("The squeaky board is muffled.");
  954. X***************
  955. X*** 596,610 ****
  956. X              return(1);
  957. X          case TELEP_TRAP:
  958. X          case LEVEL_TELEP:
  959. X              Your("webbing vanishes!");
  960. X              return(0);
  961. X          case WEB: You("make the web thicker.");
  962. X              return(1);
  963. X          case TRAPDOOR:
  964. X!             You("web over the trap door.");
  965. X!             deltrap(ttmp);
  966. X!             if (Invisible) newsym(u.ux, u.uy);
  967. X!             return 1;
  968. X          case ARROW_TRAP:
  969. X          case DART_TRAP:
  970. X          case BEAR_TRAP:
  971. X--- 603,618 ----
  972. X              return(1);
  973. X          case TELEP_TRAP:
  974. X          case LEVEL_TELEP:
  975. X+         case MAGIC_PORTAL:
  976. X              Your("webbing vanishes!");
  977. X              return(0);
  978. X          case WEB: You("make the web thicker.");
  979. X              return(1);
  980. X          case TRAPDOOR:
  981. X!             You("web over the trap door.");
  982. X!             deltrap(ttmp);
  983. X!             if (Invisible) newsym(u.ux, u.uy);
  984. X!             return 1;
  985. X          case ARROW_TRAP:
  986. X          case DART_TRAP:
  987. X          case BEAR_TRAP:
  988. X***************
  989. X*** 622,628 ****
  990. X              return(0);
  991. X      }
  992. X      ttmp = maketrap(u.ux, u.uy, WEB);
  993. X!     ttmp->tseen = 1;
  994. X      if (Invisible) newsym(u.ux, u.uy);
  995. X      return(1);
  996. X  }
  997. X--- 630,636 ----
  998. X              return(0);
  999. X      }
  1000. X      ttmp = maketrap(u.ux, u.uy, WEB);
  1001. X!     if (ttmp) ttmp->tseen = 1;
  1002. X      if (Invisible) newsym(u.ux, u.uy);
  1003. X      return(1);
  1004. X  }
  1005. X***************
  1006. X*** 675,680 ****
  1007. X--- 683,691 ----
  1008. X              if (!mtmp->mcanmove || mtmp->mstun || mtmp->msleep ||
  1009. X                      !mtmp->mcansee || !haseyes(mtmp->data))
  1010. X              continue;
  1011. X+ #ifdef MUSE
  1012. X+             if (!mon_reflects(mtmp, "Your gaze is reflected by %s %s."))
  1013. X+ #endif
  1014. X              if (!mtmp->mconf)
  1015. X              Your("gaze confuses %s!", mon_nam(mtmp));
  1016. X              else
  1017. X*** /tmp/da11266    Tue Jun  1 16:15:16 1993
  1018. X--- src/potion.c    Mon May 17 14:04:55 1993
  1019. X***************
  1020. X*** 1,4 ****
  1021. X! /*    SCCS Id: @(#)potion.c    3.1    93/02/06          */
  1022. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1023. X  /* NetHack may be freely redistributed.  See license for details. */
  1024. X  
  1025. X--- 1,4 ----
  1026. X! /*    SCCS Id: @(#)potion.c    3.1    93/05/15    */
  1027. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1028. X  /* NetHack may be freely redistributed.  See license for details. */
  1029. X  
  1030. X***************
  1031. X*** 856,862 ****
  1032. X  potionbreathe(obj)
  1033. X  register struct obj *obj;
  1034. X  {
  1035. X!     register int i, ii, isdone;
  1036. X  
  1037. X      switch(obj->otyp) {
  1038. X      case POT_RESTORE_ABILITY:
  1039. X--- 856,862 ----
  1040. X  potionbreathe(obj)
  1041. X  register struct obj *obj;
  1042. X  {
  1043. X!     register int i, ii, isdone, kn = 0;
  1044. X  
  1045. X      switch(obj->otyp) {
  1046. X      case POT_RESTORE_ABILITY:
  1047. X***************
  1048. X*** 890,896 ****
  1049. X          }
  1050. X          break;
  1051. X      case POT_HALLUCINATION:
  1052. X!         You("have a vision for a moment.");
  1053. X          break;
  1054. X      case POT_CONFUSION:
  1055. X      case POT_BOOZE:
  1056. X--- 890,896 ----
  1057. X          }
  1058. X          break;
  1059. X      case POT_HALLUCINATION:
  1060. X!         You("have a momentary vision.");
  1061. X          break;
  1062. X      case POT_CONFUSION:
  1063. X      case POT_BOOZE:
  1064. X***************
  1065. X*** 903,926 ****
  1066. X              pline("For an instant you could see through yourself!");
  1067. X          break;
  1068. X      case POT_PARALYSIS:
  1069. X          pline("Something seems to be holding you.");
  1070. X          nomul(-rnd(5));
  1071. X          exercise(A_DEX, FALSE);
  1072. X          break;
  1073. X      case POT_SPEED:
  1074. X          Fast += rnd(5);
  1075. X-         Your("knees seem more flexible now.");
  1076. X          exercise(A_DEX, TRUE);
  1077. X          break;
  1078. X      case POT_BLINDNESS:
  1079. X!         if (!Blind && !u.usleep) pline("It suddenly gets dark.");
  1080. X!         make_blinded(Blinded + rnd(5),FALSE);
  1081. X          break;
  1082. X      case POT_WATER:
  1083. X  #ifdef POLYSELF
  1084. X          if(u.umonnum == PM_GREMLIN) {
  1085. X              struct monst *mtmp;
  1086. X!             if(mtmp = cloneu()) {
  1087. X              mtmp->mhpmax = (u.mhmax /= 2);
  1088. X              You("multiply.");
  1089. X              }
  1090. X--- 903,930 ----
  1091. X              pline("For an instant you could see through yourself!");
  1092. X          break;
  1093. X      case POT_PARALYSIS:
  1094. X+         kn++;
  1095. X          pline("Something seems to be holding you.");
  1096. X          nomul(-rnd(5));
  1097. X          exercise(A_DEX, FALSE);
  1098. X          break;
  1099. X      case POT_SPEED:
  1100. X+         if (!Fast) Your("knees seem more flexible now.");
  1101. X          Fast += rnd(5);
  1102. X          exercise(A_DEX, TRUE);
  1103. X          break;
  1104. X      case POT_BLINDNESS:
  1105. X!         if (!Blind && !u.usleep) {
  1106. X!             kn++;
  1107. X!             pline("It suddenly gets dark.");
  1108. X!         }
  1109. X!         make_blinded(Blinded + rnd(5), FALSE);
  1110. X          break;
  1111. X      case POT_WATER:
  1112. X  #ifdef POLYSELF
  1113. X          if(u.umonnum == PM_GREMLIN) {
  1114. X              struct monst *mtmp;
  1115. X!             if ((mtmp = cloneu()) != 0) {
  1116. X              mtmp->mhpmax = (u.mhmax /= 2);
  1117. X              You("multiply.");
  1118. X              }
  1119. X***************
  1120. X*** 936,942 ****
  1121. X          break;
  1122. X      }
  1123. X      /* note: no obfree() */
  1124. X!     if (obj->dknown && !objects[obj->otyp].oc_name_known &&
  1125. X                          !objects[obj->otyp].oc_uname)
  1126. X          docall(obj);
  1127. X  }
  1128. X--- 940,949 ----
  1129. X          break;
  1130. X      }
  1131. X      /* note: no obfree() */
  1132. X!     if (obj->dknown)
  1133. X!         if (kn)
  1134. X!         makeknown(obj->otyp);
  1135. X!         else if (!objects[obj->otyp].oc_name_known &&
  1136. X                          !objects[obj->otyp].oc_uname)
  1137. X          docall(obj);
  1138. X  }
  1139. X*** /tmp/da11274    Tue Jun  1 16:15:18 1993
  1140. X--- src/pray.c    Thu Apr 29 16:19:13 1993
  1141. X***************
  1142. X*** 1,4 ****
  1143. X! /*    SCCS Id: @(#)pray.c    3.1    92/12/10    */
  1144. X  /* Copyright (c) Benson I. Margulies, Mike Stephenson, Steve Linhart, 1989. */
  1145. X  /* NetHack may be freely redistributed.  See license for details. */
  1146. X  
  1147. X--- 1,4 ----
  1148. X! /*    SCCS Id: @(#)pray.c    3.1    93/04/24    */
  1149. X  /* Copyright (c) Benson I. Margulies, Mike Stephenson, Steve Linhart, 1989. */
  1150. X  /* NetHack may be freely redistributed.  See license for details. */
  1151. X  
  1152. X***************
  1153. X*** 11,16 ****
  1154. X--- 11,17 ----
  1155. X  static void FDECL(angrygods,(ALIGNTYP_P));
  1156. X  static void FDECL(pleased,(ALIGNTYP_P));
  1157. X  static void FDECL(godvoice,(ALIGNTYP_P,const char*));
  1158. X+ static void FDECL(god_zaps_you,(ALIGNTYP_P));
  1159. X  static void FDECL(gods_angry,(ALIGNTYP_P));
  1160. X  static void FDECL(gods_upset,(ALIGNTYP_P));
  1161. X  static void FDECL(consume_offering,(struct obj *));
  1162. X***************
  1163. X*** 342,347 ****
  1164. X--- 343,398 ----
  1165. X  }
  1166. X  
  1167. X  static void
  1168. X+ god_zaps_you(resp_god)
  1169. X+ aligntyp resp_god;
  1170. X+ {
  1171. X+     pline("Suddenly, a bolt of lightning strikes you!");
  1172. X+     if (Reflecting) {
  1173. X+         shieldeff(u.ux, u.uy);
  1174. X+         if (Blind)
  1175. X+         pline("For some reason you're unaffected.");
  1176. X+         else {
  1177. X+         if (Reflecting & W_AMUL) {
  1178. X+             pline("It reflects from your medallion.");
  1179. X+             makeknown(AMULET_OF_REFLECTION);
  1180. X+         } else {
  1181. X+             pline("It reflects from your shield.");
  1182. X+             makeknown(SHIELD_OF_REFLECTION);
  1183. X+         }
  1184. X+         }
  1185. X+         goto ohno;
  1186. X+     } else if (Shock_resistance) {
  1187. X+         shieldeff(u.ux, u.uy);
  1188. X+         pline("It seems not to affect you.");
  1189. X+ ohno:
  1190. X+         pline("%s is not deterred...", align_gname(resp_god));
  1191. X+         pline("A wide-angle disintegration beam hits you!");
  1192. X+         if (Disint_resistance) {
  1193. X+         You("bask in its %s glow for a minute...", Black);
  1194. X+         godvoice(resp_god, "I believe it not!");
  1195. X+         if(Is_astralevel(&u.uz)) {
  1196. X+ 
  1197. X+             /* one more try on the astral level */
  1198. X+             verbalize("Thou cannot escape my wrath, mortal!");
  1199. X+             summon_minion(resp_god, FALSE);
  1200. X+             summon_minion(resp_god, FALSE);
  1201. X+             summon_minion(resp_god, FALSE);
  1202. X+             verbalize("Destroy %s, my servants!", him[flags.female]);
  1203. X+         }
  1204. X+         return;
  1205. X+         }
  1206. X+     }
  1207. X+     {
  1208. X+         char killerbuf[64];
  1209. X+         You("fry to a crisp.");
  1210. X+         killer_format = KILLED_BY;
  1211. X+         Sprintf(killerbuf, "the wrath of %s", align_gname(resp_god));
  1212. X+         killer = killerbuf;
  1213. X+         done(DIED);
  1214. X+     }
  1215. X+ }
  1216. X+ 
  1217. X+ static void
  1218. X  angrygods(resp_god)
  1219. X  aligntyp resp_god;
  1220. X  {
  1221. X***************
  1222. X*** 418,461 ****
  1223. X              break;
  1224. X  
  1225. X          default:    gods_angry(resp_god);
  1226. X!             pline("Suddenly, a bolt of lightning strikes you!");
  1227. X!             if (Reflecting) {
  1228. X!                 shieldeff(u.ux, u.uy);
  1229. X!                 if (Blind)
  1230. X!                 pline("For some reason you're unaffected.");
  1231. X!                 else {
  1232. X!                 if (Reflecting & W_AMUL) {
  1233. X!                     pline("It reflects from your medallion.");
  1234. X!                     makeknown(AMULET_OF_REFLECTION);
  1235. X!                 } else {
  1236. X!                     pline("It reflects from your shield.");
  1237. X!                     makeknown(SHIELD_OF_REFLECTION);
  1238. X!                 }
  1239. X!                 }
  1240. X!                 goto ohno;
  1241. X!             } else if (Shock_resistance) {
  1242. X!                 shieldeff(u.ux, u.uy);
  1243. X!                 pline("It seems not to affect you.");
  1244. X! ohno:
  1245. X!                 pline("%s is not deterred...",
  1246. X!                   align_gname(resp_god));
  1247. X!                 pline("A wide-angle disintegration beam hits you!");
  1248. X!                 if (Disint_resistance) {
  1249. X!                 You("bask in its %s glow for a minute...",
  1250. X!                     Black);
  1251. X!                 godvoice(resp_god, "I believe it not!");
  1252. X!                 break;
  1253. X!                 }
  1254. X!             }
  1255. X!             {
  1256. X!                 char killerbuf[64];
  1257. X!                 You("fry to a crisp.");
  1258. X!                 killer_format = KILLED_BY;
  1259. X!                 Sprintf(killerbuf, "the wrath of %s",
  1260. X!                     align_gname(resp_god));
  1261. X!                 killer = killerbuf;
  1262. X!                 done(DIED);
  1263. X!             }
  1264. X              break;
  1265. X      }
  1266. X      u.ublesscnt = rnz(300);
  1267. X--- 469,475 ----
  1268. X              break;
  1269. X  
  1270. X          default:    gods_angry(resp_god);
  1271. X!             god_zaps_you(resp_god);
  1272. X              break;
  1273. X      }
  1274. X      u.ublesscnt = rnz(300);
  1275. X***************
  1276. X*** 628,634 ****
  1277. X          register struct obj *obj = uwep;    /* to be blessed */
  1278. X          boolean already_exists, in_hand;
  1279. X  
  1280. X-         u.uevent.uhand_of_elbereth = TRUE;
  1281. X          HSee_invisible |= FROMOUTSIDE;
  1282. X          HFire_resistance |= FROMOUTSIDE;
  1283. X          HCold_resistance |= FROMOUTSIDE;
  1284. X--- 642,647 ----
  1285. X***************
  1286. X*** 637,647 ****
  1287. X--- 650,662 ----
  1288. X  
  1289. X          switch(u.ualign.type) {
  1290. X          case A_LAWFUL:
  1291. X+             u.uevent.uhand_of_elbereth = 1;
  1292. X              verbalize("I crown thee...      The Hand of Elbereth!");
  1293. X              if (obj && (obj->otyp == LONG_SWORD) && !obj->oartifact)
  1294. X              obj = oname(obj, artiname(ART_EXCALIBUR), 1);
  1295. X              break;
  1296. X          case A_NEUTRAL:
  1297. X+             u.uevent.uhand_of_elbereth = 2;
  1298. X              verbalize("Thou shalt be my Envoy of Balance!");
  1299. X              if (uwep && uwep->oartifact == ART_VORPAL_BLADE) {
  1300. X              obj = uwep;    /* to be blessed and rustproofed */
  1301. X***************
  1302. X*** 672,677 ****
  1303. X--- 687,693 ----
  1304. X               * ordinary good broadsword is given and the messages are
  1305. X               * a bit different.
  1306. X               */
  1307. X+             u.uevent.uhand_of_elbereth = 3;
  1308. X              in_hand = (uwep && uwep->oartifact == ART_STORMBRINGER);
  1309. X              already_exists = exist_artifact(RUNESWORD,
  1310. X                          artiname(ART_STORMBRINGER));
  1311. X***************
  1312. X*** 871,877 ****
  1313. X          /* curse the lawful/neutral altar */
  1314. X          pline("The altar is stained with %sn blood.",
  1315. X                (pl_character[0]=='E') ? "elve" : "huma");
  1316. X!         levl[u.ux][u.uy].altarmask = AM_CHAOTIC;
  1317. X          angry_priest();
  1318. X          } else {
  1319. X          register struct monst *dmon;
  1320. X--- 887,894 ----
  1321. X          /* curse the lawful/neutral altar */
  1322. X          pline("The altar is stained with %sn blood.",
  1323. X                (pl_character[0]=='E') ? "elve" : "huma");
  1324. X!         if(!Is_astralevel(&u.uz))
  1325. X!             levl[u.ux][u.uy].altarmask = AM_CHAOTIC;
  1326. X          angry_priest();
  1327. X          } else {
  1328. X          register struct monst *dmon;
  1329. X***************
  1330. X*** 947,952 ****
  1331. X--- 964,970 ----
  1332. X      } else {
  1333. X          /* The final Test.    Did you win? */
  1334. X          if(uamul == otmp) Amulet_off();
  1335. X+         u.uevent.ascended = 1;
  1336. X          if(carried(otmp)) useup(otmp); /* well, it's gone now */
  1337. X          else useupf(otmp);
  1338. X          You("offer the Amulet of Yendor to %s...", a_gname());
  1339. X***************
  1340. X*** 997,1003 ****
  1341. X      return (1);
  1342. X      }
  1343. X  
  1344. X!     if (value < 0) /* I don't think the gods are gonna like this... */
  1345. X      gods_upset(altaralign);
  1346. X      else {
  1347. X      int saved_anger = u.ugangr;
  1348. X--- 1015,1031 ----
  1349. X      return (1);
  1350. X      }
  1351. X  
  1352. X!     if(Is_astralevel(&u.uz) && (altaralign != u.ualign.type)) {
  1353. X!     /*
  1354. X!      * REAL BAD NEWS!!! High altars cannot be converted.  Even an attempt
  1355. X!      * gets the god who owns it truely pissed off.
  1356. X!      */
  1357. X!     You("feel the air around you grow charged...");
  1358. X!     pline("Suddenly, you realize that %s has noticed you...", a_gname());
  1359. X!     godvoice(altaralign, "So, mortal!  You dare desecrate my High Temple!");
  1360. X!     /* Throw everything we have at the player */
  1361. X!     god_zaps_you(altaralign);
  1362. X!     } else if (value < 0) /* I don't think the gods are gonna like this... */
  1363. X      gods_upset(altaralign);
  1364. X      else {
  1365. X      int saved_anger = u.ugangr;
  1366. X***************
  1367. X*** 1204,1209 ****
  1368. X--- 1232,1238 ----
  1369. X      if (yn("Force the gods to be pleased?") == 'y') {
  1370. X          u.ublesscnt = 0;
  1371. X          if (u.uluck < 0) u.uluck = 0;
  1372. X+         if (u.ualign.record <= 0) u.ualign.record = 1;
  1373. X          u.ugangr = 0;
  1374. X          if(p_type < 2) p_type = 3;
  1375. X      }
  1376. X***************
  1377. X*** 1244,1250 ****
  1378. X      if (Inhell) {
  1379. X      pline("Since you are in Gehennom, %s won't help you.",
  1380. X            align_gname(alignment));
  1381. X!     if(rnl(u.ualign.record)) /* yes, this is the right sense */
  1382. X          angrygods(u.ualign.type);
  1383. X      return(0);
  1384. X      }
  1385. X--- 1273,1280 ----
  1386. X      if (Inhell) {
  1387. X      pline("Since you are in Gehennom, %s won't help you.",
  1388. X            align_gname(alignment));
  1389. X!     /* haltingly aligned is least likely to anger */
  1390. X!     if (u.ualign.record <= 0 || rnl(u.ualign.record))
  1391. X          angrygods(u.ualign.type);
  1392. X      return(0);
  1393. X      }
  1394. X*** /tmp/da11282    Tue Jun  1 16:15:22 1993
  1395. X--- src/priest.c    Mon May 17 14:05:01 1993
  1396. X***************
  1397. X*** 1,4 ****
  1398. X! /*    SCCS Id: @(#)priest.c    3.1    93/02/09
  1399. X  /* Copyright (c) Izchak Miller, Steve Linhart, 1989.           */
  1400. X  /* NetHack may be freely redistributed.  See license for details. */
  1401. X  
  1402. X--- 1,4 ----
  1403. X! /*    SCCS Id: @(#)priest.c    3.1    93/05/15    */
  1404. X  /* Copyright (c) Izchak Miller, Steve Linhart, 1989.           */
  1405. X  /* NetHack may be freely redistributed.  See license for details. */
  1406. X  
  1407. X***************
  1408. X*** 196,203 ****
  1409. X      if(MON_AT(sx+1, sy))
  1410. X          rloc(m_at(sx+1, sy)); /* insurance */
  1411. X  
  1412. X!     if(priest = (sanctum ? makemon(&mons[PM_HIGH_PRIEST], sx+1, sy)
  1413. X!                  : makemon(&mons[PM_ALIGNED_PRIEST], sx+1, sy))) {
  1414. X          EPRI(priest)->shroom = (sroom - rooms) + ROOMOFFSET;
  1415. X          EPRI(priest)->shralign = Amask2align(levl[sx][sy].altarmask);
  1416. X          EPRI(priest)->shrpos.x = sx;
  1417. X--- 196,204 ----
  1418. X      if(MON_AT(sx+1, sy))
  1419. X          rloc(m_at(sx+1, sy)); /* insurance */
  1420. X  
  1421. X!     priest = (sanctum ? makemon(&mons[PM_HIGH_PRIEST], sx+1, sy)
  1422. X!               : makemon(&mons[PM_ALIGNED_PRIEST], sx+1, sy));
  1423. X!     if (priest) {
  1424. X          EPRI(priest)->shroom = (sroom - rooms) + ROOMOFFSET;
  1425. X          EPRI(priest)->shralign = Amask2align(levl[sx][sy].altarmask);
  1426. X          EPRI(priest)->shrpos.x = sx;
  1427. X***************
  1428. X*** 377,383 ****
  1429. X          switch(rn2(3)) {
  1430. X            case 0: You("have an eerie feeling..."); break;
  1431. X            case 1: You("feel like you are being watched."); break;
  1432. X!           default: pline("A shiver runs down your spine."); break;
  1433. X          }
  1434. X          if(!rn2(5)) {
  1435. X              struct monst *mtmp;
  1436. X--- 378,385 ----
  1437. X          switch(rn2(3)) {
  1438. X            case 0: You("have an eerie feeling..."); break;
  1439. X            case 1: You("feel like you are being watched."); break;
  1440. X!           default: pline("A shiver runs down your %s.",
  1441. X!             body_part(SPINE)); break;
  1442. X          }
  1443. X          if(!rn2(5)) {
  1444. X              struct monst *mtmp;
  1445. X***************
  1446. X*** 627,633 ****
  1447. X  {
  1448. X      register struct monst *priest;
  1449. X  
  1450. X!     if(priest = findpriest(temple_occupied(u.urooms)))
  1451. X          wakeup(priest);
  1452. X  }
  1453. X  
  1454. X--- 629,635 ----
  1455. X  {
  1456. X      register struct monst *priest;
  1457. X  
  1458. X!     if ((priest = findpriest(temple_occupied(u.urooms))) != 0)
  1459. X          wakeup(priest);
  1460. X  }
  1461. X  
  1462. X*** /tmp/da11290    Tue Jun  1 16:15:25 1993
  1463. X--- src/quest.c    Thu Mar 11 15:35:05 1993
  1464. X***************
  1465. X*** 1,4 ****
  1466. X! /*    SCCS Id: @(#)quest.c    3.1    92/11/13    */
  1467. X  /*    Copyright 1991, M. Stephenson          */
  1468. X  /* NetHack may be freely redistributed.  See license for details. */
  1469. X  
  1470. X--- 1,4 ----
  1471. X! /*    SCCS Id: @(#)quest.c    3.1    93/03/10    */
  1472. X  /*    Copyright 1991, M. Stephenson          */
  1473. X  /* NetHack may be freely redistributed.  See license for details. */
  1474. X  
  1475. X***************
  1476. X*** 24,30 ****
  1477. X  static void NDECL(chat_with_guardian);
  1478. X  
  1479. X  static void
  1480. X! on_start() {
  1481. X    if(!Qstat(first_start)) {
  1482. X      qt_pager(QT_FIRSTTIME);
  1483. X      Qstat(first_start) = TRUE;
  1484. X--- 24,31 ----
  1485. X  static void NDECL(chat_with_guardian);
  1486. X  
  1487. X  static void
  1488. X! on_start()
  1489. X! {
  1490. X    if(!Qstat(first_start)) {
  1491. X      qt_pager(QT_FIRSTTIME);
  1492. X      Qstat(first_start) = TRUE;
  1493. X***************
  1494. X*** 35,41 ****
  1495. X  }
  1496. X  
  1497. X  static void
  1498. X! on_locate() {
  1499. X    if(!Qstat(first_locate)) {
  1500. X      qt_pager(QT_FIRSTLOCATE);
  1501. X      Qstat(first_locate) = TRUE;
  1502. X--- 36,43 ----
  1503. X  }
  1504. X  
  1505. X  static void
  1506. X! on_locate()
  1507. X! {
  1508. X    if(!Qstat(first_locate)) {
  1509. X      qt_pager(QT_FIRSTLOCATE);
  1510. X      Qstat(first_locate) = TRUE;
  1511. X***************
  1512. X*** 44,50 ****
  1513. X  }
  1514. X  
  1515. X  static void
  1516. X! on_goal() {
  1517. X    if(!Qstat(made_goal)) {
  1518. X      qt_pager(QT_FIRSTGOAL);
  1519. X      Qstat(made_goal) = 1;
  1520. X--- 46,53 ----
  1521. X  }
  1522. X  
  1523. X  static void
  1524. X! on_goal()
  1525. X! {
  1526. X    if(!Qstat(made_goal)) {
  1527. X      qt_pager(QT_FIRSTGOAL);
  1528. X      Qstat(made_goal) = 1;
  1529. X***************
  1530. X*** 86,93 ****
  1531. X  }
  1532. X  
  1533. X  void
  1534. X! onquest() {
  1535. X! 
  1536. X      if(Not_firsttime)    return;
  1537. X      if(!Is_special(&u.uz)) return;
  1538. X  
  1539. X--- 89,96 ----
  1540. X  }
  1541. X  
  1542. X  void
  1543. X! onquest()
  1544. X! {
  1545. X      if(Not_firsttime)    return;
  1546. X      if(!Is_special(&u.uz)) return;
  1547. X  
  1548. X***************
  1549. X*** 98,104 ****
  1550. X  }
  1551. X  
  1552. X  void
  1553. X! nemdead() {
  1554. X      if(!Qstat(killed_nemesis)) {
  1555. X          Qstat(killed_nemesis) = TRUE;
  1556. X          qt_pager(QT_KILLEDNEM);
  1557. X--- 101,108 ----
  1558. X  }
  1559. X  
  1560. X  void
  1561. X! nemdead()
  1562. X! {
  1563. X      if(!Qstat(killed_nemesis)) {
  1564. X          Qstat(killed_nemesis) = TRUE;
  1565. X          qt_pager(QT_KILLEDNEM);
  1566. X***************
  1567. X*** 106,112 ****
  1568. X  }
  1569. X  
  1570. X  void
  1571. X! artitouch() {
  1572. X      if(!Qstat(touched_artifact)) {
  1573. X          Qstat(touched_artifact) = TRUE;
  1574. X          qt_pager(QT_GOTIT);
  1575. X--- 110,117 ----
  1576. X  }
  1577. X  
  1578. X  void
  1579. X! artitouch()
  1580. X! {
  1581. X      if(!Qstat(touched_artifact)) {
  1582. X          Qstat(touched_artifact) = TRUE;
  1583. X          qt_pager(QT_GOTIT);
  1584. X***************
  1585. X*** 116,134 ****
  1586. X  
  1587. X  /* external hook for do.c (level change check) */
  1588. X  boolean
  1589. X! ok_to_quest() {
  1590. X! 
  1591. X!     return(Qstat(got_quest));
  1592. X  }
  1593. X  
  1594. X  static boolean
  1595. X! not_capable() {
  1596. X!   return(u.ulevel < MIN_QUEST_LEVEL);
  1597. X  }
  1598. X  
  1599. X  /* TODO:    This one needs tuning. */
  1600. X  static boolean
  1601. X! not_pure() {
  1602. X  #ifdef WIZARD
  1603. X      if(wizard && (u.ualign.record < MIN_QUEST_ALIGN)) {
  1604. X  
  1605. X--- 121,141 ----
  1606. X  
  1607. X  /* external hook for do.c (level change check) */
  1608. X  boolean
  1609. X! ok_to_quest()
  1610. X! {
  1611. X!     return(Qstat(got_quest) || Qstat(got_thanks));
  1612. X  }
  1613. X  
  1614. X  static boolean
  1615. X! not_capable()
  1616. X! {
  1617. X!     return(u.ulevel < MIN_QUEST_LEVEL);
  1618. X  }
  1619. X  
  1620. X  /* TODO:    This one needs tuning. */
  1621. X  static boolean
  1622. X! not_pure()
  1623. X! {
  1624. X  #ifdef WIZARD
  1625. X      if(wizard && (u.ualign.record < MIN_QUEST_ALIGN)) {
  1626. X  
  1627. X***************
  1628. X*** 175,182 ****
  1629. X   *    the quest.  If so, try to induce the player to quest.
  1630. X   */
  1631. X      if(Qstat(got_thanks)) {
  1632. X! /*    Rule 1:    You've gone back with/whithout the amulet.    */
  1633. X!             if(u.uhave.amulet)    qt_pager(QT_HASAMULET);
  1634. X  
  1635. X  /*    Rule 2:    You've gone back before going for the amulet.    */
  1636. X          else        qt_pager(QT_POSTHANKS);
  1637. X--- 182,189 ----
  1638. X   *    the quest.  If so, try to induce the player to quest.
  1639. X   */
  1640. X      if(Qstat(got_thanks)) {
  1641. X! /*    Rule 1:    You've gone back with/without the amulet.    */
  1642. X!         if(u.uhave.amulet)    qt_pager(QT_HASAMULET);
  1643. X  
  1644. X  /*    Rule 2:    You've gone back before going for the amulet.    */
  1645. X          else        qt_pager(QT_POSTHANKS);
  1646. X***************
  1647. X*** 233,239 ****
  1648. X          mtmp->data->mflags3 = 0;    /* end the inaction */
  1649. X      }
  1650. X  
  1651. X!         if(Qstat(pissed_off)) {
  1652. X        qt_pager(QT_LASTLEADER);
  1653. X        expulsion(TRUE);
  1654. X      } else chat_with_leader();
  1655. X--- 240,246 ----
  1656. X          mtmp->data->mflags3 = 0;    /* end the inaction */
  1657. X      }
  1658. X  
  1659. X!     if(Qstat(pissed_off)) {
  1660. X        qt_pager(QT_LASTLEADER);
  1661. X        expulsion(TRUE);
  1662. X      } else chat_with_leader();
  1663. X***************
  1664. X*** 272,278 ****
  1665. X  
  1666. X  void
  1667. X  quest_chat(mtmp)
  1668. X- 
  1669. X      register struct monst *mtmp;
  1670. X  {
  1671. X  
  1672. X--- 279,284 ----
  1673. X***************
  1674. X*** 287,293 ****
  1675. X  
  1676. X  void
  1677. X  quest_talk(mtmp)
  1678. X- 
  1679. X      register struct monst *mtmp;
  1680. X  {
  1681. X      switch(mtmp->data->msound) {
  1682. X--- 293,298 ----
  1683. X***************
  1684. X*** 299,305 ****
  1685. X  
  1686. X  void
  1687. X  quest_stat_check(mtmp)
  1688. X- 
  1689. X      struct monst *mtmp;
  1690. X  {
  1691. X      if(mtmp->data->msound == MS_NEMESIS)
  1692. X--- 304,309 ----
  1693. X*** /tmp/da11306    Tue Jun  1 16:15:29 1993
  1694. X--- src/read.c    Fri May 28 11:40:39 1993
  1695. X***************
  1696. X*** 1,4 ****
  1697. X! /*    SCCS Id: @(#)read.c    3.1    93/02/04    */
  1698. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1699. X  /* NetHack may be freely redistributed.  See license for details. */
  1700. X  
  1701. X--- 1,4 ----
  1702. X! /*    SCCS Id: @(#)read.c    3.1    93/05/26    */
  1703. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1704. X  /* NetHack may be freely redistributed.  See license for details. */
  1705. X  
  1706. X***************
  1707. X*** 610,618 ****
  1708. X          if(!rn2(73) && !sobj->blessed) cnt += rnd(4);
  1709. X          if(confused || sobj->cursed) cnt += 12;
  1710. X          while(cnt--) {
  1711. X! #if defined(WIZARD) || defined(EXPLORE_MODE)
  1712. X!             if((!wizard && !discover) || !create_particular())
  1713. X! #endif /* WIZARD || EXPLORE_MODE */
  1714. X              (void) makemon (confused ? &mons[PM_ACID_BLOB] :
  1715. X                      (struct permonst *) 0, u.ux, u.uy);
  1716. X          }
  1717. X--- 610,618 ----
  1718. X          if(!rn2(73) && !sobj->blessed) cnt += rnd(4);
  1719. X          if(confused || sobj->cursed) cnt += 12;
  1720. X          while(cnt--) {
  1721. X! #ifdef WIZARD
  1722. X!             if(!wizard || !create_particular())
  1723. X! #endif /* WIZARD  */
  1724. X              (void) makemon (confused ? &mons[PM_ACID_BLOB] :
  1725. X                      (struct permonst *) 0, u.ux, u.uy);
  1726. X          }
  1727. X***************
  1728. X*** 713,730 ****
  1729. X              You("identify this as an identify scroll.");
  1730. X          else
  1731. X              pline("This is an identify scroll.");
  1732. X!         if (sobj->blessed || (!sobj->cursed && !rn2(5)))
  1733. X              cval = rn2(5);
  1734. X              /* Note: if rn2(5)==0, identify all items */
  1735. X!         else    cval = 1;
  1736. X          useup(sobj);
  1737. X          makeknown(SCR_IDENTIFY);
  1738. X      id:
  1739. X          if(invent && !confused) {
  1740. X              int ret;
  1741. X              do {
  1742. X              ret = ggetobj("identify", identify, cval);
  1743. X!             } while(cval && (cval -= ret));
  1744. X          }
  1745. X          return(1);
  1746. X      case SCR_CHARGING:
  1747. X--- 713,733 ----
  1748. X              You("identify this as an identify scroll.");
  1749. X          else
  1750. X              pline("This is an identify scroll.");
  1751. X!         if (sobj->blessed || (!sobj->cursed && !rn2(5))) {
  1752. X              cval = rn2(5);
  1753. X              /* Note: if rn2(5)==0, identify all items */
  1754. X!             if (cval == 1 && sobj->blessed && Luck > 0) ++cval;
  1755. X!         } else    cval = 1;
  1756. X          useup(sobj);
  1757. X          makeknown(SCR_IDENTIFY);
  1758. X      id:
  1759. X          if(invent && !confused) {
  1760. X              int ret;
  1761. X+             /* use up `cval' "charges"; 0 is special case */
  1762. X              do {
  1763. X              ret = ggetobj("identify", identify, cval);
  1764. X!             if (ret < 0) break;    /* quit or no eligible items */
  1765. X!             } while (ret == 0 || (cval -= ret) > 0);
  1766. X          }
  1767. X          return(1);
  1768. X      case SCR_CHARGING:
  1769. X***************
  1770. X*** 1167,1177 ****
  1771. X           || *mtype==PM_ALIGNED_PRIEST || *mtype==PM_ANGEL) {
  1772. X          *mtype = PM_HUMAN_ZOMBIE;
  1773. X          return TRUE;
  1774. X      }
  1775. X      return FALSE;
  1776. X  }
  1777. X  
  1778. X! #if defined(WIZARD) || defined(EXPLORE_MODE)
  1779. X  boolean
  1780. X  create_particular()
  1781. X  {
  1782. X--- 1170,1183 ----
  1783. X           || *mtype==PM_ALIGNED_PRIEST || *mtype==PM_ANGEL) {
  1784. X          *mtype = PM_HUMAN_ZOMBIE;
  1785. X          return TRUE;
  1786. X+     } else if (*mtype==PM_LONG_WORM_TAIL) {    /* for create_particular() */
  1787. X+         *mtype = PM_LONG_WORM;
  1788. X+         return TRUE;
  1789. X      }
  1790. X      return FALSE;
  1791. X  }
  1792. X  
  1793. X! #ifdef WIZARD
  1794. X  boolean
  1795. X  create_particular()
  1796. X  {
  1797. X***************
  1798. X*** 1180,1185 ****
  1799. X--- 1186,1192 ----
  1800. X  
  1801. X      do {
  1802. X          getlin("Create what kind of monster? [type the name]", buf);
  1803. X+         if (buf[0] == '\033') return FALSE;
  1804. X          which = name_to_mon(buf);
  1805. X          if (which < 0) pline("I've never heard of such monsters.");
  1806. X          else break;
  1807. X***************
  1808. X*** 1186,1204 ****
  1809. X      } while (++tries < 5);
  1810. X      if (tries == 5) pline(thats_enough_tries);
  1811. X      else {
  1812. X!         if (!(mons[which].geno & G_GENOD) && cant_create(&which) &&
  1813. X!                                 !Blind) {
  1814. X!         if (mons[which].geno & G_GENOD)
  1815. X! pline("An image of the creature forms, wavers momentarily, then fades.");
  1816. X!         else
  1817. X! pline("The disoriented creature's eyes slowly glaze over.");
  1818. X!         }
  1819. X!         (void) makemon(&mons[which], u.ux, u.uy);
  1820. X!         return TRUE;
  1821. X      }
  1822. X      return FALSE;
  1823. X  }
  1824. X! #endif /* WIZARD || EXPLORE_MODE */
  1825. X  
  1826. X  #endif /* OVLB */
  1827. X  
  1828. X--- 1193,1204 ----
  1829. X      } while (++tries < 5);
  1830. X      if (tries == 5) pline(thats_enough_tries);
  1831. X      else {
  1832. X!         (void) cant_create(&which);
  1833. X!         return makemon(&mons[which], u.ux, u.uy) != 0;
  1834. X      }
  1835. X      return FALSE;
  1836. X  }
  1837. X! #endif /* WIZARD */
  1838. X  
  1839. X  #endif /* OVLB */
  1840. X  
  1841. X*** /tmp/da11322    Tue Jun  1 16:15:34 1993
  1842. X--- src/restore.c    Tue Apr 13 16:19:09 1993
  1843. X***************
  1844. X*** 1,4 ****
  1845. X! /*    SCCS Id: @(#)restore.c    3.1    93/01/23    */
  1846. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1847. X  /* NetHack may be freely redistributed.  See license for details. */
  1848. X  
  1849. X--- 1,4 ----
  1850. X! /*    SCCS Id: @(#)restore.c    3.1    93/04/06    */
  1851. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1852. X  /* NetHack may be freely redistributed.  See license for details. */
  1853. X  
  1854. X***************
  1855. X*** 162,168 ****
  1856. X  register int fd;
  1857. X  boolean ghostly;
  1858. X  {
  1859. X!     register struct obj *otmp, *otmp2;
  1860. X      register struct obj *first = (struct obj *)0;
  1861. X  #ifdef TUTTI_FRUTTI
  1862. X      register struct fruit *oldf;
  1863. X--- 162,168 ----
  1864. X  register int fd;
  1865. X  boolean ghostly;
  1866. X  {
  1867. X!     register struct obj *otmp, *otmp2 = 0;
  1868. X      register struct obj *first = (struct obj *)0;
  1869. X  #ifdef TUTTI_FRUTTI
  1870. X      register struct fruit *oldf;
  1871. X***************
  1872. X*** 169,178 ****
  1873. X  #endif
  1874. X      int xl;
  1875. X  
  1876. X- #if defined(LINT) || defined(GCC_WARN)
  1877. X-     /* suppress "used before set" warning from lint */
  1878. X-     otmp2 = 0;
  1879. X- #endif
  1880. X      while(1) {
  1881. X          mread(fd, (genericptr_t) &xl, sizeof(xl));
  1882. X          if(xl == -1) break;
  1883. X--- 169,174 ----
  1884. X***************
  1885. X*** 200,207 ****
  1886. X                  && !Is_candle(otmp))
  1887. X              otmp->age = monstermoves-omoves+otmp->age;
  1888. X  
  1889. X!         /* get contents of the container */
  1890. X!         if (Is_container(otmp) || otmp->otyp == STATUE)
  1891. X              otmp->cobj = restobjchn(fd,ghostly);
  1892. X  
  1893. X          otmp2 = otmp;
  1894. X--- 196,203 ----
  1895. X                  && !Is_candle(otmp))
  1896. X              otmp->age = monstermoves-omoves+otmp->age;
  1897. X  
  1898. X!         /* get contents of a container or statue */
  1899. X!         if (Has_contents(otmp))
  1900. X              otmp->cobj = restobjchn(fd,ghostly);
  1901. X  
  1902. X          otmp2 = otmp;
  1903. X***************
  1904. X*** 219,225 ****
  1905. X  register int fd;
  1906. X  boolean ghostly;
  1907. X  {
  1908. X!     register struct monst *mtmp, *mtmp2;
  1909. X      register struct monst *first = (struct monst *)0;
  1910. X      int xl;
  1911. X      struct permonst *monbegin;
  1912. X--- 215,221 ----
  1913. X  register int fd;
  1914. X  boolean ghostly;
  1915. X  {
  1916. X!     register struct monst *mtmp, *mtmp2 = 0;
  1917. X      register struct monst *first = (struct monst *)0;
  1918. X      int xl;
  1919. X      struct permonst *monbegin;
  1920. X***************
  1921. X*** 229,238 ****
  1922. X      mread(fd, (genericptr_t)&monbegin, sizeof(monbegin));
  1923. X      moved = (monbegin != mons);
  1924. X  
  1925. X- #if defined(LINT) || defined(GCC_WARN)
  1926. X-     /* suppress "used before set" warning from lint */
  1927. X-     mtmp2 = 0;
  1928. X- #endif
  1929. X      while(1) {
  1930. X          mread(fd, (genericptr_t) &xl, sizeof(xl));
  1931. X          if(xl == -1) break;
  1932. X--- 225,230 ----
  1933. X***************
  1934. X*** 392,397 ****
  1935. X--- 384,392 ----
  1936. X  restlevelfile(fd, ltmp)
  1937. X  register int fd;
  1938. X  xchar ltmp;
  1939. X+ #ifdef applec
  1940. X+ # pragma unused(fd)
  1941. X+ #endif
  1942. X  {
  1943. X      register int nfd;
  1944. X  
  1945. X***************
  1946. X*** 468,486 ****
  1947. X      if (rtmp < 2) return(rtmp);  /* dorecover called recursively */
  1948. X  
  1949. X  #ifdef MICRO
  1950. X! # ifdef AMIGA
  1951. X      {
  1952. X!     extern winid WIN_BASE;
  1953. X!     clear_nhwindow(WIN_BASE);    /* hack until there's a hook for this */
  1954. X      }
  1955. X  # else
  1956. X      clear_nhwindow(WIN_MAP);
  1957. X  # endif
  1958. X      clear_nhwindow(WIN_MESSAGE);
  1959. X!     You("got as far as level %d in %s%s.",
  1960. X          depth(&u.uz), dungeons[u.uz.dnum].dname,
  1961. X!         flags.debug ? " while in WIZARD mode" :
  1962. X!         flags.explore ? " while in discovery mode" : "");
  1963. X      curs(WIN_MAP, 1, 1);
  1964. X      dotcnt = 0;
  1965. X      putstr(WIN_MAP, 0, "Restoring:");
  1966. X--- 463,484 ----
  1967. X      if (rtmp < 2) return(rtmp);  /* dorecover called recursively */
  1968. X  
  1969. X  #ifdef MICRO
  1970. X! # ifdef AMII_GRAPHICS
  1971. X      {
  1972. X!     extern struct window_procs amii_procs;
  1973. X!     if(windowprocs.win_init_nhwindows== amii_procs.win_init_nhwindows){
  1974. X!         extern winid WIN_BASE;
  1975. X!         clear_nhwindow(WIN_BASE);    /* hack until there's a hook for this */
  1976. X      }
  1977. X+     }
  1978. X  # else
  1979. X      clear_nhwindow(WIN_MAP);
  1980. X  # endif
  1981. X      clear_nhwindow(WIN_MESSAGE);
  1982. X!     You("return to level %d in %s%s.",
  1983. X          depth(&u.uz), dungeons[u.uz.dnum].dname,
  1984. X!         flags.debug ? " while in debug mode" :
  1985. X!         flags.explore ? " while in explore mode" : "");
  1986. X      curs(WIN_MAP, 1, 1);
  1987. X      dotcnt = 0;
  1988. X      putstr(WIN_MAP, 0, "Restoring:");
  1989. X***************
  1990. X*** 559,564 ****
  1991. X--- 557,563 ----
  1992. X  #ifdef MULDGN
  1993. X      load_qtlist();    /* re-load the quest text info */
  1994. X  #endif
  1995. X+     reset_attribute_clock();
  1996. X      /* Set up the vision internals, after levl[] data is loaded */
  1997. X      /* but before docrt().                        */
  1998. X      vision_reset();
  1999. X***************
  2000. X*** 642,647 ****
  2001. X--- 641,649 ----
  2002. X          uchar    len;
  2003. X          struct rm r;
  2004. X          
  2005. X+ #if defined(applec)
  2006. X+         memset ( & r , 0 , sizeof ( r ) ) ; /* Suppress warning about used before set */
  2007. X+ #endif
  2008. X          i = 0; j = 0; len = 0;
  2009. X          while(i < ROWNO) {
  2010. X              while(j < COLNO) {
  2011. X***************
  2012. X*** 760,765 ****
  2013. X--- 762,768 ----
  2014. X      dealloc_trap(trap);
  2015. X      fobj = restobjchn(fd, ghostly);
  2016. X      find_lev_obj();
  2017. X+     level.buriedobjlist = restobjchn(fd, ghostly);
  2018. X      billobjs = restobjchn(fd, ghostly);
  2019. X      rest_engravings(fd);
  2020. X      rest_rooms(fd);        /* No joke :-) */
  2021. END_OF_FILE
  2022. if test 52366 -ne `wc -c <'patches02g'`; then
  2023.     echo shar: \"'patches02g'\" unpacked with wrong size!
  2024. fi
  2025. # end of 'patches02g'
  2026. echo shar: End of archive 20 \(of 33\).
  2027. cp /dev/null ark20isdone
  2028. MISSING=""
  2029. 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 32 33 ; do
  2030.     if test ! -f ark${I}isdone ; then
  2031.     MISSING="${MISSING} ${I}"
  2032.     fi
  2033. done
  2034. if test "${MISSING}" = "" ; then
  2035.     echo You have unpacked all 33 archives.
  2036.     echo "Now execute ./patchit.sh"
  2037.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2038. else
  2039.     echo You still need to unpack the following archives:
  2040.     echo "        " ${MISSING}
  2041. fi
  2042. ##  End of shell archive.
  2043. exit 0
  2044.