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

  1. Path: uunet!gatech!europa.eng.gtefsd.com!emory!ogicse!news.tek.com!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v17i093:  nethack31 - display oriented dungeons & dragons (Ver. 3.1), Patch2r/33
  5. Message-ID: <1v8io1$j4r@ying.cna.tek.com>
  6. Date: 11 Jun 93 00:13:53 GMT
  7. Article-I.D.: ying.1v8io1$j4r
  8. Organization: Tektronix, Inc, Redmond, OR, USA
  9. Lines: 2153
  10. Approved: billr@saab.CNA.TEK.COM
  11. NNTP-Posting-Host: saab.cna.tek.com
  12. Xref: uunet comp.sources.games:1758
  13.  
  14. Submitted-by: izchak@linc.cis.upenn.edu (Izchak Miller)
  15. Posting-number: Volume 17, Issue 93
  16. Archive-name: nethack31/Patch2r
  17. Patch-To: nethack31: Volume 16, Issue 1-116
  18. Environment: Amiga, Atari, Mac, MS-DOS, Windows-NT, OS2, Unix, VMS, X11
  19.  
  20.  
  21.  
  22. #! /bin/sh
  23. # This is a shell archive.  Remove anything before this line, then unpack
  24. # it by saving it into a file and typing "sh file".  To overwrite existing
  25. # files, type "sh file -c".  You can also feed this as standard input via
  26. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  27. # will see the following message at the end:
  28. #        "End of archive 18 (of 33)."
  29. # Contents:  patches02c sys/amiga/winproto.h
  30. # Wrapped by billr@saab on Thu Jun 10 16:55:04 1993
  31. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  32. if test -f 'patches02c' -a "${1}" != "-c" ; then 
  33.   echo shar: Renaming existing file \"'patches02c'\" to \"'patches02c.orig'\"
  34.   mv -f 'patches02c' 'patches02c.orig'
  35. fi
  36. echo shar: Extracting \"'patches02c'\" \(53667 characters\)
  37. sed "s/^X//" >'patches02c' <<'END_OF_FILE'
  38. X*** /tmp/da10922    Tue Jun  1 16:13:19 1993
  39. X--- src/dokick.c    Mon May 17 13:39:49 1993
  40. X***************
  41. X*** 1,9 ****
  42. X! /*    SCCS Id: @(#)dokick.c    3.1    93/02/18    */
  43. X  /* Copyright (c) Izchak Miller, Mike Stephenson, Steve Linhart, 1989. */
  44. X  /* NetHack may be freely redistributed.  See license for details. */
  45. X  
  46. X! #include    "hack.h"
  47. X! #include    "eshk.h"
  48. X  
  49. X  #ifndef POLYSELF
  50. X  # define martial()    (pl_character[0] == 'S' || pl_character[0] == 'P')
  51. X--- 1,9 ----
  52. X! /*    SCCS Id: @(#)dokick.c    3.1    93/05/14    */
  53. X  /* Copyright (c) Izchak Miller, Mike Stephenson, Steve Linhart, 1989. */
  54. X  /* NetHack may be freely redistributed.  See license for details. */
  55. X  
  56. X! #include "hack.h"
  57. X! #include "eshk.h"
  58. X  
  59. X  #ifndef POLYSELF
  60. X  # define martial()    (pl_character[0] == 'S' || pl_character[0] == 'P')
  61. X***************
  62. X*** 46,51 ****
  63. X--- 46,57 ----
  64. X      /* a good kick exercises your dex */
  65. X      exercise(A_DEX, TRUE);
  66. X  
  67. X+ /*    it is unchivalrous to attack the defenseless or from behind */
  68. X+     if (pl_character[0] == 'K' &&
  69. X+         u.ualign.type == A_LAWFUL && u.ualign.record > -10 &&
  70. X+         (!mon->mcanmove || mon->msleep || mon->mflee))
  71. X+         adjalign(-1);
  72. X+ 
  73. X      /* squeeze some guilt feelings... */
  74. X      if(mon->mtame) {
  75. X          abuse_dog(mon);
  76. X***************
  77. X*** 57,63 ****
  78. X  #endif
  79. X      }
  80. X  
  81. X!     if (dmg)
  82. X          mon->mhp -= (!martial() ? rnd(dmg) :
  83. X              rnd(dmg)+rnd(ACURR(A_DEX)/2));
  84. X      if(mon->mhp < 1) {
  85. X--- 63,69 ----
  86. X  #endif
  87. X      }
  88. X  
  89. X!     if (dmg > 0)
  90. X          mon->mhp -= (!martial() ? rnd(dmg) :
  91. X              rnd(dmg)+rnd(ACURR(A_DEX)/2));
  92. X      if(mon->mhp < 1) {
  93. X***************
  94. X*** 81,92 ****
  95. X      }
  96. X      (void) passive(mon, FALSE, 1, TRUE);
  97. X  
  98. X- /*    it is unchivalrous to attack the defenseless or from behind */
  99. X-     if (pl_character[0] == 'K' &&
  100. X-         u.ualign.type == A_LAWFUL && u.ualign.record > -10 &&
  101. X-         (!mon->mcanmove || mon->msleep || mon->mflee))
  102. X-         adjalign(-1);
  103. X- 
  104. X  }
  105. X  
  106. X  static void
  107. X--- 87,92 ----
  108. X***************
  109. X*** 436,447 ****
  110. X          else pline("%s come%s loose.",
  111. X                 The(distant_name(kickobj, xname)),
  112. X                 (kickobj->quan == 1L) ? "s" : "");
  113. X!         remove_object(kickobj);
  114. X          newsym(x, y);
  115. X          if (costly && (!costly_spot(u.ux, u.uy)
  116. X                     || !index(u.urooms, *in_rooms(x, y, SHOPBASE))))
  117. X              addtobill(kickobj, FALSE, FALSE, FALSE);
  118. X          if(!flooreffects(kickobj,u.ux,u.uy,"fall")) {
  119. X              place_object(kickobj, u.ux, u.uy);
  120. X              stackobj(kickobj);
  121. X              newsym(u.ux, u.uy);
  122. X--- 436,449 ----
  123. X          else pline("%s come%s loose.",
  124. X                 The(distant_name(kickobj, xname)),
  125. X                 (kickobj->quan == 1L) ? "s" : "");
  126. X!         freeobj(kickobj);
  127. X          newsym(x, y);
  128. X          if (costly && (!costly_spot(u.ux, u.uy)
  129. X                     || !index(u.urooms, *in_rooms(x, y, SHOPBASE))))
  130. X              addtobill(kickobj, FALSE, FALSE, FALSE);
  131. X          if(!flooreffects(kickobj,u.ux,u.uy,"fall")) {
  132. X+             kickobj->nobj = fobj;
  133. X+             fobj = kickobj;
  134. X              place_object(kickobj, u.ux, u.uy);
  135. X              stackobj(kickobj);
  136. X              newsym(u.ux, u.uy);
  137. X***************
  138. X*** 541,594 ****
  139. X  dokick()
  140. X  {
  141. X      register int x, y;
  142. X!     register int avrg_attrib = (ACURRSTR+ACURR(A_DEX)+ACURR(A_CON))/3;
  143. X      register struct monst *mtmp;
  144. X!     register s_level *slev = Is_special(&u.uz);
  145. X  
  146. X  #ifdef POLYSELF
  147. X!     if(nolimbs(uasmon)) {
  148. X          You("have no legs to kick with.");
  149. X!         return(0);
  150. X!     }
  151. X!     if(verysmall(uasmon)) {
  152. X          You("are too small to do any kicking.");
  153. X!         return(0);
  154. X!     }
  155. X  #endif
  156. X!     if(Wounded_legs) {
  157. X          Your("%s %s in no shape for kicking.",
  158. X                ((Wounded_legs & BOTH_SIDES)==BOTH_SIDES)
  159. X              ? (const char *)makeplural(body_part(LEG)) : body_part(LEG),
  160. X                ((Wounded_legs & BOTH_SIDES)==BOTH_SIDES) ? "are" : "is");
  161. X!         return(0);
  162. X!     }
  163. X! 
  164. X!     if(near_capacity() > SLT_ENCUMBER) {
  165. X          Your("load is too heavy to balance yourself for a kick.");
  166. X!         return(0);
  167. X!     }
  168. X! 
  169. X!     if(u.uinwater && !rn2(2)) {
  170. X          Your("slow motion kick doesn't hit anything.");
  171. X!         return(0);
  172. X!     }
  173. X! 
  174. X!     if(u.utrap) {
  175. X          switch (u.utraptype) {
  176. X              case TT_PIT:
  177. X!             pline("There's nothing to kick down here.");
  178. X              case TT_WEB:
  179. X              case TT_BEARTRAP:
  180. X              You("can't move your %s!", body_part(LEG));
  181. X          }
  182. X!         return(0);
  183. X      }
  184. X  
  185. X      if(!getdir(NULL)) return(0);
  186. X      if(!u.dx && !u.dy) return(0);
  187. X  
  188. X      x = u.ux + u.dx;
  189. X      y = u.uy + u.dy;
  190. X  
  191. X      if(u.uswallow) {
  192. X          switch(rn2(3)) {
  193. X--- 543,601 ----
  194. X  dokick()
  195. X  {
  196. X      register int x, y;
  197. X!     int avrg_attrib;
  198. X      register struct monst *mtmp;
  199. X!     s_level *slev;
  200. X!     boolean no_kick = FALSE;
  201. X  
  202. X  #ifdef POLYSELF
  203. X!     if (nolimbs(uasmon)) {
  204. X          You("have no legs to kick with.");
  205. X!         no_kick = TRUE;
  206. X!     } else if (verysmall(uasmon)) {
  207. X          You("are too small to do any kicking.");
  208. X!         no_kick = TRUE;
  209. X!     } else
  210. X  #endif
  211. X!     if (Wounded_legs) {
  212. X          Your("%s %s in no shape for kicking.",
  213. X                ((Wounded_legs & BOTH_SIDES)==BOTH_SIDES)
  214. X              ? (const char *)makeplural(body_part(LEG)) : body_part(LEG),
  215. X                ((Wounded_legs & BOTH_SIDES)==BOTH_SIDES) ? "are" : "is");
  216. X!         no_kick = TRUE;
  217. X!     } else if (near_capacity() > SLT_ENCUMBER) {
  218. X          Your("load is too heavy to balance yourself for a kick.");
  219. X!         no_kick = TRUE;
  220. X!     } else if (u.uinwater && !rn2(2)) {
  221. X          Your("slow motion kick doesn't hit anything.");
  222. X!         no_kick = TRUE;
  223. X!     } else if (u.utrap) {
  224. X          switch (u.utraptype) {
  225. X              case TT_PIT:
  226. X!             pline("There's not enough room to kick down here.");
  227. X!             break;
  228. X              case TT_WEB:
  229. X              case TT_BEARTRAP:
  230. X              You("can't move your %s!", body_part(LEG));
  231. X+             break;
  232. X+             default:
  233. X+             break;
  234. X          }
  235. X!         no_kick = TRUE;
  236. X      }
  237. X  
  238. X+     if (no_kick) {
  239. X+         /* discard direction typeahead, if any */
  240. X+         display_nhwindow(WIN_MESSAGE, TRUE);    /* --More-- */
  241. X+         return 0;
  242. X+     }
  243. X+ 
  244. X      if(!getdir(NULL)) return(0);
  245. X      if(!u.dx && !u.dy) return(0);
  246. X  
  247. X      x = u.ux + u.dx;
  248. X      y = u.uy + u.dy;
  249. X+     avrg_attrib = (ACURRSTR+ACURR(A_DEX)+ACURR(A_CON))/3;
  250. X  
  251. X      if(u.uswallow) {
  252. X          switch(rn2(3)) {
  253. X***************
  254. X*** 647,654 ****
  255. X              exercise(A_DEX, TRUE);
  256. X              maploc->typ = DOOR;
  257. X              if(maploc->doormask & D_TRAPPED) {
  258. X-                 b_trapped("door");
  259. X                  maploc->doormask = D_NODOOR;
  260. X              } else
  261. X                  maploc->doormask = D_ISOPEN;
  262. X              if (Blind)
  263. X--- 654,661 ----
  264. X              exercise(A_DEX, TRUE);
  265. X              maploc->typ = DOOR;
  266. X              if(maploc->doormask & D_TRAPPED) {
  267. X                  maploc->doormask = D_NODOOR;
  268. X+                 b_trapped("door", FOOT);
  269. X              } else
  270. X                  maploc->doormask = D_ISOPEN;
  271. X              if (Blind)
  272. X***************
  273. X*** 824,833 ****
  274. X      if(rnl(35) < avrg_attrib + (!martial() ? 0 : ACURR(A_DEX))) {
  275. X          /* break the door */
  276. X          if(maploc->doormask & D_TRAPPED) {
  277. X!             pline("As you kick the door, it explodes!");
  278. X              exercise(A_STR, FALSE);
  279. X-             b_trapped("door");
  280. X              maploc->doormask = D_NODOOR;
  281. X          } else if(ACURR(A_STR) > 18 && !rn2(5) &&
  282. X                !*in_rooms(x, y, SHOPBASE)) {
  283. X              pline("As you kick the door, it shatters to pieces!");
  284. X--- 831,840 ----
  285. X      if(rnl(35) < avrg_attrib + (!martial() ? 0 : ACURR(A_DEX))) {
  286. X          /* break the door */
  287. X          if(maploc->doormask & D_TRAPPED) {
  288. X!             if (flags.verbose) You("kick the door.");
  289. X              exercise(A_STR, FALSE);
  290. X              maploc->doormask = D_NODOOR;
  291. X+             b_trapped("door", FOOT);
  292. X          } else if(ACURR(A_STR) > 18 && !rn2(5) &&
  293. X                !*in_rooms(x, y, SHOPBASE)) {
  294. X              pline("As you kick the door, it shatters to pieces!");
  295. X***************
  296. X*** 847,853 ****
  297. X          else
  298. X              newsym(x,y);
  299. X          unblock_point(x,y);        /* vision */
  300. X!         if(slev && slev->flags.town)
  301. X            for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
  302. X              if((mtmp->data == &mons[PM_WATCHMAN] ||
  303. X              mtmp->data == &mons[PM_WATCH_CAPTAIN]) &&
  304. X--- 854,860 ----
  305. X          else
  306. X              newsym(x,y);
  307. X          unblock_point(x,y);        /* vision */
  308. X!         if ((slev = Is_special(&u.uz)) && slev->flags.town)
  309. X            for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
  310. X              if((mtmp->data == &mons[PM_WATCHMAN] ||
  311. X              mtmp->data == &mons[PM_WATCH_CAPTAIN]) &&
  312. X***************
  313. X*** 863,869 ****
  314. X          if (Blind) feel_location(x,y);    /* we know we hit it */
  315. X          exercise(A_STR, TRUE);
  316. X          pline("WHAMMM!!!");
  317. X!         if(slev && slev->flags.town)
  318. X            for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
  319. X              if((mtmp->data == &mons[PM_WATCHMAN] ||
  320. X            mtmp->data == &mons[PM_WATCH_CAPTAIN]) &&
  321. X--- 870,876 ----
  322. X          if (Blind) feel_location(x,y);    /* we know we hit it */
  323. X          exercise(A_STR, TRUE);
  324. X          pline("WHAMMM!!!");
  325. X!         if ((slev = Is_special(&u.uz)) && slev->flags.town)
  326. X            for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
  327. X              if((mtmp->data == &mons[PM_WATCHMAN] ||
  328. X            mtmp->data == &mons[PM_WATCH_CAPTAIN]) &&
  329. X***************
  330. X*** 997,1006 ****
  331. X                   index(u.urooms, *in_rooms(x, y, SHOPBASE))),
  332. X                  TRUE);
  333. X              /* set obj->no_charge to 0 */
  334. X!             if(Is_container(obj))
  335. X!                 picked_container(obj); /* does the right thing */
  336. X!             if(obj->otyp != GOLD_PIECE)
  337. X!                 obj->no_charge = 0;
  338. X          }
  339. X          obj->nobj = migrating_objs;
  340. X          migrating_objs = obj;
  341. X--- 1004,1013 ----
  342. X                   index(u.urooms, *in_rooms(x, y, SHOPBASE))),
  343. X                  TRUE);
  344. X              /* set obj->no_charge to 0 */
  345. X!             if (Has_contents(obj))
  346. X!             picked_container(obj);    /* does the right thing */
  347. X!             if (obj->otyp != GOLD_PIECE)
  348. X!             obj->no_charge = 0;
  349. X          }
  350. X          obj->nobj = migrating_objs;
  351. X          migrating_objs = obj;
  352. X***************
  353. X*** 1019,1028 ****
  354. X          pline("From the impact, %sother %s.",
  355. X              dct == oct ? "the " : dct == 1L ? "an" : "", what);
  356. X          else
  357. X!         pline("%s adjacent %s %s",
  358. X!             oct == dct ? (dct > 1L ? "All the" : "The") :
  359. X!                 (dct == 1L ? "One of the" : "Some of the"),
  360. X!             what, gate_str(toloc));
  361. X      }
  362. X  
  363. X      if(costly && shkp && price) {
  364. X--- 1026,1041 ----
  365. X          pline("From the impact, %sother %s.",
  366. X              dct == oct ? "the " : dct == 1L ? "an" : "", what);
  367. X          else
  368. X!         if (oct == dct) {
  369. X!             pline("%s adjacent %s %s",
  370. X!                 dct == 1L ? "The" : "All the",
  371. X!                 what, gate_str(toloc));
  372. X!         } else {
  373. X!             pline("%s adjacent %s %s",
  374. X!                 dct == 1L ? "One of the" : "Some of the",
  375. X!                 dct == 1L ? "objects falls" : what,
  376. X!                 gate_str(toloc));
  377. X!         }
  378. X      }
  379. X  
  380. X      if(costly && shkp && price) {
  381. X***************
  382. X*** 1079,1085 ****
  383. X      drop_to(&cc, toloc);
  384. X      if(!cc.y) return(FALSE);
  385. X  
  386. X!     container = Is_container(otmp);
  387. X  
  388. X      unpaid = (otmp->unpaid || (container && count_unpaid(otmp->cobj)));
  389. X  
  390. X--- 1092,1098 ----
  391. X      drop_to(&cc, toloc);
  392. X      if(!cc.y) return(FALSE);
  393. X  
  394. X!     container = Has_contents(otmp);
  395. X  
  396. X      unpaid = (otmp->unpaid || (container && count_unpaid(otmp->cobj)));
  397. X  
  398. X***************
  399. X*** 1151,1157 ****
  400. X      register struct obj *otmp, *otmp0 = (struct obj *)0, *otmp2;
  401. X  
  402. X      for(otmp = migrating_objs; otmp; otmp = otmp2) {
  403. X- 
  404. X          otmp2 = otmp->nobj;
  405. X  
  406. X          if(otmp->ox == u.uz.dnum && otmp->oy == u.uz.dlevel) {
  407. X--- 1164,1169 ----
  408. X***************
  409. X*** 1197,1202 ****
  410. X--- 1209,1217 ----
  411. X                  } /* else fall through */
  412. X              default:
  413. X  scatter:
  414. X+                 /* set dummy coordinates because there's no
  415. X+                    current position for rloco() to update */
  416. X+                 otmp->ox = otmp->oy = 0;
  417. X                  rloco(otmp);
  418. X                  break;
  419. X          }
  420. X***************
  421. X*** 1244,1249 ****
  422. X--- 1259,1267 ----
  423. X  {
  424. X      register struct trap *ttmp = t_at(x, y);
  425. X  
  426. X+ #ifdef MULDGN    /* this matches the player restriction in goto_level() */
  427. X+     if (on_level(&u.uz, &qstart_level) && !ok_to_quest()) return -1;
  428. X+ #endif
  429. X      if(ttmp && ttmp->ttyp == TRAPDOOR && ttmp->tseen) return 0;
  430. X      if(xdnstair == x && ydnstair == y) return 1;
  431. X      if(xdnladder == x && ydnladder == y) return 2;
  432. X*** /tmp/da10938    Tue Jun  1 16:13:24 1993
  433. X--- src/drawing.c    Mon Apr 26 17:37:45 1993
  434. X***************
  435. X*** 268,273 ****
  436. X--- 268,278 ----
  437. X  #undef C
  438. X  
  439. X  #ifdef ASCIIGRAPH
  440. X+ 
  441. X+ #ifdef PC9801
  442. X+ void NDECL((*ibmgraphics_mode_callback)) = 0;    /* set in tty_start_screen() */
  443. X+ #endif /* PC9801 */
  444. X+ 
  445. X  static uchar ibm_graphics[MAXPCHARS] = {
  446. X  /* 0*/    g_FILLER(S_stone),
  447. X      0xb3,    /* S_vwall:    meta-3, vertical rule */
  448. X***************
  449. X*** 489,496 ****
  450. X      g_FILLER(S_explode8),
  451. X      g_FILLER(S_explode9)
  452. X  };
  453. X! #endif  /* MAC_GRAPHICS_ENV */
  454. X  
  455. X  /*
  456. X   * Convert the given character to an object class.  If the character is not
  457. X   * recognized, then MAXOCLASSES is returned.  Used in invent.c, options.c,
  458. X--- 494,505 ----
  459. X      g_FILLER(S_explode8),
  460. X      g_FILLER(S_explode9)
  461. X  };
  462. X! #endif    /* MAC_GRAPHICS_ENV */
  463. X  
  464. X+ #ifdef PC9801
  465. X+ void NDECL((*ascgraphics_mode_callback)) = 0;    /* set in tty_start_screen() */
  466. X+ #endif
  467. X+ 
  468. X  /*
  469. X   * Convert the given character to an object class.  If the character is not
  470. X   * recognized, then MAXOCLASSES is returned.  Used in invent.c, options.c,
  471. X***************
  472. X*** 540,545 ****
  473. X--- 549,557 ----
  474. X      default:
  475. X      case ASCII_GRAPHICS:
  476. X          assign_graphics((uchar *)0, 0);
  477. X+ #ifdef PC9801
  478. X+         if (ascgraphics_mode_callback) (*ascgraphics_mode_callback)();
  479. X+ #endif
  480. X          break;
  481. X  #ifdef ASCIIGRAPH
  482. X      case IBM_GRAPHICS:
  483. X***************
  484. X*** 553,558 ****
  485. X--- 565,573 ----
  486. X          flags.IBMgraphics = TRUE;
  487. X          flags.DECgraphics = FALSE;
  488. X          assign_graphics(ibm_graphics, SIZE(ibm_graphics));
  489. X+ #ifdef PC9801
  490. X+         if (ibmgraphics_mode_callback) (*ibmgraphics_mode_callback)();
  491. X+ #endif
  492. X          break;
  493. X  #endif /* ASCIIGRAPH */
  494. X  #ifdef TERMLIB
  495. X*** /tmp/da10946    Tue Jun  1 16:13:27 1993
  496. X--- src/dungeon.c    Fri Mar 12 17:20:47 1993
  497. X***************
  498. X*** 548,553 ****
  499. X--- 548,591 ----
  500. X      return FALSE;
  501. X  }
  502. X  
  503. X+ 
  504. X+ struct level_map {
  505. X+     const char *lev_name;
  506. X+     d_level *lev_spec;
  507. X+ } level_map[] = {
  508. X+     { "air",    &air_level },
  509. X+     { "asmodeus",    &asmodeus_level },
  510. X+     { "astral",    &astral_level },
  511. X+     { "baalz",    &baalzebub_level },
  512. X+     { "bigroom",    &bigroom_level },
  513. X+     { "castle",    &stronghold_level },
  514. X+     { "earth",    &earth_level },
  515. X+     { "fakewiz1",    &portal_level },
  516. X+     { "fire",    &fire_level },
  517. X+     { "juiblex",    &juiblex_level },
  518. X+ #ifdef MULDGN
  519. X+     { "knox",    &knox_level },
  520. X+ #endif
  521. X+     { "medusa",    &medusa_level },
  522. X+     { "oracle",    &oracle_level },
  523. X+     { "orcus",    &orcus_level },
  524. X+ #ifdef REINCARNATION
  525. X+     { "rogue",    &rogue_level },
  526. X+ #endif
  527. X+     { "sanctum",    &sanctum_level },
  528. X+     { "valley",    &valley_level },
  529. X+     { "water",    &water_level },
  530. X+     { "wizard1",    &wiz1_level },
  531. X+     { "wizard2",    &wiz2_level },
  532. X+     { "wizard3",    &wiz3_level },
  533. X+ #ifdef MULDGN
  534. X+     { X_START,    &qstart_level },
  535. X+     { X_LOCATE,    &qlocate_level },
  536. X+     { X_GOAL,    &nemesis_level },
  537. X+ #endif
  538. X+     { "",        (d_level *)0 }
  539. X+ };
  540. X+ 
  541. X  void
  542. X  init_dungeons()        /* initialize the "dungeon" structs */
  543. X  {
  544. X***************
  545. X*** 555,560 ****
  546. X--- 593,599 ----
  547. X      register int i, cl = 0, cb = 0;
  548. X      register s_level *x;
  549. X      struct proto_dungeon pd;
  550. X+     struct level_map *lev_map;
  551. X  
  552. X      pd.n_levs = pd.n_brs = 0;
  553. X  
  554. X***************
  555. X*** 722,801 ****
  556. X       * Find most of the special levels and dungeons so we can access their
  557. X       * locations quickly.
  558. X       */
  559. X! #ifdef REINCARNATION
  560. X!     if ((x = find_level("rogue")) != 0)
  561. X!         assign_level(&rogue_level, &x->dlevel);
  562. X! #endif
  563. X!     if ((x = find_level("oracle")) != 0)
  564. X!         assign_level(&oracle_level, &x->dlevel);
  565. X!     if ((x = find_level("bigroom")) != 0)
  566. X!         assign_level(&bigroom_level, &x->dlevel);
  567. X!     if ((x = find_level("medusa")) != 0)
  568. X!         assign_level(&medusa_level, &x->dlevel);
  569. X!     if ((x = find_level("castle")) != 0)
  570. X!         assign_level(&stronghold_level, &x->dlevel);
  571. X!     if ((x = find_level("valley")) != 0)
  572. X!         assign_level(&valley_level, &x->dlevel);
  573. X!     if ((x = find_level("wizard1")) != 0)
  574. X!         assign_level(&wiz1_level, &x->dlevel);
  575. X!     if ((x = find_level("wizard2")) != 0)
  576. X!         assign_level(&wiz2_level, &x->dlevel);
  577. X!     if ((x = find_level("wizard3")) != 0)
  578. X!         assign_level(&wiz3_level, &x->dlevel);
  579. X!     if ((x = find_level("juiblex")) != 0)
  580. X!         assign_level(&juiblex_level, &x->dlevel);
  581. X!     if ((x = find_level("orcus")) != 0)
  582. X!         assign_level(&orcus_level, &x->dlevel);
  583. X!     if ((x = find_level("asmodeus")) != 0)
  584. X!         assign_level(&asmodeus_level, &x->dlevel);
  585. X!     if ((x = find_level("baalz")) != 0)
  586. X!         assign_level(&baalzebub_level, &x->dlevel);
  587. X!     if ((x = find_level("fakewiz1")) != 0)
  588. X!         assign_level(&portal_level, &x->dlevel);
  589. X!     if ((x = find_level("sanctum")) != 0)
  590. X!         assign_level(&sanctum_level, &x->dlevel);
  591. X!     if ((x = find_level("earth")) != 0)
  592. X!         assign_level(&earth_level, &x->dlevel);
  593. X!     if ((x = find_level("water")) != 0)
  594. X!         assign_level(&water_level, &x->dlevel);
  595. X!     if ((x = find_level("fire")) != 0)
  596. X!         assign_level(&fire_level, &x->dlevel);
  597. X!     if ((x = find_level("air")) != 0)
  598. X!         assign_level(&air_level, &x->dlevel);
  599. X!     if ((x = find_level("astral")) != 0)
  600. X!         assign_level(&astral_level, &x->dlevel);
  601. X  #ifdef MULDGN
  602. X!     if ((x = find_level("knox")) != 0) {
  603. X!         branch *br;
  604. X!         assign_level(&knox_level, &x->dlevel);
  605. X!         /*
  606. X!          * Kludge to allow floating Knox entrance.  We specify a floating
  607. X!          * entrance by the fact that its entrance (end1) has a bogus dnum,
  608. X!          * namely n_dgns.
  609. X!          */
  610. X!         for (br = branches; br; br = br->next)
  611. X!         if (on_level(&br->end2, &knox_level)) break;
  612. X  
  613. X!         if (br) br->end1.dnum = n_dgns;
  614. X!         /* adjust the branch's position on the list */
  615. X!         insert_branch(br, TRUE);
  616. X      }
  617. X! /*
  618. X!  *    This is where the name substitution on the levels of the quest
  619. X!  *    dungeon occur.
  620. X!  */
  621. X!     if ((x = find_level(X_START)) != 0) {
  622. X!         x->proto[0] = pl_character[0];
  623. X!         assign_level(&qstart_level, &x->dlevel);
  624. X!     }
  625. X!     if ((x = find_level(X_LOCATE)) != 0) {
  626. X!         x->proto[0] = pl_character[0];
  627. X!         assign_level(&qlocate_level, &x->dlevel);
  628. X!     }
  629. X!     if ((x = find_level(X_GOAL)) != 0) {
  630. X!         x->proto[0] = pl_character[0];
  631. X!         assign_level(&nemesis_level, &x->dlevel);
  632. X!     }
  633. X  /*
  634. X   *    I hate hardwiring these names. :-(
  635. X   */
  636. X--- 761,795 ----
  637. X       * Find most of the special levels and dungeons so we can access their
  638. X       * locations quickly.
  639. X       */
  640. X!     for (lev_map = level_map; lev_map->lev_name[0]; lev_map++) {
  641. X!         x = find_level(lev_map->lev_name);
  642. X!         if (x) {
  643. X!             assign_level(lev_map->lev_spec, &x->dlevel);
  644. X  #ifdef MULDGN
  645. X!             if (!strncmp(lev_map->lev_name, "x-", 2)) {
  646. X!                 /* This is where the name substitution on the
  647. X!                  * levels of the quest dungeon occur.
  648. X!                  */
  649. X!                 x->proto[0] = pl_character[0];
  650. X!             } else if (lev_map->lev_spec == &knox_level) {
  651. X!                 branch *br;
  652. X!                 /*
  653. X!                  * Kludge to allow floating Knox entrance.  We
  654. X!                  * specify a floating entrance by the fact that
  655. X!                  * its entrance (end1) has a bogus dnum, namely
  656. X!                  * n_dgns.
  657. X!                  */
  658. X!                 for (br = branches; br; br = br->next)
  659. X!                     if (on_level(&br->end2, &knox_level)) break;
  660. X  
  661. X!                 if (br) br->end1.dnum = n_dgns;
  662. X!                 /* adjust the branch's position on the list */
  663. X!                 insert_branch(br, TRUE);
  664. X!             }
  665. X! #endif
  666. X!         }
  667. X      }
  668. X! #ifdef MULDGN
  669. X  /*
  670. X   *    I hate hardwiring these names. :-(
  671. X   */
  672. X*** /tmp/da10954    Tue Jun  1 16:13:30 1993
  673. X--- src/eat.c    Tue Jun  1 10:47:41 1993
  674. X***************
  675. X*** 1,8 ****
  676. X! /*    SCCS Id: @(#)eat.c    3.1    93/02/19    */
  677. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  678. X  /* NetHack may be freely redistributed.  See license for details. */
  679. X  
  680. X! #include    "hack.h"
  681. X  /*#define DEBUG        /* uncomment to enable new eat code debugging */
  682. X  
  683. X  #ifdef DEBUG
  684. X--- 1,8 ----
  685. X! /*    SCCS Id: @(#)eat.c    3.1    93/05/19    */
  686. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  687. X  /* NetHack may be freely redistributed.  See license for details. */
  688. X  
  689. X! #include "hack.h"
  690. X  /*#define DEBUG        /* uncomment to enable new eat code debugging */
  691. X  
  692. X  #ifdef DEBUG
  693. X***************
  694. X*** 176,182 ****
  695. X  
  696. X      exercise(A_CON, FALSE);
  697. X  
  698. X!     if (!rn2(20)) {
  699. X          You("stuff yourself and then vomit voluminously.");
  700. X          morehungry(1000);    /* you just got *very* sick! */
  701. X          vomit();
  702. X--- 176,182 ----
  703. X  
  704. X      exercise(A_CON, FALSE);
  705. X  
  706. X!     if (!rn2(20) || Breathless) {
  707. X          You("stuff yourself and then vomit voluminously.");
  708. X          morehungry(1000);    /* you just got *very* sick! */
  709. X          vomit();
  710. X***************
  711. X*** 285,292 ****
  712. X           || otmp->unpaid) &&
  713. X           (otmp->otyp == CORPSE || objects[otmp->otyp].oc_delay > 1)) {
  714. X          /* create a dummy duplicate to put on bill */
  715. X!         verbalize("You bite it, you bought it!");
  716. X          bill_dummy_object(otmp);
  717. X          }
  718. X          otmp->oeaten = (otmp->otyp == CORPSE ?
  719. X                  (int)mons[otmp->corpsenm].cnutrit :
  720. X--- 285,293 ----
  721. X           || otmp->unpaid) &&
  722. X           (otmp->otyp == CORPSE || objects[otmp->otyp].oc_delay > 1)) {
  723. X          /* create a dummy duplicate to put on bill */
  724. X!         verbalize("You bit it, you bought it!");
  725. X          bill_dummy_object(otmp);
  726. X+         otmp->no_charge = 1;    /* you now own this */
  727. X          }
  728. X          otmp->oeaten = (otmp->otyp == CORPSE ?
  729. X                  (int)mons[otmp->corpsenm].cnutrit :
  730. X***************
  731. X*** 345,351 ****
  732. X      }
  733. X      if(!victual.eating) return(0);
  734. X  
  735. X!     if(++victual.usedtime < victual.reqtime) {
  736. X          if(bite()) return(0);
  737. X          return(1);    /* still busy */
  738. X      } else {    /* done */
  739. X--- 346,352 ----
  740. X      }
  741. X      if(!victual.eating) return(0);
  742. X  
  743. X!     if(++victual.usedtime <= victual.reqtime) {
  744. X          if(bite()) return(0);
  745. X          return(1);    /* still busy */
  746. X      } else {    /* done */
  747. X***************
  748. X*** 876,883 ****
  749. X      }
  750. X      if(tin.usedtime < tin.reqtime)
  751. X          return(1);        /* still busy */
  752. X!     if(tin.tin->cursed && tin.tin->spe != -1 && !rn2(8)) {
  753. X!         b_trapped("tin");
  754. X          goto use_me;
  755. X      }
  756. X      You("succeed in opening the tin.");
  757. X--- 877,885 ----
  758. X      }
  759. X      if(tin.usedtime < tin.reqtime)
  760. X          return(1);        /* still busy */
  761. X!     if(tin.tin->otrapped || 
  762. X!        (tin.tin->cursed && tin.tin->spe != -1 && !rn2(8))) {
  763. X!         b_trapped("tin", 0);
  764. X          goto use_me;
  765. X      }
  766. X      You("succeed in opening the tin.");
  767. X***************
  768. X*** 1034,1045 ****
  769. X          pline("Everything suddenly goes dark.");
  770. X          make_blinded((long)d(2,10),FALSE);
  771. X      } else if(!rn2(3)) {
  772. X!         if(Blind)
  773. X!           pline("The world spins and you %s.",
  774. X!             Levitation ? "collapse in place" :
  775. X!             "slap against the floor");
  776. X          else
  777. X!           pline("The world spins and goes dark.");
  778. X          flags.soundok = 0;
  779. X          nomul(-rnd(10));
  780. X          nomovemsg = "You are conscious again.";
  781. X--- 1036,1050 ----
  782. X          pline("Everything suddenly goes dark.");
  783. X          make_blinded((long)d(2,10),FALSE);
  784. X      } else if(!rn2(3)) {
  785. X!         const char *what, *where;
  786. X!         if (!Blind)
  787. X!             what = "goes",  where = "dark";
  788. X!         else if (Levitation || Is_airlevel(&u.uz) ||
  789. X!              Is_waterlevel(&u.uz))
  790. X!             what = "you lose control of",  where = "yourself";
  791. X          else
  792. X!             what = "you slap against the",  where = surface(u.ux,u.uy);
  793. X!         pline("The world spins and %s %s.", what, where);
  794. X          flags.soundok = 0;
  795. X          nomul(-rnd(10));
  796. X          nomovemsg = "You are conscious again.";
  797. X***************
  798. X*** 1438,1444 ****
  799. X      if (!(otmp = floorfood("eat", 0))) return 0;
  800. X      if (check_capacity(NULL)) return 0;
  801. X  #ifdef POLYSELF
  802. X!     /* We have to make non-foods take no time to eat, unless we want to
  803. X       * do ridiculous amounts of coding to deal with partly eaten plate
  804. X       * mails, players who polymorph back to human in the middle of their
  805. X       * metallic meal, etc....
  806. X--- 1443,1449 ----
  807. X      if (!(otmp = floorfood("eat", 0))) return 0;
  808. X      if (check_capacity(NULL)) return 0;
  809. X  #ifdef POLYSELF
  810. X!     /* We have to make non-foods take 1 move to eat, unless we want to
  811. X       * do ridiculous amounts of coding to deal with partly eaten plate
  812. X       * mails, players who polymorph back to human in the middle of their
  813. X       * metallic meal, etc....
  814. X***************
  815. X*** 1458,1463 ****
  816. X--- 1463,1471 ----
  817. X          if (otmp->oclass == GOLD_CLASS)
  818. X          basenutrit = ((otmp->quan > 200000L) ? 2000
  819. X              : (int)(otmp->quan/100L));
  820. X+         else if(otmp->oclass == BALL_CLASS || otmp->oclass == CHAIN_CLASS)
  821. X+         basenutrit = weight(otmp);
  822. X+         /* oc_nutrition is usually weight anyway */
  823. X          else basenutrit = objects[otmp->otyp].oc_nutrition;
  824. X          victual.nmod = basenutrit;
  825. X          victual.eating = TRUE; /* needed for lesshungry() */
  826. X***************
  827. X*** 1614,1620 ****
  828. X          /* Conflict uses up food too */
  829. X          if ((Conflict & (~W_ARTI))) u.uhunger--;
  830. X          /* +0 charged rings don't do anything, so don't affect hunger */
  831. X!         switch (moves % 20) {    /* note: use even cases only */
  832. X           case  4: if (uleft &&
  833. X                (uleft->spe || !objects[uleft->otyp].oc_charged))
  834. X                  u.uhunger--;
  835. X--- 1622,1628 ----
  836. X          /* Conflict uses up food too */
  837. X          if ((Conflict & (~W_ARTI))) u.uhunger--;
  838. X          /* +0 charged rings don't do anything, so don't affect hunger */
  839. X!         switch ((int)(moves % 20)) {    /* note: use even cases only */
  840. X           case  4: if (uleft &&
  841. X                (uleft->spe || !objects[uleft->otyp].oc_charged))
  842. X                  u.uhunger--;
  843. X*** /tmp/da10962    Tue Jun  1 16:13:33 1993
  844. X--- src/end.c    Tue Jun  1 11:19:02 1993
  845. X***************
  846. X*** 1,4 ****
  847. X! /*    SCCS Id: @(#)end.c    3.1    93/02/09    */
  848. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  849. X  /* NetHack may be freely redistributed.  See license for details. */
  850. X  
  851. X--- 1,4 ----
  852. X! /*    SCCS Id: @(#)end.c    3.1    93/05/29    */
  853. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  854. X  /* NetHack may be freely redistributed.  See license for details. */
  855. X  
  856. X***************
  857. X*** 10,19 ****
  858. X--- 10,22 ----
  859. X  #include <signal.h>
  860. X  #endif
  861. X  
  862. X+ 
  863. X  STATIC_PTR int NDECL(done_intr);
  864. X  static void FDECL(disclose,(int,BOOLEAN_P));
  865. X  static struct obj *FDECL(get_valuables, (struct obj *));
  866. X  static void FDECL(savelife, (int));
  867. X+ static void NDECL(list_vanquished);
  868. X+ static void NDECL(list_genocided);
  869. X  
  870. X  /*
  871. X   * The order of these needs to match the macros in hack.h.
  872. X***************
  873. X*** 70,75 ****
  874. X--- 73,79 ----
  875. X      }
  876. X  #if defined(WIZARD) && (defined(UNIX) || defined(VMS) || defined(LATTICE))
  877. X      if(wizard) {
  878. X+         int c;
  879. X  # ifdef VMS
  880. X          const char *tmp = "Enter debugger?";
  881. X  # else
  882. X***************
  883. X*** 79,85 ****
  884. X          const char *tmp = "Dump core?";
  885. X  #  endif
  886. X  # endif
  887. X!         if(yn(tmp) == 'y') {
  888. X          (void) signal(SIGINT, (SIG_RET_TYPE) done1);
  889. X          exit_nhwindows(NULL);
  890. X  #ifdef AMIGA
  891. X--- 83,89 ----
  892. X          const char *tmp = "Dump core?";
  893. X  #  endif
  894. X  # endif
  895. X!         if ((c = ynq(tmp)) == 'y') {
  896. X          (void) signal(SIGINT, (SIG_RET_TYPE) done1);
  897. X          exit_nhwindows(NULL);
  898. X  #ifdef AMIGA
  899. X***************
  900. X*** 90,96 ****
  901. X  # endif
  902. X              abort();
  903. X  #endif
  904. X!         }
  905. X      }
  906. X  #endif
  907. X  #ifndef LINT
  908. X--- 94,100 ----
  909. X  # endif
  910. X              abort();
  911. X  #endif
  912. X!         } else if (c == 'q') done_stopprint++;
  913. X      }
  914. X  #endif
  915. X  #ifndef LINT
  916. X***************
  917. X*** 101,107 ****
  918. X  
  919. X  STATIC_PTR
  920. X  int
  921. X! done_intr(){
  922. X      done_stopprint++;
  923. X  #ifndef NO_SIGNAL
  924. X      (void) signal(SIGINT, SIG_IGN);
  925. X--- 105,112 ----
  926. X  
  927. X  STATIC_PTR
  928. X  int
  929. X! done_intr()
  930. X! {
  931. X      done_stopprint++;
  932. X  #ifndef NO_SIGNAL
  933. X      (void) signal(SIGINT, SIG_IGN);
  934. X***************
  935. X*** 108,114 ****
  936. X  # if defined(UNIX) || defined(VMS)
  937. X      (void) signal(SIGQUIT, SIG_IGN);
  938. X  # endif
  939. X! #endif /* NO_SIGNAL /* */
  940. X      return 0;
  941. X  }
  942. X  
  943. X--- 113,119 ----
  944. X  # if defined(UNIX) || defined(VMS)
  945. X      (void) signal(SIGQUIT, SIG_IGN);
  946. X  # endif
  947. X! #endif /* NO_SIGNAL */
  948. X      return 0;
  949. X  }
  950. X  
  951. X***************
  952. X*** 115,121 ****
  953. X  #if defined(UNIX) || defined(VMS)
  954. X  static
  955. X  int
  956. X! done_hangup(){
  957. X      done_hup++;
  958. X      (void)signal(SIGHUP, SIG_IGN);
  959. X      (void)done_intr();
  960. X--- 120,127 ----
  961. X  #if defined(UNIX) || defined(VMS)
  962. X  static
  963. X  int
  964. X! done_hangup()
  965. X! {
  966. X      done_hup++;
  967. X      (void)signal(SIGHUP, SIG_IGN);
  968. X      (void)done_intr();
  969. X***************
  970. X*** 240,246 ****
  971. X      char    c;
  972. X      char    qbuf[QBUFSZ];
  973. X  
  974. X!     if(invent) {
  975. X          if(taken)
  976. X          Sprintf(qbuf,"Do you want to see what you had when you %s?",
  977. X              (how == QUIT) ? "quit" : "died");
  978. X--- 246,253 ----
  979. X      char    c;
  980. X      char    qbuf[QBUFSZ];
  981. X  
  982. X!     if (invent && !done_stopprint &&
  983. X!         (!flags.end_disclose[0] || index(flags.end_disclose, 'i'))) {
  984. X          if(taken)
  985. X          Sprintf(qbuf,"Do you want to see what you had when you %s?",
  986. X              (how == QUIT) ? "quit" : "died");
  987. X***************
  988. X*** 272,283 ****
  989. X          }
  990. X      }
  991. X  
  992. X!     if (!done_stopprint) {
  993. X!         c = yn_function("Do you want to see your intrinsics?",ynqchars,'y');
  994. X          if (c == 'y') enlightenment(TRUE);    /* final */
  995. X          if (c == 'q') done_stopprint++;
  996. X      }
  997. X  
  998. X  }
  999. X  
  1000. X  /* try to get the player back in a viable state after being killed */
  1001. X--- 279,300 ----
  1002. X          }
  1003. X      }
  1004. X  
  1005. X!     if (!done_stopprint &&
  1006. X!         (!flags.end_disclose[0] || index(flags.end_disclose, 'a'))) {
  1007. X!         c = yn_function("Do you want to see your attributes?",ynqchars,'y');
  1008. X          if (c == 'y') enlightenment(TRUE);    /* final */
  1009. X          if (c == 'q') done_stopprint++;
  1010. X      }
  1011. X  
  1012. X+     if (!done_stopprint &&
  1013. X+         (!flags.end_disclose[0] || index(flags.end_disclose, 'v'))) {
  1014. X+         list_vanquished();
  1015. X+     }
  1016. X+ 
  1017. X+     if (!done_stopprint &&
  1018. X+         (!flags.end_disclose[0] || index(flags.end_disclose, 'g'))) {
  1019. X+         list_genocided();
  1020. X+     }
  1021. X  }
  1022. X  
  1023. X  /* try to get the player back in a viable state after being killed */
  1024. X***************
  1025. X*** 313,319 ****
  1026. X      struct obj *valuables = (struct obj *)0;
  1027. X  
  1028. X      for (obj = list; obj; obj = next_obj) {
  1029. X!     if (Is_container(obj) && obj->cobj) {
  1030. X          c_vals = get_valuables(obj->cobj);
  1031. X  
  1032. X          if (c_vals) {
  1033. X--- 330,336 ----
  1034. X      struct obj *valuables = (struct obj *)0;
  1035. X  
  1036. X      for (obj = list; obj; obj = next_obj) {
  1037. X!     if (Has_contents(obj)) {
  1038. X          c_vals = get_valuables(obj->cobj);
  1039. X  
  1040. X          if (c_vals) {
  1041. X***************
  1042. X*** 412,418 ****
  1043. X      (void) signal(SIGQUIT, (SIG_RET_TYPE) done_intr);
  1044. X      (void) signal(SIGHUP, (SIG_RET_TYPE) done_hangup);
  1045. X  # endif
  1046. X! #endif /* NO_SIGNAL /* */
  1047. X  #ifdef POLYSELF
  1048. X      if (u.mtimedone)
  1049. X          upmon = uasmon;
  1050. X--- 429,435 ----
  1051. X      (void) signal(SIGQUIT, (SIG_RET_TYPE) done_intr);
  1052. X      (void) signal(SIGHUP, (SIG_RET_TYPE) done_hangup);
  1053. X  # endif
  1054. X! #endif /* NO_SIGNAL */
  1055. X  #ifdef POLYSELF
  1056. X      if (u.mtimedone)
  1057. X          upmon = uasmon;
  1058. X***************
  1059. X*** 454,460 ****
  1060. X  #endif
  1061. X      if (have_windows) display_nhwindow(WIN_MESSAGE, FALSE);
  1062. X  
  1063. X!     if (flags.end_disclose && how != PANICKED) disclose(how,taken);
  1064. X  
  1065. X      if (how < GENOCIDED) {
  1066. X  #ifdef WIZARD
  1067. X--- 471,478 ----
  1068. X  #endif
  1069. X      if (have_windows) display_nhwindow(WIN_MESSAGE, FALSE);
  1070. X  
  1071. X!     if (strcmp(flags.end_disclose, "none") && how != PANICKED)
  1072. X!         disclose(how, taken);
  1073. X  
  1074. X      if (how < GENOCIDED) {
  1075. X  #ifdef WIZARD
  1076. X***************
  1077. X*** 490,496 ****
  1078. X          if(!done_stopprint || flags.tombstone)
  1079. X          endwin = create_nhwindow(NHW_TEXT);
  1080. X  
  1081. X!         if(how < GENOCIDED && flags.tombstone) outrip(how, endwin);
  1082. X      } else
  1083. X          done_stopprint = 1; /* just avoid any more output */
  1084. X  
  1085. X--- 508,514 ----
  1086. X          if(!done_stopprint || flags.tombstone)
  1087. X          endwin = create_nhwindow(NHW_TEXT);
  1088. X  
  1089. X!         if(how < GENOCIDED && flags.tombstone) outrip(endwin, how);
  1090. X      } else
  1091. X          done_stopprint = 1; /* just avoid any more output */
  1092. X  
  1093. X***************
  1094. X*** 500,506 ****
  1095. X      if (u.uhave.amulet) Strcat(kilbuf, " (with the Amulet)");
  1096. X      if (!done_stopprint) {
  1097. X          Sprintf(pbuf, "%s %s the %s...",
  1098. X!            (pl_character[0]=='S') ? "Sayonara" : "Goodbye", plname,
  1099. X             how != ASCENDED ? (const char *) pl_character :
  1100. X             (const char *) (flags.female ? "Demigoddess" : "Demigod"));
  1101. X          putstr(endwin, 0, pbuf);
  1102. X--- 518,525 ----
  1103. X      if (u.uhave.amulet) Strcat(kilbuf, " (with the Amulet)");
  1104. X      if (!done_stopprint) {
  1105. X          Sprintf(pbuf, "%s %s the %s...",
  1106. X!            (pl_character[0] == 'S') ? "Sayonara" :
  1107. X!            (pl_character[0] == 'T') ? "Aloha" : "Goodbye", plname,
  1108. X             how != ASCENDED ? (const char *) pl_character :
  1109. X             (const char *) (flags.female ? "Demigoddess" : "Demigod"));
  1110. X          putstr(endwin, 0, pbuf);
  1111. X***************
  1112. X*** 623,652 ****
  1113. X          putstr(endwin, 0, pbuf);
  1114. X          putstr(endwin, 0, "");
  1115. X      }
  1116. X! #if (defined(WIZARD) || defined(EXPLORE_MODE))
  1117. X! # ifndef LOGFILE
  1118. X!     if (wizard || discover) {
  1119. X!         if (!done_stopprint) {
  1120. X!         putstr(endwin, 0, "");
  1121. X!         Sprintf(pbuf, "Since you were in %s mode, the score list \
  1122. X! will not be checked.", wizard ? "wizard" : "discover");
  1123. X!         putstr(endwin, 0, pbuf);
  1124. X!         putstr(endwin, 0, "");
  1125. X!         display_nhwindow(endwin, TRUE);
  1126. X!         }
  1127. X!         if (have_windows)
  1128. X!         exit_nhwindows(NULL);
  1129. X!     } else
  1130. X! # endif
  1131. X! #endif
  1132. X!     {
  1133. X!         if (!done_stopprint)
  1134. X!         display_nhwindow(endwin, TRUE);
  1135. X!         if (have_windows)
  1136. X!         exit_nhwindows(NULL);
  1137. X! /* "So when I die, the first thing I will see in Heaven is a score list?" */
  1138. X!         topten(how);
  1139. X!     }
  1140. X      if(done_stopprint) { raw_print(""); raw_print(""); }
  1141. X      terminate(0);
  1142. X  }
  1143. X--- 642,654 ----
  1144. X          putstr(endwin, 0, pbuf);
  1145. X          putstr(endwin, 0, "");
  1146. X      }
  1147. X!     if (!done_stopprint)
  1148. X!         display_nhwindow(endwin, TRUE);
  1149. X!     if (have_windows)
  1150. X!         exit_nhwindows(NULL);
  1151. X!     /* "So when I die, the first thing I will see in Heaven is a
  1152. X!      * score list?" */
  1153. X!     topten(how);
  1154. X      if(done_stopprint) { raw_print(""); raw_print(""); }
  1155. X      terminate(0);
  1156. X  }
  1157. X***************
  1158. X*** 700,705 ****
  1159. X--- 702,708 ----
  1160. X      }
  1161. X  }
  1162. X  
  1163. X+ 
  1164. X  void
  1165. X  terminate(status)
  1166. X  int status;
  1167. X***************
  1168. X*** 706,721 ****
  1169. X  {
  1170. X  #ifdef MAC
  1171. X      if (!hu) {
  1172. X!         int idx;
  1173. X!         for (idx = theWindows[BASE_WINDOW].windowTextLen; --idx >= 0; )
  1174. X!             /* If there is something to show... */
  1175. X!             if (((unsigned char *)*theWindows[BASE_WINDOW].windowText)[idx] > ' ') {
  1176. X!                 display_nhwindow(BASE_WINDOW, TRUE);
  1177. X!                 break;
  1178. X!             }
  1179. X      }
  1180. X  #endif
  1181. X      exit(status);
  1182. X  }
  1183. X  
  1184. X  /*end.c*/
  1185. X--- 709,821 ----
  1186. X  {
  1187. X  #ifdef MAC
  1188. X      if (!hu) {
  1189. X!         getreturn("to exit");
  1190. X      }
  1191. X  #endif
  1192. X      exit(status);
  1193. X+ }
  1194. X+ 
  1195. X+ static void
  1196. X+ list_vanquished()
  1197. X+ {
  1198. X+     register int i, lev;
  1199. X+     int ntypes = 0, max_lev = 0, nkilled;
  1200. X+     long total_killed = 0L;
  1201. X+     char c;
  1202. X+     static winid klwin;
  1203. X+     char buf[BUFSZ];
  1204. X+ 
  1205. X+     /* get totals first */
  1206. X+     for (i = 0; i < NUMMONS; i++) {
  1207. X+     if (u.nr_killed[i]) ntypes++;
  1208. X+     total_killed += (long)u.nr_killed[i];
  1209. X+     if (mons[i].mlevel > max_lev) max_lev = mons[i].mlevel;
  1210. X+     }
  1211. X+ 
  1212. X+     /* vanquished foes list;
  1213. X+      * includes all dead monsters, not just those killed by the player
  1214. X+      */
  1215. X+     if (ntypes != 0) {
  1216. X+     c = yn_function("Do you want an account of foes vanquished?",
  1217. X+             ynqchars, 'n');
  1218. X+     if (c == 'q') done_stopprint++;
  1219. X+     if (c == 'y') {
  1220. X+         klwin = create_nhwindow(NHW_MENU);
  1221. X+         putstr(klwin, 0, "Vanquished foes:");
  1222. X+         putstr(klwin, 0, "");
  1223. X+ 
  1224. X+         /* countdown by monster "toughness" */
  1225. X+         for (lev = max_lev; lev >= 0; lev--)
  1226. X+           for (i = 0; i < NUMMONS; i++)
  1227. X+         if (mons[i].mlevel == lev && (nkilled = u.nr_killed[i])) {
  1228. X+             if (i == PM_WIZARD_OF_YENDOR || mons[i].geno & G_UNIQ) {
  1229. X+             Sprintf(buf, type_is_pname(&mons[i]) ? mons[i].mname :
  1230. X+                 The(mons[i].mname));
  1231. X+             if (nkilled > 1)
  1232. X+                 Sprintf(eos(buf)," (%d time%s)",
  1233. X+                     nkilled, plur(nkilled));
  1234. X+             } else {
  1235. X+             /* trolls or undead might have come back,
  1236. X+                but we don't keep track of that */
  1237. X+             if (nkilled == 1)
  1238. X+                 Strcpy(buf, an(mons[i].mname));
  1239. X+             else
  1240. X+                 Sprintf(buf, "%d %s",
  1241. X+                     nkilled, makeplural(mons[i].mname));
  1242. X+             }
  1243. X+             putstr(klwin, 0, buf);
  1244. X+         }
  1245. X+         /*
  1246. X+          * if (Hallucination)
  1247. X+          *     putstr(klwin, 0, "and a partridge in a pear tree");
  1248. X+          */
  1249. X+         if (ntypes > 1) {
  1250. X+         putstr(klwin, 0, "");
  1251. X+         Sprintf(buf, "%ld creatures vanquished.", total_killed);
  1252. X+         putstr(klwin, 0, buf);
  1253. X+         }
  1254. X+         display_nhwindow(klwin, TRUE);
  1255. X+         destroy_nhwindow(klwin);
  1256. X+     }
  1257. X+     }
  1258. X+ }
  1259. X+ 
  1260. X+ static void
  1261. X+ list_genocided()
  1262. X+ {
  1263. X+     register int i;
  1264. X+     int ngenocided = 0;
  1265. X+     char c;
  1266. X+     static winid klwin;
  1267. X+     char buf[BUFSZ];
  1268. X+ 
  1269. X+     /* get totals first */
  1270. X+     for (i = 0; i < NUMMONS; i++) {
  1271. X+     if (mons[i].geno & G_GENOD) ngenocided++;
  1272. X+     }
  1273. X+ 
  1274. X+     /* genocided species list */
  1275. X+     if (ngenocided != 0) {
  1276. X+     c = yn_function("Do you want a list of species genocided?",
  1277. X+             ynqchars, 'n');
  1278. X+     if (c == 'q') done_stopprint++;
  1279. X+     if (c == 'y') {
  1280. X+         klwin = create_nhwindow(NHW_MENU);
  1281. X+         putstr(klwin, 0, "Genocided species:");
  1282. X+         putstr(klwin, 0, "");
  1283. X+ 
  1284. X+         for (i = 0; i < NUMMONS; i++)
  1285. X+         if (mons[i].geno & G_GENOD)
  1286. X+             putstr(klwin, 0, makeplural(mons[i].mname));
  1287. X+ 
  1288. X+         putstr(klwin, 0, "");
  1289. X+         Sprintf(buf, "%d species genocided.", ngenocided);
  1290. X+         putstr(klwin, 0, buf);
  1291. X+ 
  1292. X+         display_nhwindow(klwin, TRUE);
  1293. X+         destroy_nhwindow(klwin);
  1294. X+     }   
  1295. X+     }
  1296. X  }
  1297. X  
  1298. X  /*end.c*/
  1299. X*** /tmp/da10970    Tue Jun  1 16:13:36 1993
  1300. X--- src/engrave.c    Fri May 28 11:32:27 1993
  1301. X***************
  1302. X*** 1,4 ****
  1303. X! /*    SCCS Id: @(#)engrave.c    3.1    92/02/25    */
  1304. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1305. X  /* NetHack may be freely redistributed.  See license for details. */
  1306. X  
  1307. X--- 1,4 ----
  1308. X! /*    SCCS Id: @(#)engrave.c    3.1    92/05/18    */
  1309. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1310. X  /* NetHack may be freely redistributed.  See license for details. */
  1311. X  
  1312. X***************
  1313. X*** 47,52 ****
  1314. X--- 47,73 ----
  1315. X  #endif /* OVLB */
  1316. X  #ifdef OVL0
  1317. X  
  1318. X+ const char *
  1319. X+ surface(x, y)
  1320. X+ register int x, y;
  1321. X+ {
  1322. X+     register struct rm *lev = &levl[x][y];
  1323. X+ 
  1324. X+     if (IS_AIR(lev->typ))
  1325. X+         return "air";
  1326. X+     else if (is_pool(x,y))
  1327. X+         return "water";
  1328. X+     else if (is_ice(x,y))
  1329. X+         return "ice";
  1330. X+     else if (is_lava(x,y))
  1331. X+         return "lava";
  1332. X+     else if ((IS_ROOM(lev->typ) && !Is_earthlevel(&u.uz)) ||
  1333. X+          IS_WALL(lev->typ) || IS_DOOR(lev->typ) || lev->typ == SDOOR)
  1334. X+         return "floor";
  1335. X+     else
  1336. X+         return "ground";
  1337. X+ }
  1338. X+ 
  1339. X  struct engr *
  1340. X  engr_at(x,y) register xchar x,y; {
  1341. X  register struct engr *ep = head_engr;
  1342. X***************
  1343. X*** 140,164 ****
  1344. X          case DUST:
  1345. X          if(!Blind) {
  1346. X              sensed = 1;
  1347. X!             pline("Something is written here in the dust.");
  1348. X          }
  1349. X          break;
  1350. X          case ENGRAVE:
  1351. X          if(!Blind || !Levitation) {
  1352. X              sensed = 1;
  1353. X!             pline("Something is engraved here on the floor.");
  1354. X          }
  1355. X          break;
  1356. X          case BURN:
  1357. X          if(!Blind || !Levitation) {
  1358. X              sensed = 1;
  1359. X!             pline("Some text has been burned into the floor here.");
  1360. X          }
  1361. X          break;
  1362. X          case MARK:
  1363. X          if(!Blind) {
  1364. X              sensed = 1;
  1365. X!             pline("There's some graffiti on the floor here.");
  1366. X          }
  1367. X          break;
  1368. X          case BLOOD:
  1369. X--- 161,190 ----
  1370. X          case DUST:
  1371. X          if(!Blind) {
  1372. X              sensed = 1;
  1373. X!             pline("Something is written here in the %s.",
  1374. X!                 is_ice(x,y) ? "frost" : "dust");
  1375. X          }
  1376. X          break;
  1377. X          case ENGRAVE:
  1378. X          if(!Blind || !Levitation) {
  1379. X              sensed = 1;
  1380. X!             pline("Something is engraved here on the %s.",
  1381. X!                 surface(x,y));
  1382. X          }
  1383. X          break;
  1384. X          case BURN:
  1385. X          if(!Blind || !Levitation) {
  1386. X              sensed = 1;
  1387. X!             pline("Some text has been %s into the %s here.",
  1388. X!                 is_ice(x,y) ? "melted" : "burned",
  1389. X!                 surface(x,y));
  1390. X          }
  1391. X          break;
  1392. X          case MARK:
  1393. X          if(!Blind) {
  1394. X              sensed = 1;
  1395. X!             pline("There's some graffiti on the %s here.",
  1396. X!                 surface(x,y));
  1397. X          }
  1398. X          break;
  1399. X          case BLOOD:
  1400. X***************
  1401. X*** 195,201 ****
  1402. X  {
  1403. X      register struct engr *ep;
  1404. X  
  1405. X!     if(ep = engr_at(x,y))
  1406. X          del_engr(ep);
  1407. X      ep = newengr(strlen(s) + 1);
  1408. X      ep->nxt_engr = head_engr;
  1409. X--- 221,227 ----
  1410. X  {
  1411. X      register struct engr *ep;
  1412. X  
  1413. X!     if ((ep = engr_at(x,y)) != 0)
  1414. X          del_engr(ep);
  1415. X      ep = newengr(strlen(s) + 1);
  1416. X      ep->nxt_engr = head_engr;
  1417. X***************
  1418. X*** 210,215 ****
  1419. X--- 236,251 ----
  1420. X      ep->engr_lth = strlen(s) + 1;
  1421. X  }
  1422. X  
  1423. X+ /* delete any engraving at location <x,y> */
  1424. X+ void
  1425. X+ del_engr_at(x, y)
  1426. X+ int x, y;
  1427. X+ {
  1428. X+     register struct engr *ep = engr_at(x, y);
  1429. X+ 
  1430. X+     if (ep) del_engr(ep);
  1431. X+ }
  1432. X+ 
  1433. X  /*
  1434. X   *    freehand - returns true if player has a free hand
  1435. X   */
  1436. X***************
  1437. X*** 278,286 ****
  1438. X      char buf[BUFSZ];    /* Buffer for final/poly engraving text */
  1439. X      char ebuf[BUFSZ];    /* Buffer for initial engraving text */
  1440. X      char qbuf[QBUFSZ];    /* Buffer for query text */
  1441. X      const char *everb;    /* Present tense of engraving type */
  1442. X      const char *eloc;    /* Where the engraving is (ie dust/floor/...) */
  1443. X-     const char *post_engr_text; /* Text displayed after engraving prompt */
  1444. X      register char *sp;    /* Place holder for space count of engr text */
  1445. X      register int len;    /* # of nonspace chars of new engraving text */
  1446. X      register int maxelen;    /* Max allowable length of new engraving text */
  1447. X--- 314,322 ----
  1448. X      char buf[BUFSZ];    /* Buffer for final/poly engraving text */
  1449. X      char ebuf[BUFSZ];    /* Buffer for initial engraving text */
  1450. X      char qbuf[QBUFSZ];    /* Buffer for query text */
  1451. X+     char post_engr_text[BUFSZ]; /* Text displayed after engraving prompt */
  1452. X      const char *everb;    /* Present tense of engraving type */
  1453. X      const char *eloc;    /* Where the engraving is (ie dust/floor/...) */
  1454. X      register char *sp;    /* Place holder for space count of engr text */
  1455. X      register int len;    /* # of nonspace chars of new engraving text */
  1456. X      register int maxelen;    /* Max allowable length of new engraving text */
  1457. X***************
  1458. X*** 295,301 ****
  1459. X  
  1460. X      buf[0] = (char)0;
  1461. X      ebuf[0] = (char)0;
  1462. X!     post_engr_text = (char *)0;
  1463. X      maxelen = BUFSZ - 1;
  1464. X  
  1465. X      /* Can the adventurer engrave at all? */
  1466. X--- 331,337 ----
  1467. X  
  1468. X      buf[0] = (char)0;
  1469. X      ebuf[0] = (char)0;
  1470. X!     post_engr_text[0] = (char)0;
  1471. X      maxelen = BUFSZ - 1;
  1472. X  
  1473. X      /* Can the adventurer engrave at all? */
  1474. X***************
  1475. X*** 305,315 ****
  1476. X              pline("What would you write?  \"Jonah was here\"?");
  1477. X              return(0);
  1478. X          } else if (is_whirly(u.ustuck->data)) {
  1479. X!             You("can't reach the ground.");
  1480. X              return(0);
  1481. X          } else 
  1482. X              jello = TRUE;
  1483. X!         } else if (is_lava(u.ux, u.uy)) {
  1484. X          You("can't write on the lava!");
  1485. X          return(0);
  1486. X      } else if (is_pool(u.ux,u.uy) || IS_FOUNTAIN(levl[u.ux][u.uy].typ)) {
  1487. X--- 341,351 ----
  1488. X              pline("What would you write?  \"Jonah was here\"?");
  1489. X              return(0);
  1490. X          } else if (is_whirly(u.ustuck->data)) {
  1491. X!             You("can't reach the %s.", surface(u.ux,u.uy));
  1492. X              return(0);
  1493. X          } else 
  1494. X              jello = TRUE;
  1495. X!     } else if (is_lava(u.ux, u.uy)) {
  1496. X          You("can't write on the lava!");
  1497. X          return(0);
  1498. X      } else if (is_pool(u.ux,u.uy) || IS_FOUNTAIN(levl[u.ux][u.uy].typ)) {
  1499. X***************
  1500. X*** 351,357 ****
  1501. X          return(0);
  1502. X      }
  1503. X      if(Levitation && otmp->oclass != WAND_CLASS){        /* riv05!a3 */
  1504. X!         You("can't reach the floor!");
  1505. X          return(0);
  1506. X      }
  1507. X  
  1508. X--- 387,393 ----
  1509. X          return(0);
  1510. X      }
  1511. X      if(Levitation && otmp->oclass != WAND_CLASS){        /* riv05!a3 */
  1512. X!         You("can't reach the %s!", surface(u.ux,u.uy));
  1513. X          return(0);
  1514. X      }
  1515. X  
  1516. X***************
  1517. X*** 421,426 ****
  1518. X--- 457,463 ----
  1519. X           */
  1520. X          case WAND_CLASS:
  1521. X          if (zappable(otmp)) {
  1522. X+             check_unpaid(otmp);
  1523. X              zapwand = TRUE;
  1524. X              if (Levitation) ptext = FALSE;
  1525. X  
  1526. X***************
  1527. X*** 438,457 ****
  1528. X              break;
  1529. X  
  1530. X              /* IMMEDIATE wands */
  1531. X!                 /* If wand is "IMMEDIATE", remember to effect the
  1532. X!              * previous engraving even if turning to dust.,
  1533. X               */
  1534. X              case WAN_STRIKING:
  1535. X!             post_engr_text =
  1536. X!             "The wand unsuccessfully fights your attempt to write!";
  1537. X              break;
  1538. X              case WAN_SLOW_MONSTER:
  1539. X!             if (!Blind)
  1540. X!                post_engr_text = "The bugs on the ground slow down!";
  1541. X              break;
  1542. X              case WAN_SPEED_MONSTER:
  1543. X!             if (!Blind)
  1544. X!                post_engr_text = "The bugs on the ground speed up!";
  1545. X              break;
  1546. X              case WAN_POLYMORPH:
  1547. X              if(oep)  {
  1548. X--- 475,501 ----
  1549. X              break;
  1550. X  
  1551. X              /* IMMEDIATE wands */
  1552. X!                 /* If wand is "IMMEDIATE", remember to affect the
  1553. X!              * previous engraving even if turning to dust.
  1554. X               */
  1555. X              case WAN_STRIKING:
  1556. X!             Strcpy(post_engr_text,
  1557. X!             "The wand unsuccessfully fights your attempt to write!"
  1558. X!             );
  1559. X              break;
  1560. X              case WAN_SLOW_MONSTER:
  1561. X!             if (!Blind) {
  1562. X!                Sprintf(post_engr_text,
  1563. X!                    "The bugs on the %s slow down!",
  1564. X!                    surface(u.ux, u.uy));
  1565. X!             }
  1566. X              break;
  1567. X              case WAN_SPEED_MONSTER:
  1568. X!             if (!Blind) {
  1569. X!                Sprintf(post_engr_text,
  1570. X!                    "The bugs on the %s speed up!",
  1571. X!                    surface(u.ux, u.uy));
  1572. X!             }
  1573. X              break;
  1574. X              case WAN_POLYMORPH:
  1575. X              if(oep)  {
  1576. X***************
  1577. X*** 472,494 ****
  1578. X              /* RAY wands */
  1579. X              case WAN_MAGIC_MISSILE:
  1580. X              ptext = TRUE;
  1581. X!             if (!Blind)
  1582. X!                 post_engr_text =
  1583. X!                 "The ground is riddled by bullet holes!";
  1584. X              break;
  1585. X  
  1586. X              /* can't tell sleep from death - Eric Backus */
  1587. X              case WAN_SLEEP:
  1588. X              case WAN_DEATH:
  1589. X!             if (!Blind)
  1590. X!                 post_engr_text =
  1591. X!                 "The bugs on the ground stop moving!";
  1592. X              break;
  1593. X  
  1594. X              case WAN_COLD:
  1595. X              if (!Blind)
  1596. X!                 post_engr_text =
  1597. X!                 "A few ice cubes drop from the wand.";
  1598. X              if(!oep || (oep->engr_type != BURN))
  1599. X                  break;
  1600. X              case WAN_CANCELLATION:
  1601. X--- 516,542 ----
  1602. X              /* RAY wands */
  1603. X              case WAN_MAGIC_MISSILE:
  1604. X              ptext = TRUE;
  1605. X!             if (!Blind) {
  1606. X!                Sprintf(post_engr_text,
  1607. X!                    "The %s is riddled by bullet holes!",
  1608. X!                    surface(u.ux, u.uy));
  1609. X!             }
  1610. X              break;
  1611. X  
  1612. X              /* can't tell sleep from death - Eric Backus */
  1613. X              case WAN_SLEEP:
  1614. X              case WAN_DEATH:
  1615. X!             if (!Blind) {
  1616. X!                Sprintf(post_engr_text,
  1617. X!                    "The bugs on the %s stop moving!",
  1618. X!                    surface(u.ux, u.uy));
  1619. X!             }
  1620. X              break;
  1621. X  
  1622. X              case WAN_COLD:
  1623. X              if (!Blind)
  1624. X!                 Strcpy(post_engr_text,
  1625. X!                 "A few ice cubes drop from the wand.");
  1626. X              if(!oep || (oep->engr_type != BURN))
  1627. X                  break;
  1628. X              case WAN_CANCELLATION:
  1629. X***************
  1630. X*** 495,501 ****
  1631. X              case WAN_MAKE_INVISIBLE:
  1632. X              if(oep) {
  1633. X                  if (!Blind)
  1634. X!                 pline("The engraving on the floor vanishes!");
  1635. X                  dengr = TRUE;
  1636. X              }
  1637. X              break;
  1638. X--- 543,550 ----
  1639. X              case WAN_MAKE_INVISIBLE:
  1640. X              if(oep) {
  1641. X                  if (!Blind)
  1642. X!                 pline("The engraving on the %s vanishes!",
  1643. X!                     surface(u.ux,u.uy));
  1644. X                  dengr = TRUE;
  1645. X              }
  1646. X              break;
  1647. X***************
  1648. X*** 502,508 ****
  1649. X              case WAN_TELEPORTATION:
  1650. X              if (oep) {
  1651. X                  if (!Blind)
  1652. X!                 pline("The engraving on the floor vanishes!");
  1653. X                  teleengr = TRUE;
  1654. X              }
  1655. X              break;
  1656. X--- 551,558 ----
  1657. X              case WAN_TELEPORTATION:
  1658. X              if (oep) {
  1659. X                  if (!Blind)
  1660. X!                 pline("The engraving on the %s vanishes!",
  1661. X!                     surface(u.ux,u.uy));
  1662. X                  teleengr = TRUE;
  1663. X              }
  1664. X              break;
  1665. X***************
  1666. X*** 518,526 ****
  1667. X                  doknown = TRUE;
  1668. X              }
  1669. X              if (!Blind)
  1670. X!                 post_engr_text = "Gravel flies up from the floor.";
  1671. X              else
  1672. X!                 post_engr_text = "You hear drilling!";
  1673. X              break;
  1674. X  
  1675. X              /* type = BURN wands */
  1676. X--- 568,579 ----
  1677. X                  doknown = TRUE;
  1678. X              }
  1679. X              if (!Blind)
  1680. X!                 Strcpy(post_engr_text,
  1681. X!                 is_ice(u.ux,u.uy) ? 
  1682. X!                 "Ice chips fly up from the ice surface!" :
  1683. X!                     "Gravel flies up from the floor.");
  1684. X              else
  1685. X!                 Strcpy(post_engr_text, "You hear drilling!");
  1686. X              break;
  1687. X  
  1688. X              /* type = BURN wands */
  1689. X***************
  1690. X*** 532,541 ****
  1691. X                  pline("This %s is a wand of fire!", xname(otmp));
  1692. X                  doknown = TRUE;
  1693. X              }
  1694. X!             if (!Blind)
  1695. X!                 post_engr_text = "Flames fly from the wand.";
  1696. X!             else
  1697. X!                 post_engr_text = "You feel the wand heat up.";
  1698. X              break;
  1699. X              case WAN_LIGHTNING:
  1700. X              ptext = TRUE;
  1701. X--- 585,593 ----
  1702. X                  pline("This %s is a wand of fire!", xname(otmp));
  1703. X                  doknown = TRUE;
  1704. X              }
  1705. X!             Strcpy(post_engr_text,
  1706. X!                 Blind ? "You feel the wand heat up." :
  1707. X!                     "Flames fly from the wand.");
  1708. X              break;
  1709. X              case WAN_LIGHTNING:
  1710. X              ptext = TRUE;
  1711. X***************
  1712. X*** 547,556 ****
  1713. X                  doknown = TRUE;
  1714. X              }
  1715. X              if (!Blind) {
  1716. X!                 post_engr_text = "Lightning arcs from the wand.";
  1717. X                  doblind = TRUE;
  1718. X              } else
  1719. X!                 post_engr_text = "You hear crackling!";
  1720. X              break;
  1721. X  
  1722. X              /* type = MARK wands */
  1723. X--- 599,609 ----
  1724. X                  doknown = TRUE;
  1725. X              }
  1726. X              if (!Blind) {
  1727. X!                 Strcpy(post_engr_text,
  1728. X!                     "Lightning arcs from the wand.");
  1729. X                  doblind = TRUE;
  1730. X              } else
  1731. X!                 Strcpy(post_engr_text, "You hear crackling!");
  1732. X              break;
  1733. X  
  1734. X              /* type = MARK wands */
  1735. X***************
  1736. X*** 558,564 ****
  1737. X              }
  1738. X          } else /* end if zappable */
  1739. X              if (Levitation) {
  1740. X!             You("can't reach the floor!");
  1741. X              return(0);
  1742. X              }
  1743. X          break;
  1744. X--- 611,617 ----
  1745. X              }
  1746. X          } else /* end if zappable */
  1747. X              if (Levitation) {
  1748. X!             You("can't reach the %s!", surface(u.ux,u.uy));
  1749. X              return(0);
  1750. X              }
  1751. X          break;
  1752. X***************
  1753. X*** 656,662 ****
  1754. X      if (zapwand && (otmp->spe < 0)) {
  1755. X          pline("%s %sturns to dust.",
  1756. X            The(xname(otmp)), Blind ? "" : "glows violently, then ");
  1757. X! You("are not going to get anywhere trying to write in the dust with your dust.");
  1758. X          useup(otmp);
  1759. X          ptext = FALSE;
  1760. X      }
  1761. X--- 709,716 ----
  1762. X      if (zapwand && (otmp->spe < 0)) {
  1763. X          pline("%s %sturns to dust.",
  1764. X            The(xname(otmp)), Blind ? "" : "glows violently, then ");
  1765. X!  You("are not going to get anywhere trying to write in the %s with your dust.",
  1766. X!         is_ice(u.ux,u.uy) ? "frost" : "dust");
  1767. X          useup(otmp);
  1768. X          ptext = FALSE;
  1769. X      }
  1770. X***************
  1771. X*** 663,669 ****
  1772. X  
  1773. X      if (!ptext) {        /* Early exit for some implements. */
  1774. X          if (Levitation && (otmp->oclass == WAND_CLASS))
  1775. X!         You("can't reach the floor!");
  1776. X          return(1);
  1777. X      }
  1778. X  
  1779. X--- 717,723 ----
  1780. X  
  1781. X      if (!ptext) {        /* Early exit for some implements. */
  1782. X          if (Levitation && (otmp->oclass == WAND_CLASS))
  1783. X!         You("can't reach the %s!", surface(u.ux,u.uy));
  1784. X          return(1);
  1785. X      }
  1786. X  
  1787. X***************
  1788. X*** 703,711 ****
  1789. X          } else
  1790. X              if ( (type == DUST) || (type == MARK) || (type == BLOOD) ) {
  1791. X              You(
  1792. X!                "cannot wipe out the message that is %s the floor here.",
  1793. X!                     (oep->engr_type == BURN) ? "burned into" :
  1794. X!                 "engraved in");
  1795. X              return(1);
  1796. X              } else
  1797. X              if ( (type != oep->engr_type) || (c == 'n') ) {
  1798. X--- 757,766 ----
  1799. X          } else
  1800. X              if ( (type == DUST) || (type == MARK) || (type == BLOOD) ) {
  1801. X              You(
  1802. X!              "cannot wipe out the message that is %s the %s here.",
  1803. X!              oep->engr_type == BURN ? 
  1804. X!                (is_ice(u.ux,u.uy) ? "melted into" : "burned into") :
  1805. X!                "engraved in", surface(u.ux,u.uy));
  1806. X              return(1);
  1807. X              } else
  1808. X              if ( (type != oep->engr_type) || (c == 'n') ) {
  1809. X***************
  1810. X*** 715,762 ****
  1811. X              }
  1812. X      }
  1813. X  
  1814. X      switch(type){
  1815. X          default:
  1816. X          everb = (oep && !eow ? "add to the weird writing on" :
  1817. X                         "write strangely on");
  1818. X-         eloc  = "the floor";
  1819. X          break;
  1820. X          case DUST:
  1821. X          everb = (oep && !eow ? "add to the writing in" :
  1822. X                         "write in");
  1823. X!         eloc = "the dust";
  1824. X          break;
  1825. X          case ENGRAVE:
  1826. X          everb = (oep && !eow ? "add to the engraving in" :
  1827. X                         "engrave in");
  1828. X-         eloc = "the floor";
  1829. X          break;
  1830. X          case BURN:
  1831. X!         everb = (oep && !eow ? "add to the text burned into" :
  1832. X!                        "burn into");
  1833. X!         eloc = "the floor";
  1834. X          break;
  1835. X          case MARK:
  1836. X          everb = (oep && !eow ? "add to the graffiti on" :
  1837. X                         "scribble on");
  1838. X-         eloc = "the floor";
  1839. X          break;
  1840. X          case BLOOD:
  1841. X          everb = (oep && !eow ? "add to the scrawl on" :
  1842. X                         "scrawl on");
  1843. X-         eloc = "the floor";
  1844. X          break;
  1845. X      }
  1846. X  
  1847. X      /* Tell adventurer what is going on */
  1848. X      if (otmp != &zeroobj)
  1849. X!         You("%s %s with %s.", everb, eloc, doname(otmp));
  1850. X      else
  1851. X!         You("%s %s with your %s.", everb, eloc,
  1852. X          makeplural(body_part(FINGER)));
  1853. X  
  1854. X      /* Prompt for engraving! */
  1855. X!     Sprintf(qbuf,"What do you want to %s %s here?", everb, eloc);
  1856. X      getlin(qbuf, ebuf);
  1857. X  
  1858. X      /* Mix up engraving if surface or state of mind is unsound.  */
  1859. X--- 770,815 ----
  1860. X              }
  1861. X      }
  1862. X  
  1863. X+     eloc = surface(u.ux,u.uy);
  1864. X      switch(type){
  1865. X          default:
  1866. X          everb = (oep && !eow ? "add to the weird writing on" :
  1867. X                         "write strangely on");
  1868. X          break;
  1869. X          case DUST:
  1870. X          everb = (oep && !eow ? "add to the writing in" :
  1871. X                         "write in");
  1872. X!         eloc = is_ice(u.ux,u.uy) ? "frost" : "dust";
  1873. X          break;
  1874. X          case ENGRAVE:
  1875. X          everb = (oep && !eow ? "add to the engraving in" :
  1876. X                         "engrave in");
  1877. X          break;
  1878. X          case BURN:
  1879. X!         everb = (oep && !eow ? 
  1880. X!             ( is_ice(u.ux,u.uy) ? "add to the text melted into" :
  1881. X!                                   "add to the text burned into") :
  1882. X!             ( is_ice(u.ux,u.uy) ? "melt into" : "burn into"));
  1883. X          break;
  1884. X          case MARK:
  1885. X          everb = (oep && !eow ? "add to the graffiti on" :
  1886. X                         "scribble on");
  1887. X          break;
  1888. X          case BLOOD:
  1889. X          everb = (oep && !eow ? "add to the scrawl on" :
  1890. X                         "scrawl on");
  1891. X          break;
  1892. X      }
  1893. X  
  1894. X      /* Tell adventurer what is going on */
  1895. X      if (otmp != &zeroobj)
  1896. X!         You("%s the %s with %s.", everb, eloc, doname(otmp));
  1897. X      else
  1898. X!         You("%s the %s with your %s.", everb, eloc,
  1899. X          makeplural(body_part(FINGER)));
  1900. X  
  1901. X      /* Prompt for engraving! */
  1902. X!     Sprintf(qbuf,"What do you want to %s the %s here?", everb, eloc);
  1903. X      getlin(qbuf, ebuf);
  1904. X  
  1905. X      /* Mix up engraving if surface or state of mind is unsound.  */
  1906. X***************
  1907. X*** 831,837 ****
  1908. X          case BURN:
  1909. X          multi = -(len/10);
  1910. X          if (multi)
  1911. X!             nomovemsg =
  1912. X              "You finish burning your message into the floor.";
  1913. X          break;
  1914. X          case MARK:
  1915. X--- 884,891 ----
  1916. X          case BURN:
  1917. X          multi = -(len/10);
  1918. X          if (multi)
  1919. X!             nomovemsg = is_ice(u.ux,u.uy) ?
  1920. X!             "You finish melting your message into the ice.":
  1921. X              "You finish burning your message into the floor.";
  1922. X          break;
  1923. X          case MARK:
  1924. X***************
  1925. X*** 873,879 ****
  1926. X  
  1927. X      make_engr_at(u.ux, u.uy, buf, (moves - multi), type);
  1928. X  
  1929. X!     if (post_engr_text) pline(post_engr_text);
  1930. X  
  1931. X      if (doblind) {
  1932. X          You("are blinded by the flash!");
  1933. X--- 927,933 ----
  1934. X  
  1935. X      make_engr_at(u.ux, u.uy, buf, (moves - multi), type);
  1936. X  
  1937. X!     if (post_engr_text[0]) pline(post_engr_text);
  1938. X  
  1939. X      if (doblind) {
  1940. X          You("are blinded by the flash!");
  1941. X***************
  1942. X*** 914,920 ****
  1943. X  }
  1944. X  
  1945. X  void
  1946. X! rest_engravings(fd) int fd; {
  1947. X  register struct engr *ep;
  1948. X  unsigned lth;
  1949. X      head_engr = 0;
  1950. X--- 968,976 ----
  1951. X  }
  1952. X  
  1953. X  void
  1954. X! rest_engravings(fd)
  1955. X! int fd;
  1956. X! {
  1957. X  register struct engr *ep;
  1958. X  unsigned lth;
  1959. X      head_engr = 0;
  1960. X***************
  1961. X*** 934,953 ****
  1962. X  }
  1963. X  
  1964. X  STATIC_OVL void
  1965. X! del_engr(ep) register struct engr *ep; {
  1966. X! register struct engr *ept;
  1967. X!     if(ep == head_engr)
  1968. X          head_engr = ep->nxt_engr;
  1969. X!     else {
  1970. X!         for(ept = head_engr; ept; ept = ept->nxt_engr) {
  1971. X!             if(ept->nxt_engr == ep) {
  1972. X!                 ept->nxt_engr = ep->nxt_engr;
  1973. X!                 goto fnd;
  1974. X!             }
  1975. X          }
  1976. X-         impossible("Error in del_engr?");
  1977. X-         return;
  1978. X-     fnd:    ;
  1979. X      }
  1980. X      dealloc_engr(ep);
  1981. X  }
  1982. X--- 990,1012 ----
  1983. X  }
  1984. X  
  1985. X  STATIC_OVL void
  1986. X! del_engr(ep)
  1987. X! register struct engr *ep;
  1988. X! {
  1989. X!     if (ep == head_engr) {
  1990. X          head_engr = ep->nxt_engr;
  1991. X!     } else {
  1992. X!         register struct engr *ept;
  1993. X! 
  1994. X!         for (ept = head_engr; ept; ept = ept->nxt_engr)
  1995. X!             if (ept->nxt_engr == ep) {
  1996. X!             ept->nxt_engr = ep->nxt_engr;
  1997. X!             break;
  1998. X!             }
  1999. X!         if (!ept) {
  2000. X!             impossible("Error in del_engr?");
  2001. X!             return;
  2002. X          }
  2003. X      }
  2004. X      dealloc_engr(ep);
  2005. X  }
  2006. END_OF_FILE
  2007. if test 53667 -ne `wc -c <'patches02c'`; then
  2008.     echo shar: \"'patches02c'\" unpacked with wrong size!
  2009. fi
  2010. # end of 'patches02c'
  2011. if test -f 'sys/amiga/winproto.h' -a "${1}" != "-c" ; then 
  2012.   echo shar: Renaming existing file \"'sys/amiga/winproto.h'\" to \"'sys/amiga/winproto.h.orig'\"
  2013.   mv -f 'sys/amiga/winproto.h' 'sys/amiga/winproto.h.orig'
  2014. fi
  2015. echo shar: Extracting \"'sys/amiga/winproto.h'\" \(4469 characters\)
  2016. sed "s/^X//" >'sys/amiga/winproto.h' <<'END_OF_FILE'
  2017. X/*    SCCS Id: @(#)winproto.h    3.1    93/04/26    */
  2018. X/* Copyright (c) Gregg Wonderly, Naperville, Illinois,  1991,1992,1993. */
  2019. X/* NetHack may be freely redistributed.  See license for details. */
  2020. X
  2021. X/* winreq.c */
  2022. Xvoid EditColor ( void );
  2023. Xvoid DrawCol ( struct Window *w , int idx , UWORD *colors );
  2024. Xvoid DispCol ( struct Window *w , int idx , UWORD *colors );
  2025. Xvoid amii_change_color( int, long, int );
  2026. Xchar *amii_get_color_string( );
  2027. Xvoid amii_setpens ( void );
  2028. Xvoid amii_getlin ( const char *prompt , char *bufp );
  2029. Xvoid getlind ( const char *prompt , char *bufp , const char *dflt );
  2030. Xchar *amii_get_color_string( void );
  2031. X
  2032. X/* winstr.c */
  2033. Xvoid amii_putstr ( winid window , int attr , const char *str );
  2034. Xvoid outmore ( struct amii_WinDesc *cw );
  2035. Xvoid outsubstr ( struct amii_WinDesc *cw , char *str , int len );
  2036. Xvoid amii_putsym ( winid st , int i , int y , CHAR_P c );
  2037. Xvoid amii_addtopl ( const char *s );
  2038. Xvoid TextSpaces ( struct RastPort *rp , int nr );
  2039. Xvoid amii_remember_topl ( void );
  2040. Xint amii_doprev_message ( void );
  2041. Xvoid flushIDCMP( struct MsgPort * );
  2042. X
  2043. X/* winkey.c */
  2044. Xint amii_nh_poskey ( int *x , int *y , int *mod );
  2045. Xint amii_nhgetch ( void );
  2046. Xvoid amii_get_nh_event ( void );
  2047. Xvoid amii_getret ( void );
  2048. X
  2049. X/* winmenu.c */
  2050. Xvoid amii_start_menu ( winid window );
  2051. Xvoid amii_add_menu ( winid window , char ch , int attr , const char *str );
  2052. Xvoid amii_end_menu ( winid window , char cancel , const char *str , const char *morestr );
  2053. Xchar amii_select_menu ( winid window );
  2054. Xvoid DoMenuScroll ( int win , int blocking );
  2055. Xint ReDisplayData ( winid win );
  2056. Xvoid DisplayData ( winid win , int start , int where );
  2057. Xvoid SetPropInfo ( struct Window *win , struct Gadget *gad , long vis , long total , long top );
  2058. X
  2059. X/* amiwind.c */
  2060. Xstruct Window *OpenShWindow ( struct NewWindow *nw );
  2061. Xvoid CloseShWindow ( struct Window *win );
  2062. Xint ConvertKey ( struct IntuiMessage *message );
  2063. Xint kbhit ( void );
  2064. Xint kbhit ( void );
  2065. Xint amikbhit ( void );
  2066. Xint WindowGetchar ( void );
  2067. XWETYPE WindowGetevent ( void );
  2068. Xvoid amii_cleanup ( void );
  2069. X#ifndef    SHAREDLIB
  2070. Xvoid Abort ( long rc );
  2071. X#endif
  2072. Xvoid CleanUp ( void );
  2073. Xvoid flush_glyph_buffer ( struct Window *w );
  2074. Xvoid amiga_print_glyph ( winid window , int color_index , int glyph );
  2075. Xvoid start_glyphout ( winid window );
  2076. Xvoid amii_end_glyphout ( winid window );
  2077. Xstruct NewWindow *DupNewWindow ( struct NewWindow *win );
  2078. Xvoid FreeNewWindow ( struct NewWindow *win );
  2079. Xvoid bell ( void );
  2080. Xvoid amii_delay_output ( void );
  2081. Xvoid amii_number_pad ( int state );
  2082. X#ifndef    SHAREDLIB
  2083. Xvoid amiv_loadlib ( void );
  2084. Xvoid amii_loadlib ( void );
  2085. X#endif
  2086. Xvoid preserve_icon( void );
  2087. Xvoid clear_icon( void );
  2088. X
  2089. X/* winfuncs.c */
  2090. Xvoid amii_destroy_nhwindow ( winid win );
  2091. Xint amii_create_nhwindow ( int type );
  2092. Xvoid amii_init_nhwindows ( void );
  2093. Xvoid amii_clear_nhwindow ( winid win );
  2094. Xvoid dismiss_nhwindow ( winid win );
  2095. Xvoid amii_exit_nhwindows ( const char *str );
  2096. Xvoid amii_display_nhwindow ( winid win , boolean blocking );
  2097. Xvoid amii_curs ( winid window , int x , int y );
  2098. Xvoid kill_nhwindows ( int all );
  2099. Xvoid amii_cl_end ( struct amii_WinDesc *cw , int i );
  2100. Xvoid cursor_off ( winid window );
  2101. Xvoid cursor_on ( winid window );
  2102. Xvoid amii_suspend_nhwindows ( char *str );
  2103. Xvoid amii_resume_nhwindows ( void );
  2104. Xvoid amii_bell ( void );
  2105. Xvoid removetopl ( int cnt );
  2106. Xvoid port_help ( void );
  2107. Xvoid amii_print_glyph ( winid win , xchar x , xchar y , int glyph );
  2108. Xvoid amii_raw_print ( const char *s );
  2109. Xvoid amii_raw_print_bold ( const char *s );
  2110. Xvoid amii_update_inventory ( void );
  2111. Xvoid amii_mark_synch ( void );
  2112. Xvoid amii_wait_synch ( void );
  2113. Xvoid amii_setclipped ( void );
  2114. Xvoid amii_cliparound ( int x , int y );
  2115. Xvoid amii_set_text_font( char *font, int size );
  2116. X
  2117. X/* winami.c */
  2118. X#ifdef    SHAREDLIB
  2119. Xint __UserLibInit ( void );
  2120. Xvoid __UserLibCleanup ( void );
  2121. X#endif
  2122. Xvoid amii_askname ( void );
  2123. Xvoid amii_player_selection ( void );
  2124. Xvoid RandomWindow ( char *name );
  2125. Xvoid amii_get_ext_cmd ( char *bufp );
  2126. Xchar amii_yn_function ( const char *prompt , const char *resp , char def );
  2127. Xchar amii_yn_function ( const char *query , const char *resp , char def );
  2128. Xvoid amii_display_file ( const char *fn , boolean complain );
  2129. Xvoid SetBorder ( struct Gadget *gd );
  2130. Xvoid *malloc ( register unsigned size );
  2131. Xvoid free ( void *q );
  2132. X
  2133. X#ifdef    SHAREDLIB
  2134. X/* amilib.c */
  2135. Xvoid amii_loadlib ( void );
  2136. Xvoid amiv_loadlib ( void );
  2137. Xvoid CleanUp ( void );
  2138. Xvoid setup_librefs ( WinamiBASE *base );
  2139. Xvoid Abort ( long rc );
  2140. X#endif
  2141. X
  2142. X/* amiga:amirip.c */
  2143. Xvoid FDECL(amii_outrip, ( winid tmpwin, int how ));
  2144. END_OF_FILE
  2145. if test 4469 -ne `wc -c <'sys/amiga/winproto.h'`; then
  2146.     echo shar: \"'sys/amiga/winproto.h'\" unpacked with wrong size!
  2147. fi
  2148. # end of 'sys/amiga/winproto.h'
  2149. echo shar: End of archive 18 \(of 33\).
  2150. cp /dev/null ark18isdone
  2151. MISSING=""
  2152. 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
  2153.     if test ! -f ark${I}isdone ; then
  2154.     MISSING="${MISSING} ${I}"
  2155.     fi
  2156. done
  2157. if test "${MISSING}" = "" ; then
  2158.     echo You have unpacked all 33 archives.
  2159.     echo "Now execute ./patchit.sh"
  2160.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2161. else
  2162.     echo You still need to unpack the following archives:
  2163.     echo "        " ${MISSING}
  2164. fi
  2165. ##  End of shell archive.
  2166. exit 0
  2167.