home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / games / volume16 / nethck31 / patch2h < prev    next >
Encoding:
Internet Message Format  |  1993-06-15  |  61.8 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: v17i083:  nethack31 - display oriented dungeons & dragons (Ver. 3.1), Patch2h/33
  5. Date: 11 Jun 1993 00:08:23 GMT
  6. Organization: Tektronix, Inc, Redmond, OR, USA
  7. Lines: 2159
  8. Approved: billr@saab.CNA.TEK.COM
  9. Message-ID: <1v8idn$is3@ying.cna.tek.com>
  10. NNTP-Posting-Host: saab.cna.tek.com
  11. Xref: uunet comp.sources.games:1771
  12.  
  13. Submitted-by: izchak@linc.cis.upenn.edu (Izchak Miller)
  14. Posting-number: Volume 17, Issue 83
  15. Archive-name: nethack31/Patch2h
  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 8 (of 33)."
  28. # Contents:  patches02a sys/amiga/amitty.c sys/amiga/randwin.uu
  29. # Wrapped by billr@saab on Thu Jun 10 16:55:01 1993
  30. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  31. if test -f 'patches02a' -a "${1}" != "-c" ; then 
  32.   echo shar: Renaming existing file \"'patches02a'\" to \"'patches02a.orig'\"
  33.   mv -f 'patches02a' 'patches02a.orig'
  34. fi
  35. echo shar: Extracting \"'patches02a'\" \(55493 characters\)
  36. sed "s/^X//" >'patches02a' <<'END_OF_FILE'
  37. X*** /tmp/da10778    Tue Jun  1 16:12:30 1993
  38. X--- src/allmain.c    Fri May 28 11:40:21 1993
  39. X***************
  40. X*** 1,4 ****
  41. X! /*    SCCS Id: @(#)allmain.c    3.1    92/11/13    */
  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: @(#)allmain.c    3.1    93/05/23    */
  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*** 95,100 ****
  52. X--- 95,108 ----
  53. X              ++moves;
  54. X              if (u.ublesscnt)  u.ublesscnt--;
  55. X              if(flags.time) flags.botl = 1;
  56. X+             /* One possible result of prayer is healing.  Whether or
  57. X+              * not you get healed depends on your current hit points.
  58. X+              * If you are allowed to regenerate during the prayer, the
  59. X+              * end-of-prayer calculation messes up on this.
  60. X+              */
  61. X+             if (u.uinvulnerable)
  62. X+             ;
  63. X+             else
  64. X  #ifdef POLYSELF
  65. X              if (u.mtimedone && u.mh < u.mhmax) {
  66. X              if (u.mh < 1) {
  67. X***************
  68. X*** 355,361 ****
  69. X       * have to split display_gamewindows into create_gamewindows
  70. X       * and show_gamewindows to get rid of this ifdef...
  71. X       */
  72. X!     SanePositions ( ) ;
  73. X  #endif
  74. X  
  75. X      /*
  76. X--- 363,371 ----
  77. X       * have to split display_gamewindows into create_gamewindows
  78. X       * and show_gamewindows to get rid of this ifdef...
  79. X       */
  80. X!     if ( ! strcmp ( windowprocs . name , "mac" ) ) {
  81. X!         SanePositions ( ) ;
  82. X!     }
  83. X  #endif
  84. X  
  85. X      /*
  86. X***************
  87. X*** 375,388 ****
  88. X      gameDiskPrompt();
  89. X  #endif
  90. X  
  91. X!     fobj = invent = migrating_objs = (struct obj *)0;
  92. X      fmon = migrating_mons = (struct monst *)0;
  93. X      ftrap = 0;
  94. X      flags.ident = 1;
  95. X  
  96. X      if(wiz1_level.dlevel == 0) init_dungeons();
  97. X!     init_objects();
  98. X      u_init();
  99. X  
  100. X  #ifndef NO_SIGNAL
  101. X      (void) signal(SIGINT, (SIG_RET_TYPE) done1);
  102. X--- 385,399 ----
  103. X      gameDiskPrompt();
  104. X  #endif
  105. X  
  106. X!     fobj = invent = level.buriedobjlist = migrating_objs = (struct obj *)0;
  107. X      fmon = migrating_mons = (struct monst *)0;
  108. X      ftrap = 0;
  109. X      flags.ident = 1;
  110. X  
  111. X      if(wiz1_level.dlevel == 0) init_dungeons();
  112. X!     init_objects();        /* must be before u_init() */
  113. X      u_init();
  114. X+     init_artifacts();    /* must be after u_init() */
  115. X  
  116. X  #ifndef NO_SIGNAL
  117. X      (void) signal(SIGINT, (SIG_RET_TYPE) done1);
  118. X*** /tmp/da10794    Tue Jun  1 16:12:34 1993
  119. X--- src/apply.c    Wed May 26 12:59:26 1993
  120. X***************
  121. X*** 1,4 ****
  122. X! /*    SCCS Id: @(#)apply.c    3.1    93/02/19          */
  123. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  124. X  /* NetHack may be freely redistributed.  See license for details. */
  125. X  
  126. X--- 1,4 ----
  127. X! /*    SCCS Id: @(#)apply.c    3.1    93/05/25    */
  128. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  129. X  /* NetHack may be freely redistributed.  See license for details. */
  130. X  
  131. X***************
  132. X*** 38,43 ****
  133. X--- 38,44 ----
  134. X  static boolean NDECL(rm_waslit);
  135. X  static void FDECL(mkcavepos, (XCHAR_P,XCHAR_P,int,BOOLEAN_P,BOOLEAN_P));
  136. X  static void FDECL(mkcavearea, (BOOLEAN_P));
  137. X+ static void FDECL(digactualhole, (int));
  138. X  
  139. X  #ifdef TOURIST
  140. X  static int
  141. X***************
  142. X*** 57,63 ****
  143. X      } else if(obj->cursed && !rn2(2)) goto blindu;
  144. X      else if(u.dz) {
  145. X          You("take a picture of the %s.",
  146. X!             (u.dz > 0) ? "floor" : "ceiling");
  147. X      } else if(!u.dx && !u.dy) {
  148. X  blindu:
  149. X          if(!Blind) {
  150. X--- 58,64 ----
  151. X      } else if(obj->cursed && !rn2(2)) goto blindu;
  152. X      else if(u.dz) {
  153. X          You("take a picture of the %s.",
  154. X!             (u.dz > 0) ? surface(u.ux,u.uy) : "ceiling");
  155. X      } else if(!u.dx && !u.dy) {
  156. X  blindu:
  157. X          if(!Blind) {
  158. X***************
  159. X*** 64,71 ****
  160. X              You("are blinded by the flash!");
  161. X              make_blinded((long)rnd(25),FALSE);
  162. X          }
  163. X!     } else if(mtmp = bhit(u.dx,u.dy,COLNO,FLASHED_LIGHT,
  164. X!                         (int(*)())0,(int(*)())0,obj)) {
  165. X          if(mtmp->msleep) {
  166. X              mtmp->msleep = 0;
  167. X              if(cansee(mtmp->mx,mtmp->my))
  168. X--- 65,72 ----
  169. X              You("are blinded by the flash!");
  170. X              make_blinded((long)rnd(25),FALSE);
  171. X          }
  172. X!     } else if ((mtmp = bhit(u.dx,u.dy,COLNO,FLASHED_LIGHT,
  173. X!                 (int(*)())0,(int(*)())0,obj)) != 0) {
  174. X          if(mtmp->msleep) {
  175. X              mtmp->msleep = 0;
  176. X              if(cansee(mtmp->mx,mtmp->my))
  177. X***************
  178. X*** 158,164 ****
  179. X          return 1;
  180. X      }
  181. X  
  182. X!     Your("%s and %s are already clean.", 
  183. X          body_part(FACE), makeplural(body_part(HAND)));
  184. X  
  185. X      return 0;
  186. X--- 159,165 ----
  187. X          return 1;
  188. X      }
  189. X  
  190. X!     Your("%s and %s are already clean.",
  191. X          body_part(FACE), makeplural(body_part(HAND)));
  192. X  
  193. X      return 0;
  194. X***************
  195. X*** 189,199 ****
  196. X          if (Underwater)
  197. X              You("hear faint splashing.");
  198. X          else if (u.dz < 0 || Levitation)
  199. X!             You("can't reach the %s.", u.dz<0 ? "ceiling" : "floor");
  200. X          else if (Is_stronghold(&u.uz))
  201. X              You("hear the crackling of hellfire.");
  202. X          else
  203. X!             pline("The floor seems healthy enough.");
  204. X          return;
  205. X      } else if (obj->cursed && !rn2(2)) {
  206. X          You("hear your heart beat.");
  207. X--- 190,201 ----
  208. X          if (Underwater)
  209. X              You("hear faint splashing.");
  210. X          else if (u.dz < 0 || Levitation)
  211. X!             You("can't reach the %s.",
  212. X!             (u.dz > 0) ? surface(u.ux,u.uy) : "ceiling");
  213. X          else if (Is_stronghold(&u.uz))
  214. X              You("hear the crackling of hellfire.");
  215. X          else
  216. X!             pline("The %s seems healthy enough.", surface(u.ux,u.uy));
  217. X          return;
  218. X      } else if (obj->cursed && !rn2(2)) {
  219. X          You("hear your heart beat.");
  220. X***************
  221. X*** 209,215 ****
  222. X          You("hear a faint typing noise.");
  223. X          return;
  224. X      }
  225. X!     if(mtmp = m_at(rx,ry)) {
  226. X          mstatusline(mtmp);
  227. X          if (mtmp->mundetected) {
  228. X              mtmp->mundetected = 0;
  229. X--- 211,217 ----
  230. X          You("hear a faint typing noise.");
  231. X          return;
  232. X      }
  233. X!     if ((mtmp = m_at(rx,ry)) != 0) {
  234. X          mstatusline(mtmp);
  235. X          if (mtmp->mundetected) {
  236. X              mtmp->mundetected = 0;
  237. X***************
  238. X*** 239,244 ****
  239. X--- 241,249 ----
  240. X  static void
  241. X  use_whistle(obj)
  242. X  struct obj *obj;
  243. X+ #if defined(applec)
  244. X+ # pragma unused(obj)
  245. X+ #endif
  246. X  {
  247. X      You(whistle_str, "high");
  248. X      wake_nearby();
  249. X***************
  250. X*** 287,293 ****
  251. X  }
  252. X  
  253. X  void
  254. X! o_unleash(otmp)     /* otmp is about to be destroyed or stolen */
  255. X  register struct obj *otmp;
  256. X  {
  257. X      register struct monst *mtmp;
  258. X--- 292,298 ----
  259. X  }
  260. X  
  261. X  void
  262. X! o_unleash(otmp)        /* otmp is about to be destroyed or stolen */
  263. X  register struct obj *otmp;
  264. X  {
  265. X      register struct monst *mtmp;
  266. X***************
  267. X*** 299,305 ****
  268. X  }
  269. X  
  270. X  void
  271. X! m_unleash(mtmp)     /* mtmp is about to die, or become untame */
  272. X  register struct monst *mtmp;
  273. X  {
  274. X      register struct obj *otmp;
  275. X--- 304,310 ----
  276. X  }
  277. X  
  278. X  void
  279. X! m_unleash(mtmp)        /* mtmp is about to die, or become untame */
  280. X  register struct monst *mtmp;
  281. X  {
  282. X      register struct obj *otmp;
  283. X***************
  284. X*** 422,428 ****
  285. X  #endif /* OVL1 */
  286. X  #ifdef OVLB
  287. X  struct obj *
  288. X! get_mleash(mtmp)     /* assuming mtmp->mleashed has been checked */
  289. X  register struct monst *mtmp;
  290. X  {
  291. X      register struct obj *otmp;
  292. X--- 427,433 ----
  293. X  #endif /* OVL1 */
  294. X  #ifdef OVLB
  295. X  struct obj *
  296. X! get_mleash(mtmp)    /* assuming mtmp->mleashed has been checked */
  297. X  register struct monst *mtmp;
  298. X  {
  299. X      register struct obj *otmp;
  300. X***************
  301. X*** 497,506 ****
  302. X  rm_waslit() {
  303. X      register xchar x, y;
  304. X  
  305. X!     if(levl[u.ux][u.uy].typ == ROOM && levl[u.ux][u.uy].waslit) 
  306. X!         return(TRUE);
  307. X      for(x = u.ux-2; x < u.ux+3; x++)
  308. X!         for(y = u.uy-1; y < u.uy+2; y++)
  309. X          if(isok(x,y) && levl[x][y].waslit) return(TRUE);
  310. X      return(FALSE);
  311. X  }
  312. X--- 502,511 ----
  313. X  rm_waslit() {
  314. X      register xchar x, y;
  315. X  
  316. X!     if(levl[u.ux][u.uy].typ == ROOM && levl[u.ux][u.uy].waslit)
  317. X!     return(TRUE);
  318. X      for(x = u.ux-2; x < u.ux+3; x++)
  319. X!     for(y = u.uy-1; y < u.uy+2; y++)
  320. X          if(isok(x,y) && levl[x][y].waslit) return(TRUE);
  321. X      return(FALSE);
  322. X  }
  323. X***************
  324. X*** 521,531 ****
  325. X      lev = &levl[x][y];
  326. X  
  327. X      if(rockit) {
  328. X!         register struct monst *mtmp;
  329. X  
  330. X!         if(IS_ROCK(lev->typ)) return;
  331. X      if(t_at(x, y)) return; /* don't cover the portal */
  332. X!     if(mtmp = m_at(x, y)) /* make sure crucial monsters survive */
  333. X          if(!passes_walls(mtmp->data)) rloc(mtmp);
  334. X      } else if(lev->typ == ROOM) return;
  335. X  
  336. X--- 526,536 ----
  337. X      lev = &levl[x][y];
  338. X  
  339. X      if(rockit) {
  340. X!     register struct monst *mtmp;
  341. X  
  342. X!     if(IS_ROCK(lev->typ)) return;
  343. X      if(t_at(x, y)) return; /* don't cover the portal */
  344. X!     if ((mtmp = m_at(x, y)) != 0)    /* make sure crucial monsters survive */
  345. X          if(!passes_walls(mtmp->data)) rloc(mtmp);
  346. X      } else if(lev->typ == ROOM) return;
  347. X  
  348. X***************
  349. X*** 586,592 ****
  350. X      }
  351. X  
  352. X      if(!rockit && levl[u.ux][u.uy].typ == CORR) {
  353. X!         levl[u.ux][u.uy].typ = ROOM;
  354. X      if(waslit) levl[u.ux][u.uy].waslit = TRUE;
  355. X      newsym(u.ux, u.uy); /* in case player is invisible */
  356. X      }
  357. X--- 591,597 ----
  358. X      }
  359. X  
  360. X      if(!rockit && levl[u.ux][u.uy].typ == CORR) {
  361. X!     levl[u.ux][u.uy].typ = ROOM;
  362. X      if(waslit) levl[u.ux][u.uy].waslit = TRUE;
  363. X      newsym(u.ux, u.uy); /* in case player is invisible */
  364. X      }
  365. X***************
  366. X*** 608,649 ****
  367. X          ((dig_down && (dpx != u.ux || dpy != u.uy)) ||
  368. X           (!dig_down && distu(dpx,dpy) > 2)))
  369. X          return(0);
  370. X      if (dig_down) {
  371. X!         if(On_stairs(u.ux, u.uy)) {
  372. X!         if(u.ux == xdnladder || u.ux == xupladder)
  373. X               pline("The ladder resists your effort.");
  374. X          else pline("The stairs are too hard to dig in.");
  375. X          return(0);
  376. X!         }
  377. X!         if(IS_THRONE(levl[u.ux][u.uy].typ)) {
  378. X          pline("The throne is too hard to break apart.");
  379. X          return (0);
  380. X!         }
  381. X!         if(IS_ALTAR(levl[u.ux][u.uy].typ)) {
  382. X          pline("The altar is too hard to break apart.");
  383. X          return (0);
  384. X!         }
  385. X!         if(t_at(dpx, dpy) && !Can_dig_down(&u.uz)) {
  386. X!         pline("The floor here is too hard to dig in.");
  387. X!         return(0);
  388. X!         }
  389. X!         if(sobj_at(BOULDER, dpx, dpy)) {
  390. X!         pline("There isn't enough room to dig here.");
  391. X!         return(0);
  392. X!         }
  393. X!         if(Is_airlevel(&u.uz)) {
  394. X          You("cannot dig in thin air.");
  395. X          return(0);
  396. X!         }
  397. X!         if(Is_waterlevel(&u.uz)) {
  398. X          pline("The water splashes and subsides.");
  399. X          return(0);
  400. X          }
  401. X!     } else /* !dig_down */
  402. X          if(IS_ROCK(lev->typ) && !may_dig(dpx,dpy)) {
  403. X          pline("This wall is too hard to dig into.");
  404. X          return(0);
  405. X          }
  406. X      if(Fumbling && !rn2(3)) {
  407. X          switch(rn2(3)) {
  408. X          case 0:  if(!welded(uwep)) {
  409. X--- 613,654 ----
  410. X          ((dig_down && (dpx != u.ux || dpy != u.uy)) ||
  411. X           (!dig_down && distu(dpx,dpy) > 2)))
  412. X          return(0);
  413. X+ 
  414. X      if (dig_down) {
  415. X!         struct trap *ttmp;
  416. X! 
  417. X!         if (On_stairs(u.ux, u.uy)) {
  418. X!         if (u.ux == xdnladder || u.ux == xupladder)
  419. X               pline("The ladder resists your effort.");
  420. X          else pline("The stairs are too hard to dig in.");
  421. X          return(0);
  422. X!         } else if (IS_THRONE(levl[u.ux][u.uy].typ)) {
  423. X          pline("The throne is too hard to break apart.");
  424. X          return (0);
  425. X!         } else if (IS_ALTAR(levl[u.ux][u.uy].typ)) {
  426. X          pline("The altar is too hard to break apart.");
  427. X          return (0);
  428. X!         } else if (Is_airlevel(&u.uz)) {
  429. X          You("cannot dig in thin air.");
  430. X          return(0);
  431. X!         } else if (Is_waterlevel(&u.uz)) {
  432. X          pline("The water splashes and subsides.");
  433. X          return(0);
  434. X+         } else if ((ttmp = t_at(dpx, dpy)) &&
  435. X+             (ttmp->ttyp == MAGIC_PORTAL || !Can_dig_down(&u.uz))) {
  436. X+         pline("The %s here is too hard to dig in.",
  437. X+             surface(dpx,dpy));
  438. X+         return(0);
  439. X+         } else if (sobj_at(BOULDER, dpx, dpy)) {
  440. X+         pline("There isn't enough room to dig here.");
  441. X+         return(0);
  442. X          }
  443. X!     } else { /* !dig_down */
  444. X          if(IS_ROCK(lev->typ) && !may_dig(dpx,dpy)) {
  445. X          pline("This wall is too hard to dig into.");
  446. X          return(0);
  447. X          }
  448. X+     }
  449. X      if(Fumbling && !rn2(3)) {
  450. X          switch(rn2(3)) {
  451. X          case 0:  if(!welded(uwep)) {
  452. X***************
  453. X*** 659,665 ****
  454. X          case 1:  pline("Bang!  You hit with the broad side of %s!",
  455. X                     the(xname(uwep)));
  456. X               break;
  457. X!         default: Your("swing misses its mark."); 
  458. X               break;
  459. X          }
  460. X          return(0);
  461. X--- 664,670 ----
  462. X          case 1:  pline("Bang!  You hit with the broad side of %s!",
  463. X                     the(xname(uwep)));
  464. X               break;
  465. X!         default: Your("swing misses its mark.");
  466. X               break;
  467. X          }
  468. X          return(0);
  469. X***************
  470. X*** 688,710 ****
  471. X              angry_priest();
  472. X          }
  473. X  
  474. X!         ttmp = maketrap(dpx,dpy,PIT);
  475. X!         ttmp->tseen = 1;
  476. X!         if(Invisible) newsym(ttmp->tx,ttmp->ty);
  477. X!         You("dig a pit.");
  478. X!         u.utrap = rn1(4,2);
  479. X!         u.utraptype = TT_PIT;
  480. X!         vision_full_recalc = 1;    /* vision limits change */
  481. X          dig_level.dnum = 0;
  482. X          dig_level.dlevel = -1;
  483. X          return(0);
  484. X!     } 
  485. X      if(dig_effort > 100) {
  486. X          register const char *digtxt, *dmgtxt = (const char*) 0;
  487. X          register struct obj *obj;
  488. X          register boolean shopedge = *in_rooms(dpx, dpy, SHOPBASE);
  489. X  
  490. X!         if(obj = sobj_at(STATUE, dpx, dpy)) {
  491. X              if (break_statue(obj))
  492. X                  digtxt = "The statue shatters.";
  493. X              else
  494. X--- 693,709 ----
  495. X              angry_priest();
  496. X          }
  497. X  
  498. X!         digactualhole(PIT);    /* at u.ux, u.uy */
  499. X          dig_level.dnum = 0;
  500. X          dig_level.dlevel = -1;
  501. X          return(0);
  502. X!     }
  503. X      if(dig_effort > 100) {
  504. X          register const char *digtxt, *dmgtxt = (const char*) 0;
  505. X          register struct obj *obj;
  506. X          register boolean shopedge = *in_rooms(dpx, dpy, SHOPBASE);
  507. X  
  508. X!         if ((obj = sobj_at(STATUE, dpx, dpy)) != 0) {
  509. X              if (break_statue(obj))
  510. X                  digtxt = "The statue shatters.";
  511. X              else
  512. X***************
  513. X*** 712,729 ****
  514. X                   * printed a message and updated the screen
  515. X                   */
  516. X                  digtxt = NULL;
  517. X!         } else if(obj = sobj_at(BOULDER, dpx, dpy)) {
  518. X              fracture_rock(obj);
  519. X              digtxt = "The boulder falls apart.";
  520. X          } else if(!lev->typ || lev->typ == SCORR) {
  521. X!                 if(Is_earthlevel(&u.uz)) {
  522. X                  if(uwep->blessed && !rn2(3)) {
  523. X!                     mkcavearea(FALSE);
  524. X                  goto cleanup;
  525. X!                 } else if((uwep->cursed && !rn2(4)) || 
  526. X!                           (!uwep->blessed && !rn2(6))) {
  527. X!                     mkcavearea(TRUE);
  528. X!                     goto cleanup;
  529. X                  }
  530. X              }
  531. X              lev->typ = CORR;
  532. X--- 711,728 ----
  533. X                   * printed a message and updated the screen
  534. X                   */
  535. X                  digtxt = NULL;
  536. X!         } else if ((obj = sobj_at(BOULDER, dpx, dpy)) != 0) {
  537. X              fracture_rock(obj);
  538. X              digtxt = "The boulder falls apart.";
  539. X          } else if(!lev->typ || lev->typ == SCORR) {
  540. X!             if(Is_earthlevel(&u.uz)) {
  541. X                  if(uwep->blessed && !rn2(3)) {
  542. X!                 mkcavearea(FALSE);
  543. X                  goto cleanup;
  544. X!                 } else if((uwep->cursed && !rn2(4)) ||
  545. X!                       (!uwep->blessed && !rn2(6))) {
  546. X!                 mkcavearea(TRUE);
  547. X!                 goto cleanup;
  548. X                  }
  549. X              }
  550. X              lev->typ = CORR;
  551. X***************
  552. X*** 730,741 ****
  553. X              digtxt = "You succeed in cutting away some rock.";
  554. X          } else if(IS_WALL(lev->typ)) {
  555. X              if(shopedge) {
  556. X!                     add_damage(dpx, dpy, 10L * ACURRSTR);
  557. X                  dmgtxt = "damage";
  558. X              }
  559. X!                 if (level.flags.is_maze_lev) {
  560. X                  lev->typ = ROOM;
  561. X!                 } else if (level.flags.is_cavernous_lev) {
  562. X                  lev->typ = CORR;
  563. X              } else {
  564. X                  lev->typ = DOOR;
  565. X--- 729,740 ----
  566. X              digtxt = "You succeed in cutting away some rock.";
  567. X          } else if(IS_WALL(lev->typ)) {
  568. X              if(shopedge) {
  569. X!                 add_damage(dpx, dpy, 10L * ACURRSTR);
  570. X                  dmgtxt = "damage";
  571. X              }
  572. X!             if (level.flags.is_maze_lev) {
  573. X                  lev->typ = ROOM;
  574. X!             } else if (level.flags.is_cavernous_lev) {
  575. X                  lev->typ = CORR;
  576. X              } else {
  577. X                  lev->typ = DOOR;
  578. X***************
  579. X*** 750,756 ****
  580. X          } else if(closed_door(dpx, dpy)) {
  581. X              digtxt = "You break through the door.";
  582. X              if(shopedge) {
  583. X!                     add_damage(dpx, dpy, 400L);
  584. X                  dmgtxt = "break";
  585. X              }
  586. X              if(!(lev->doormask & D_TRAPPED))
  587. X--- 749,755 ----
  588. X          } else if(closed_door(dpx, dpy)) {
  589. X              digtxt = "You break through the door.";
  590. X              if(shopedge) {
  591. X!                 add_damage(dpx, dpy, 400L);
  592. X                  dmgtxt = "break";
  593. X              }
  594. X              if(!(lev->doormask & D_TRAPPED))
  595. X***************
  596. X*** 770,787 ****
  597. X              register struct monst *mtmp;
  598. X  
  599. X              switch(rn2(2)) {
  600. X!               case 0: 
  601. X!                 mtmp = makemon(&mons[PM_EARTH_ELEMENTAL], dpx, dpy);
  602. X              break;
  603. X!               default: 
  604. X!             mtmp = makemon(&mons[PM_XORN], dpx, dpy); 
  605. X              break;
  606. X              }
  607. X              if(mtmp) pline("The debris from your digging comes to life!");
  608. X          }
  609. X          if(IS_DOOR(lev->typ) && (lev->doormask & D_TRAPPED)) {
  610. X-             b_trapped("door");
  611. X              lev->doormask = D_NODOOR;
  612. X              newsym(dpx, dpy);
  613. X          }
  614. X  cleanup:
  615. X--- 769,786 ----
  616. X              register struct monst *mtmp;
  617. X  
  618. X              switch(rn2(2)) {
  619. X!               case 0:
  620. X!             mtmp = makemon(&mons[PM_EARTH_ELEMENTAL], dpx, dpy);
  621. X              break;
  622. X!               default:
  623. X!             mtmp = makemon(&mons[PM_XORN], dpx, dpy);
  624. X              break;
  625. X              }
  626. X              if(mtmp) pline("The debris from your digging comes to life!");
  627. X          }
  628. X          if(IS_DOOR(lev->typ) && (lev->doormask & D_TRAPPED)) {
  629. X              lev->doormask = D_NODOOR;
  630. X+             b_trapped("door", 0);
  631. X              newsym(dpx, dpy);
  632. X          }
  633. X  cleanup:
  634. X***************
  635. X*** 823,831 ****
  636. X  int x, y;
  637. X  {
  638. X      register int x1, y1;
  639. X  
  640. X!     for(x1 = max(1,x-1); x1<=min(x+1,COLNO-1); x1++)
  641. X!     for(y1 = max(0,y-1); y1<=min(y+1,ROWNO-1); y1++)
  642. X          if(levl[x1][y1].typ == MOAT || levl[x1][y1].typ == LAVAPOOL)
  643. X          return levl[x1][y1].typ;
  644. X  
  645. X--- 822,832 ----
  646. X  int x, y;
  647. X  {
  648. X      register int x1, y1;
  649. X+     int lo_x = max(1,x-1), hi_x = min(x+1,COLNO-1),
  650. X+     lo_y = max(0,y-1), hi_y = min(y+1,ROWNO-1);
  651. X  
  652. X!     for (x1 = lo_x; x1 <= hi_x; x1++)
  653. X!     for (y1 = lo_y; y1 <= hi_y; y1++)
  654. X          if(levl[x1][y1].typ == MOAT || levl[x1][y1].typ == LAVAPOOL)
  655. X          return levl[x1][y1].typ;
  656. X  
  657. X***************
  658. X*** 832,1008 ****
  659. X      return ROOM;
  660. X  }
  661. X  
  662. X! void
  663. X! dighole()
  664. X  {
  665. X!     register struct trap *ttmp = t_at(u.ux, u.uy);
  666. X!     struct rm *lev = &levl[u.ux][u.uy];
  667. X!     struct obj *boulder_here;
  668. X!     boolean nohole = !Can_dig_down(&u.uz);
  669. X! 
  670. X!     if(ttmp && nohole) {
  671. X!         pline("The floor here is too hard to dig in.");
  672. X!     } else {
  673. X!         d_level    newlevel;
  674. X! 
  675. X!         if (is_pool(u.ux, u.uy) || is_lava(u.ux, u.uy)) {
  676. X!             pline(
  677. X!                "The %s sloshes furiously for a moment, then subsides.",
  678. X!               is_lava(u.ux, u.uy) ? "lava" : "water");
  679. X!             wake_nearby();    /* splashing */
  680. X!             return;
  681. X!         }
  682. X!         if (lev->typ == DRAWBRIDGE_DOWN) {
  683. X!             destroy_drawbridge(u.ux,u.uy);
  684. X!             return;
  685. X!         } else if (boulder_here = sobj_at(BOULDER, u.ux, u.uy)) {
  686. X!             if (ttmp && ((ttmp->ttyp == PIT) || 
  687. X!                       (ttmp->ttyp == SPIKED_PIT))) {
  688. X!                 pline("The boulder settles into the pit.");
  689. X!                 ttmp->ttyp = PIT;      /* crush spikes */
  690. X!             } else {
  691. X!                 /*
  692. X!                  * digging makes a hole, but the boulder
  693. X!                  * immediately fills it.  Final outcome:
  694. X!                  * no hole, no boulder.
  695. X!                  */
  696. X!                 pline("KADOOM! The boulder falls in!");
  697. X! 
  698. X!                 /* destroy traps that emanate from the floor */
  699. X!                 /* some of these are arbitrary -dlc */
  700. X!                 if (ttmp && ((ttmp->ttyp == SQKY_BOARD) ||
  701. X!                          (ttmp->ttyp == BEAR_TRAP) ||
  702. X!                          (ttmp->ttyp == LANDMINE) ||
  703. X!                          (ttmp->ttyp == FIRE_TRAP) ||
  704. X!                          (ttmp->ttyp == TRAPDOOR) ||
  705. X!                          (ttmp->ttyp == TELEP_TRAP) ||
  706. X!                          (ttmp->ttyp == LEVEL_TELEP) ||
  707. X!                          (ttmp->ttyp == WEB) ||
  708. X!                          (ttmp->ttyp == MAGIC_TRAP) ||
  709. X!                          (ttmp->ttyp == ANTI_MAGIC))) {
  710. X!                     deltrap(ttmp);
  711. X!                     u.utrap = 0;
  712. X!                     u.utraptype = 0;
  713. X!                 }
  714. X!             }
  715. X!             delobj(boulder_here);
  716. X!             return;
  717. X!         }
  718. X!         if (lev->typ == DRAWBRIDGE_UP) {
  719. X!             /* must be floor or ice, other cases handled above */
  720. X!             /* dig "pit" and let fluid flow in (if possible) */
  721. X!             schar typ = fillholetyp(u.ux,u.uy);
  722. X! 
  723. X!             if(typ == ROOM) {
  724. X!                 if(lev->drawbridgemask & DB_ICE)
  725. X!                 typ = MOAT;
  726. X!                 else {
  727. X!                 /*
  728. X!                  * We can't dig a pit here since that will
  729. X!                  * destroy the drawbridge.  The following is
  730. X!                  * a cop-out. --dlc
  731. X!                  */
  732. X!                 pline("The floor here is too hard to dig in.");
  733. X!                 return;
  734. X!                 }
  735. X!             }
  736. X! 
  737. X!                 lev->drawbridgemask &= DB_DIR;
  738. X!             if(typ == LAVAPOOL) lev->drawbridgemask |= DB_LAVA;
  739. X!             liquid_flow:
  740. X!             newsym(u.ux,u.uy);
  741. X! 
  742. X!             pline("As you dig a pit, it fills with %s!",
  743. X!                   typ == LAVAPOOL ? "lava" : "water");
  744. X!             if(!Levitation
  745. X  #ifdef POLYSELF
  746. X!                && !is_flyer(uasmon)
  747. X  #endif
  748. X-                             ) {
  749. X-                 if (typ == LAVAPOOL)
  750. X-                 (void) lava_effects();
  751. X-                 else if(!Wwalking)
  752. X-                 (void) drown();
  753. X-             }
  754. X-             return;
  755. X-         } else if (lev->typ == ICE) {
  756. X-             schar typ = fillholetyp(u.ux,u.uy);
  757. X  
  758. X!             if(typ == ROOM) {
  759. X!                 if(nohole) {
  760. X!                 /* can't make a trapdoor, so make a pit */
  761. X!                 ttmp = maketrap(u.ux, u.uy, PIT);
  762. X!                 } else
  763. X!                 ttmp = maketrap(u.ux, u.uy, TRAPDOOR);
  764. X!             } else {
  765. X!                 lev->typ = typ;
  766. X!                 goto liquid_flow;
  767. X!             }
  768. X!         } else if (IS_FOUNTAIN(lev->typ)) {
  769. X!             dogushforth(FALSE);
  770. X!             dryup(u.ux,u.uy);
  771. X!             return;
  772. X! #ifdef SINKS
  773. X!         } else if (IS_SINK(lev->typ)) {
  774. X!             breaksink(u.ux, u.uy);
  775. X!             return;
  776. X! #endif
  777. X!         /* the following two are here for the wand of digging */
  778. X!         } else if(IS_THRONE(levl[u.ux][u.uy].typ)) {
  779. X!             pline("The throne is too hard to break apart.");
  780. X!             return;
  781. X!         } else if(IS_ALTAR(levl[u.ux][u.uy].typ)) {
  782. X!             pline("The altar is too hard to break apart.");
  783. X!             return;
  784. X!         } else if(ttmp) {
  785. X!             ttmp->ttyp = TRAPDOOR;
  786. X!         } else if(nohole) {
  787. X!             /* can't make a trapdoor, so make a pit */
  788. X!             ttmp = maketrap(u.ux, u.uy, PIT);
  789. X!         } else
  790. X!             ttmp = maketrap(u.ux, u.uy, TRAPDOOR);
  791. X!         ttmp->tseen = 1;
  792. X!         if(Invisible) newsym(ttmp->tx,ttmp->ty);
  793. X!         if(ttmp->ttyp == PIT) {
  794. X!             You("dig a pit.");
  795. X!             if(!Levitation) {
  796. X              u.utrap = rn1(4,2);
  797. X              u.utraptype = TT_PIT;
  798. X              vision_full_recalc = 1;    /* vision limits change */
  799. X!             } else
  800. X              u.utrap = 0;
  801. X!             return;
  802. X!         } 
  803. X!         pline("You dig a hole through the floor.");
  804. X  
  805. X          /* floor objects get a chance of falling down.
  806. X           * the case where the hero does NOT fall down
  807. X           * is treated here.  the case where the hero
  808. X           * does fall down is treated in goto_level().
  809. X           */
  810. X!         if(OBJ_AT(u.ux, u.uy) && (u.ustuck || Levitation 
  811. X! #ifdef WALKIES
  812. X!                                  || !next_to_u()
  813. X! #endif
  814. X!                       ))
  815. X!             impact_drop((struct obj *)0, u.ux, u.uy, 0);
  816. X! 
  817. X!         if (*u.ushops)
  818. X!             add_damage(u.ux, u.uy, 0L);
  819. X!         if(!u.ustuck && !Levitation) {            /* KAA */
  820. X!             if(*u.ushops)
  821. X                  shopdig(1);
  822. X  #ifdef WALKIES
  823. X!             if(!next_to_u())
  824. X                  You("are jerked back by your pet!");
  825. X!             else
  826. X  #endif
  827. X              {
  828. X                  You("fall through...");
  829. X  
  830. X!                 /* the checks above must ensure that   */
  831. X!                 /* the destination level exists and is */
  832. X!                 /* in the present dungeon.           */
  833. X  
  834. X                  newlevel.dnum = u.uz.dnum;
  835. X                  newlevel.dlevel = u.uz.dlevel + 1;
  836. X--- 833,905 ----
  837. X      return ROOM;
  838. X  }
  839. X  
  840. X! static void
  841. X! digactualhole(ttyp)
  842. X! int ttyp;
  843. X  {
  844. X!     struct obj *oldobjs, *newobjs;
  845. X!     register struct trap *ttmp;
  846. X!     boolean wont_fall = !!Levitation;
  847. X  #ifdef POLYSELF
  848. X!         wont_fall |= !!is_flyer(uasmon);
  849. X  #endif
  850. X  
  851. X!     oldobjs = level.objects[u.ux][u.uy];
  852. X!     ttmp = maketrap(u.ux, u.uy, ttyp);
  853. X!     if (!ttmp) return;
  854. X!     newobjs = level.objects[u.ux][u.uy];
  855. X!     ttmp->tseen = 1;
  856. X!     if (Invisible) newsym(ttmp->tx,ttmp->ty);
  857. X! 
  858. X!     if (ttyp == PIT) {
  859. X!         if (!wont_fall) {
  860. X              u.utrap = rn1(4,2);
  861. X              u.utraptype = TT_PIT;
  862. X              vision_full_recalc = 1;    /* vision limits change */
  863. X!         } else
  864. X              u.utrap = 0;
  865. X!         if (oldobjs != newobjs)    /* something unearthed */
  866. X!             pickup(1);    /* detects pit */
  867. X!         else
  868. X!             You("dig a pit.");
  869. X  
  870. X+     } else {    /* TRAPDOOR */
  871. X+         pline("You dig a hole through the %s.", surface(u.ux,u.uy));
  872. X+ 
  873. X+         if (*u.ushops)
  874. X+             add_damage(u.ux, u.uy, 0L);
  875. X+ 
  876. X          /* floor objects get a chance of falling down.
  877. X           * the case where the hero does NOT fall down
  878. X           * is treated here.  the case where the hero
  879. X           * does fall down is treated in goto_level().
  880. X           */
  881. X!         if (u.ustuck || wont_fall) {
  882. X!             if (newobjs)
  883. X!                 impact_drop((struct obj *)0, u.ux, u.uy, 0);
  884. X!             if (oldobjs != newobjs)
  885. X!                 pickup(1);
  886. X!         } else {
  887. X!             if (*u.ushops)
  888. X                  shopdig(1);
  889. X  #ifdef WALKIES
  890. X!             if (!next_to_u()) {
  891. X                  You("are jerked back by your pet!");
  892. X!                 if (newobjs)
  893. X!                 impact_drop((struct obj *)0, u.ux, u.uy, 0);
  894. X!                 if (oldobjs != newobjs)
  895. X!                 pickup(1);
  896. X!             } else
  897. X  #endif
  898. X              {
  899. X+                 d_level newlevel;
  900. X+ 
  901. X                  You("fall through...");
  902. X  
  903. X!                 /* earlier checks must ensure that the
  904. X!                  * destination level exists and is in the
  905. X!                  * present dungeon.
  906. X!                  */
  907. X  
  908. X                  newlevel.dnum = u.uz.dnum;
  909. X                  newlevel.dlevel = u.uz.dlevel + 1;
  910. X***************
  911. X*** 1012,1017 ****
  912. X--- 909,1032 ----
  913. X      }
  914. X  }
  915. X  
  916. X+ void
  917. X+ dighole()
  918. X+ {
  919. X+     register struct trap *ttmp = t_at(u.ux, u.uy);
  920. X+     struct rm *lev = &levl[u.ux][u.uy];
  921. X+     struct obj *boulder_here;
  922. X+     schar typ;
  923. X+     boolean nohole = !Can_dig_down(&u.uz);
  924. X+ 
  925. X+     if (ttmp && (ttmp->ttyp == MAGIC_PORTAL || nohole)) {
  926. X+         pline("The %s here is too hard to dig in.", surface(u.ux,u.uy));
  927. X+ 
  928. X+     } else if (is_pool(u.ux, u.uy) || is_lava(u.ux, u.uy)) {
  929. X+         pline("The %s sloshes furiously for a moment, then subsides.",
  930. X+             is_lava(u.ux, u.uy) ? "lava" : "water");
  931. X+         wake_nearby();    /* splashing */
  932. X+ 
  933. X+     } else if (lev->typ == DRAWBRIDGE_DOWN) {
  934. X+         destroy_drawbridge(u.ux,u.uy);
  935. X+ 
  936. X+     } else if ((boulder_here = sobj_at(BOULDER, u.ux, u.uy)) != 0) {
  937. X+         if (ttmp && (ttmp->ttyp == PIT || ttmp->ttyp == SPIKED_PIT)) {
  938. X+             pline("The boulder settles into the pit.");
  939. X+             ttmp->ttyp = PIT;     /* crush spikes */
  940. X+         } else {
  941. X+             /*
  942. X+              * digging makes a hole, but the boulder immediately
  943. X+              * fills it.  Final outcome:  no hole, no boulder.
  944. X+              */
  945. X+             pline("KADOOM! The boulder falls in!");
  946. X+ 
  947. X+             /* destroy traps that emanate from the floor */
  948. X+             /* some of these are arbitrary -dlc */
  949. X+             if (ttmp && ((ttmp->ttyp == SQKY_BOARD) ||
  950. X+                      (ttmp->ttyp == BEAR_TRAP) ||
  951. X+                      (ttmp->ttyp == LANDMINE) ||
  952. X+                      (ttmp->ttyp == FIRE_TRAP) ||
  953. X+                      (ttmp->ttyp == TRAPDOOR) ||
  954. X+                      (ttmp->ttyp == TELEP_TRAP) ||
  955. X+                      (ttmp->ttyp == LEVEL_TELEP) ||
  956. X+                      (ttmp->ttyp == WEB) ||
  957. X+                      (ttmp->ttyp == MAGIC_TRAP) ||
  958. X+                      (ttmp->ttyp == ANTI_MAGIC))) {
  959. X+                 deltrap(ttmp);
  960. X+                 u.utrap = 0;
  961. X+                 u.utraptype = 0;
  962. X+             }
  963. X+         }
  964. X+         delobj(boulder_here);
  965. X+ 
  966. X+     } else if (lev->typ == DRAWBRIDGE_UP) {
  967. X+         /* must be floor or ice, other cases handled above */
  968. X+         /* dig "pit" and let fluid flow in (if possible) */
  969. X+         typ = fillholetyp(u.ux,u.uy);
  970. X+ 
  971. X+         if (typ == ROOM) {
  972. X+             if (lev->drawbridgemask & DB_ICE)
  973. X+             typ = MOAT;
  974. X+             else {
  975. X+             /*
  976. X+              * We can't dig a pit here since that will destroy
  977. X+              * the drawbridge.  The following is a cop-out. --dlc
  978. X+              */
  979. X+             pline("The floor here is too hard to dig in.");
  980. X+             return;
  981. X+             }
  982. X+         }
  983. X+ 
  984. X+         lev->drawbridgemask &= DB_DIR;
  985. X+         if (typ == LAVAPOOL) lev->drawbridgemask |= DB_LAVA;
  986. X+         liquid_flow:
  987. X+         newsym(u.ux,u.uy);
  988. X+ 
  989. X+         pline("As you dig a pit, it fills with %s!",
  990. X+               typ == LAVAPOOL ? "lava" : "water");
  991. X+         if (!Levitation
  992. X+ #ifdef POLYSELF
  993. X+            && !is_flyer(uasmon)
  994. X+ #endif
  995. X+                     ) {
  996. X+             if (typ == LAVAPOOL)
  997. X+             (void) lava_effects();
  998. X+             else if (!Wwalking)
  999. X+             (void) drown();
  1000. X+         }
  1001. X+ 
  1002. X+     } else if (IS_FOUNTAIN(lev->typ)) {
  1003. X+         dogushforth(FALSE);
  1004. X+         dryup(u.ux,u.uy);
  1005. X+ #ifdef SINKS
  1006. X+     } else if (IS_SINK(lev->typ)) {
  1007. X+         breaksink(u.ux, u.uy);
  1008. X+ #endif
  1009. X+     /* the following two are here for the wand of digging */
  1010. X+     } else if (IS_THRONE(lev->typ)) {
  1011. X+         pline("The throne is too hard to break apart.");
  1012. X+ 
  1013. X+     } else if (IS_ALTAR(lev->typ)) {
  1014. X+         pline("The altar is too hard to break apart.");
  1015. X+ 
  1016. X+     } else {
  1017. X+         if (lev->typ == ICE) {
  1018. X+             typ = fillholetyp(u.ux,u.uy);
  1019. X+ 
  1020. X+             if (typ != ROOM) {
  1021. X+                 lev->typ = typ;
  1022. X+                 goto liquid_flow;
  1023. X+             }
  1024. X+         }
  1025. X+ 
  1026. X+         /* finally we get to make a hole */
  1027. X+         if (nohole) {    /* can't make a trapdoor, so make a pit */
  1028. X+             digactualhole(PIT);
  1029. X+         } else
  1030. X+             digactualhole(TRAPDOOR);
  1031. X+     }
  1032. X+ }
  1033. X+ 
  1034. X  static boolean
  1035. X  wield_tool(obj)
  1036. X  struct obj *obj;
  1037. X***************
  1038. X*** 1119,1125 ****
  1039. X                  dig_pos.y = ry;
  1040. X                  assign_level(&dig_level, &u.uz);
  1041. X                  dig_effort = 0;
  1042. X!                     You("start %s.",
  1043. X                     sobj_at(STATUE, rx, ry) ?
  1044. X                          "chipping the statue" :
  1045. X                     sobj_at(BOULDER, rx, ry) ?
  1046. X--- 1134,1140 ----
  1047. X                  dig_pos.y = ry;
  1048. X                  assign_level(&dig_level, &u.uz);
  1049. X                  dig_effort = 0;
  1050. X!                 You("start %s.",
  1051. X                     sobj_at(STATUE, rx, ry) ?
  1052. X                          "chipping the statue" :
  1053. X                     sobj_at(BOULDER, rx, ry) ?
  1054. X***************
  1055. X*** 1141,1147 ****
  1056. X          /* it must be air -- water checked above */
  1057. X          You("swing your %s through thin air.", aobjnam(obj, NULL));
  1058. X      } else if(Levitation) {
  1059. X!         You("can't reach the floor.");
  1060. X      } else if (is_pool(u.ux, u.uy)) {
  1061. X          /* Monsters which swim also happen not to be able to dig */
  1062. X          You("cannot stay underwater long enough.");
  1063. X--- 1156,1162 ----
  1064. X          /* it must be air -- water checked above */
  1065. X          You("swing your %s through thin air.", aobjnam(obj, NULL));
  1066. X      } else if(Levitation) {
  1067. X!         You("can't reach the %s.", surface(u.ux,u.uy));
  1068. X      } else if (is_pool(u.ux, u.uy)) {
  1069. X          /* Monsters which swim also happen not to be able to dig */
  1070. X          You("cannot stay underwater long enough.");
  1071. X***************
  1072. X*** 1153,1163 ****
  1073. X              dig_pos.y = u.uy;
  1074. X              assign_level(&dig_level, &u.uz);
  1075. X              dig_effort = 0;
  1076. X!             You("start digging in the floor.");
  1077. X              if(*u.ushops)
  1078. X                  shopdig(0);
  1079. X          } else
  1080. X!             You("continue digging in the floor.");
  1081. X          did_dig_msg = FALSE;
  1082. X          set_occupation(dig, "digging", 0);
  1083. X      }
  1084. X--- 1168,1178 ----
  1085. X              dig_pos.y = u.uy;
  1086. X              assign_level(&dig_level, &u.uz);
  1087. X              dig_effort = 0;
  1088. X!             You("start digging in the %s.", surface(u.ux,u.uy));
  1089. X              if(*u.ushops)
  1090. X                  shopdig(0);
  1091. X          } else
  1092. X!             You("continue digging in the %s.", surface(u.ux,u.uy));
  1093. X          did_dig_msg = FALSE;
  1094. X          set_occupation(dig, "digging", 0);
  1095. X      }
  1096. X***************
  1097. X*** 1221,1227 ****
  1098. X          return 1;
  1099. X      }
  1100. X      if(Underwater) {
  1101. X!         You(Hallucination ? 
  1102. X              "give the fish a chance to fix their makeup." :
  1103. X              "reflect the murky water.");
  1104. X          return 1;
  1105. X--- 1236,1242 ----
  1106. X          return 1;
  1107. X      }
  1108. X      if(Underwater) {
  1109. X!         You(Hallucination ?
  1110. X              "give the fish a chance to fix their makeup." :
  1111. X              "reflect the murky water.");
  1112. X          return 1;
  1113. X***************
  1114. X*** 1228,1234 ****
  1115. X      }
  1116. X      if(u.dz) {
  1117. X          if (!Blind)
  1118. X!             You("reflect the %s.", (u.dz > 0) ? "floor" : "ceiling");
  1119. X          return 1;
  1120. X      }
  1121. X      if(!(mtmp = bhit(u.dx,u.dy,COLNO,INVIS_BEAM,
  1122. X--- 1243,1250 ----
  1123. X      }
  1124. X      if(u.dz) {
  1125. X          if (!Blind)
  1126. X!             You("reflect the %s.",
  1127. X!             (u.dz > 0) ? surface(u.ux,u.uy) : "ceiling");
  1128. X          return 1;
  1129. X      }
  1130. X      if(!(mtmp = bhit(u.dx,u.dy,COLNO,INVIS_BEAM,
  1131. X***************
  1132. X*** 1271,1287 ****
  1133. X      } else if(!mtmp->mcan && mtmp->data == &mons[PM_UMBER_HULK]) {
  1134. X          if (vis)
  1135. X              pline ("%s confuses itself!", Monnam(mtmp));
  1136. X!             mtmp->mconf = 1;
  1137. X      } else if(!mtmp->mcan && !mtmp->minvis && (mlet == S_NYMPH
  1138. X!                          || mtmp->data==&mons[PM_SUCCUBUS])) {
  1139. X          if (vis) {
  1140. X!                 pline ("%s admires herself in your mirror.", Monnam(mtmp));
  1141. X!                 pline ("She takes it!");
  1142. X          } else pline ("It steals your mirror!");
  1143. X          setnotworn(obj); /* in case mirror was wielded */
  1144. X!             freeinv(obj);
  1145. X!             mpickobj(mtmp,obj);
  1146. X!             rloc(mtmp);
  1147. X      } else if (mlet != S_UNICORN && !humanoid(mtmp->data) &&
  1148. X              (!mtmp->minvis || perceives(mtmp->data)) && rn2(5)) {
  1149. X          if (vis)
  1150. X--- 1287,1303 ----
  1151. X      } else if(!mtmp->mcan && mtmp->data == &mons[PM_UMBER_HULK]) {
  1152. X          if (vis)
  1153. X              pline ("%s confuses itself!", Monnam(mtmp));
  1154. X!         mtmp->mconf = 1;
  1155. X      } else if(!mtmp->mcan && !mtmp->minvis && (mlet == S_NYMPH
  1156. X!                      || mtmp->data==&mons[PM_SUCCUBUS])) {
  1157. X          if (vis) {
  1158. X!             pline ("%s admires herself in your mirror.", Monnam(mtmp));
  1159. X!             pline ("She takes it!");
  1160. X          } else pline ("It steals your mirror!");
  1161. X          setnotworn(obj); /* in case mirror was wielded */
  1162. X!         freeinv(obj);
  1163. X!         mpickobj(mtmp,obj);
  1164. X!         rloc(mtmp);
  1165. X      } else if (mlet != S_UNICORN && !humanoid(mtmp->data) &&
  1166. X              (!mtmp->minvis || perceives(mtmp->data)) && rn2(5)) {
  1167. X          if (vis)
  1168. X***************
  1169. X*** 1316,1324 ****
  1170. X          pline("But the sound is muffled.");
  1171. X          return;
  1172. X      }
  1173. X!         if(obj->otyp == BELL) {
  1174. X          if(u.uswallow) {
  1175. X!             pline(nothing_happens);
  1176. X          return;
  1177. X          }
  1178. X  #ifdef    AMIGA
  1179. X--- 1332,1340 ----
  1180. X          pline("But the sound is muffled.");
  1181. X          return;
  1182. X      }
  1183. X!     if(obj->otyp == BELL) {
  1184. X          if(u.uswallow) {
  1185. X!         pline(nothing_happens);
  1186. X          return;
  1187. X          }
  1188. X  #ifdef    AMIGA
  1189. X***************
  1190. X*** 1325,1333 ****
  1191. X          amii_speaker( obj, "awdwgwewdhehaqdqfwgw", AMII_MUFFLED_VOLUME );
  1192. X  #endif
  1193. X          if(obj->cursed && !rn2(3)) {
  1194. X!             register struct monst *mtmp;
  1195. X  
  1196. X!         if(mtmp = makemon(&mons[PM_WOOD_NYMPH], u.ux, u.uy))
  1197. X             You("summon %s!", a_monnam(mtmp));
  1198. X          }
  1199. X          wake_nearby();
  1200. X--- 1341,1349 ----
  1201. X          amii_speaker( obj, "awdwgwewdhehaqdqfwgw", AMII_MUFFLED_VOLUME );
  1202. X  #endif
  1203. X          if(obj->cursed && !rn2(3)) {
  1204. X!         register struct monst *mtmp;
  1205. X  
  1206. X!         if ((mtmp = makemon(&mons[PM_WOOD_NYMPH], u.ux, u.uy)) != 0)
  1207. X             You("summon %s!", a_monnam(mtmp));
  1208. X          }
  1209. X          wake_nearby();
  1210. X***************
  1211. X*** 1339,1345 ****
  1212. X          pline(nothing_happens);
  1213. X          return;
  1214. X      }
  1215. X!         if(obj->cursed) {
  1216. X          coord mm;
  1217. X          mm.x = u.ux;
  1218. X          mm.y = u.uy;
  1219. X--- 1355,1361 ----
  1220. X          pline(nothing_happens);
  1221. X          return;
  1222. X      }
  1223. X!     if(obj->cursed) {
  1224. X          coord mm;
  1225. X          mm.x = u.ux;
  1226. X          mm.y = u.uy;
  1227. X***************
  1228. X*** 1349,1356 ****
  1229. X          if(obj->spe > 0) obj->spe--;
  1230. X          return;
  1231. X      }
  1232. X!     if(invocation_pos(u.ux, u.uy) && 
  1233. X!                  !On_stairs(u.ux, u.uy) && !u.uswallow) {
  1234. X          pline("%s issues an unsettling shrill sound...", The(xname(obj)));
  1235. X  #ifdef    AMIGA
  1236. X          amii_speaker( obj, "aefeaefeaefeaefeaefe", AMII_LOUDER_VOLUME );
  1237. X--- 1365,1372 ----
  1238. X          if(obj->spe > 0) obj->spe--;
  1239. X          return;
  1240. X      }
  1241. X!     if(invocation_pos(u.ux, u.uy) &&
  1242. X!              !On_stairs(u.ux, u.uy) && !u.uswallow) {
  1243. X          pline("%s issues an unsettling shrill sound...", The(xname(obj)));
  1244. X  #ifdef    AMIGA
  1245. X          amii_speaker( obj, "aefeaefeaefeaefeaefe", AMII_LOUDER_VOLUME );
  1246. X***************
  1247. X*** 1363,1369 ****
  1248. X      }
  1249. X      if(obj->blessed) {
  1250. X          if(obj->spe > 0) {
  1251. X!             register int cnt = openit();
  1252. X          if(cnt == -1) return; /* was swallowed */
  1253. X  #ifdef    AMIGA
  1254. X          amii_speaker( obj, "awawawDwEwCw", AMII_SOFT_VOLUME );
  1255. X--- 1379,1385 ----
  1256. X      }
  1257. X      if(obj->blessed) {
  1258. X          if(obj->spe > 0) {
  1259. X!         register int cnt = openit();
  1260. X          if(cnt == -1) return; /* was swallowed */
  1261. X  #ifdef    AMIGA
  1262. X          amii_speaker( obj, "awawawDwEwCw", AMII_SOFT_VOLUME );
  1263. X***************
  1264. X*** 1371,1378 ****
  1265. X          switch(cnt) {
  1266. X            case 0:  pline(nothing_happens); break;
  1267. X            case 1:  pline("Something opens..."); break;
  1268. X!               default: pline("Things open around you..."); break;
  1269. X!             }
  1270. X          if(cnt > 0) obj->known = 1;
  1271. X          obj->spe--;
  1272. X          } else pline(nothing_happens);
  1273. X--- 1387,1394 ----
  1274. X          switch(cnt) {
  1275. X            case 0:  pline(nothing_happens); break;
  1276. X            case 1:  pline("Something opens..."); break;
  1277. X!           default: pline("Things open around you..."); break;
  1278. X!         }
  1279. X          if(cnt > 0) obj->known = 1;
  1280. X          obj->spe--;
  1281. X          } else pline(nothing_happens);
  1282. X***************
  1283. X*** 1381,1395 ****
  1284. X          amii_speaker( obj, "AeFeaeFeAefegW", AMII_OKAY_VOLUME );
  1285. X  #endif
  1286. X          if(obj->spe > 0) {
  1287. X!             register int cnt = findit();
  1288. X          if(cnt == 0) pline(nothing_happens);
  1289. X          else obj->known = 1;
  1290. X!             obj->spe--;
  1291. X          } else {
  1292. X!             if(!rn2(3)) goto cursed_bell;
  1293. X          else pline(nothing_happens);
  1294. X          }
  1295. X!         }
  1296. X  }
  1297. X  
  1298. X  static void
  1299. X--- 1397,1411 ----
  1300. X          amii_speaker( obj, "AeFeaeFeAefegW", AMII_OKAY_VOLUME );
  1301. X  #endif
  1302. X          if(obj->spe > 0) {
  1303. X!         register int cnt = findit();
  1304. X          if(cnt == 0) pline(nothing_happens);
  1305. X          else obj->known = 1;
  1306. X!         obj->spe--;
  1307. X          } else {
  1308. X!         if(!rn2(3)) goto cursed_bell;
  1309. X          else pline(nothing_happens);
  1310. X          }
  1311. X!     }
  1312. X  }
  1313. X  
  1314. X  static void
  1315. X***************
  1316. X*** 1411,1425 ****
  1317. X          return;
  1318. X      }
  1319. X      if(u.uswallow || obj->cursed) {
  1320. X!         pline("The candle%s flicker%s for a moment, then die%s.", 
  1321. X              obj->spe > 1 ? "s" : "",
  1322. X              obj->spe > 1 ? "" : "s",
  1323. X              obj->spe > 1 ? "" : "s");
  1324. X!             return;
  1325. X!     } 
  1326. X!         if(obj->spe < 7) {
  1327. X!             pline("There %s only %d candle%s in %s.",
  1328. X!                obj->spe == 1 ? "is" : "are", 
  1329. X                 obj->spe,
  1330. X                 obj->spe > 1 ? "s" : "",
  1331. X                 the(xname(obj)));
  1332. X--- 1427,1441 ----
  1333. X          return;
  1334. X      }
  1335. X      if(u.uswallow || obj->cursed) {
  1336. X!         pline("The candle%s flicker%s for a moment, then die%s.",
  1337. X              obj->spe > 1 ? "s" : "",
  1338. X              obj->spe > 1 ? "" : "s",
  1339. X              obj->spe > 1 ? "" : "s");
  1340. X!         return;
  1341. X!     }
  1342. X!     if(obj->spe < 7) {
  1343. X!         pline("There %s only %d candle%s in %s.",
  1344. X!                obj->spe == 1 ? "is" : "are",
  1345. X                 obj->spe,
  1346. X                 obj->spe > 1 ? "s" : "",
  1347. X                 the(xname(obj)));
  1348. X***************
  1349. X*** 1435,1441 ****
  1350. X              (obj->spe > 1 ? "s are" : " is"));
  1351. X          obj->age /= 2;
  1352. X      } else {
  1353. X!             if(obj->spe == 7) {
  1354. X              if (Blind)
  1355. X                pline("%s radiates a strange warmth!", The(xname(obj)));
  1356. X              else
  1357. X--- 1451,1457 ----
  1358. X              (obj->spe > 1 ? "s are" : " is"));
  1359. X          obj->age /= 2;
  1360. X      } else {
  1361. X!         if(obj->spe == 7) {
  1362. X              if (Blind)
  1363. X                pline("%s radiates a strange warmth!", The(xname(obj)));
  1364. X              else
  1365. X***************
  1366. X*** 1456,1467 ****
  1367. X      char qbuf[QBUFSZ];
  1368. X  
  1369. X      if(obj->lamplit) {
  1370. X!             use_lamp(obj);
  1371. X          return;
  1372. X      }
  1373. X  
  1374. X      if(u.uswallow) {
  1375. X!             You("don't have enough elbow-room to maneuver.");
  1376. X          return;
  1377. X      }
  1378. X      if(Underwater) {
  1379. X--- 1472,1483 ----
  1380. X      char qbuf[QBUFSZ];
  1381. X  
  1382. X      if(obj->lamplit) {
  1383. X!         use_lamp(obj);
  1384. X          return;
  1385. X      }
  1386. X  
  1387. X      if(u.uswallow) {
  1388. X!         You("don't have enough elbow-room to maneuver.");
  1389. X          return;
  1390. X      }
  1391. X      if(Underwater) {
  1392. X***************
  1393. X*** 1487,1502 ****
  1394. X      } else {
  1395. X          register long needed = 7L - (long)otmp->spe;
  1396. X  
  1397. X!         You("attach %ld%s candle%s to %s.", 
  1398. X              obj->quan >= needed ? needed : obj->quan,
  1399. X              !otmp->spe ? "" : " more",
  1400. X              (needed > 1L && obj->quan > 1L) ? "s" : "",
  1401. X              the(xname(otmp)));
  1402. X!         if(otmp->lamplit) 
  1403. X              pline("The new candle%s magically ignite%s!",
  1404. X                  (needed > 1L && obj->quan > 1L) ? "s" : "",
  1405. X                  (needed > 1L && obj->quan > 1L) ? "" : "s");
  1406. X!         if(obj->unpaid) 
  1407. X              verbalize("You burn %s, you bought %s!",
  1408. X                  (needed > 1L && obj->quan > 1L) ? "them" : "it",
  1409. X                  (needed > 1L && obj->quan > 1L) ? "them" : "it");
  1410. X--- 1503,1518 ----
  1411. X      } else {
  1412. X          register long needed = 7L - (long)otmp->spe;
  1413. X  
  1414. X!         You("attach %ld%s candle%s to %s.",
  1415. X              obj->quan >= needed ? needed : obj->quan,
  1416. X              !otmp->spe ? "" : " more",
  1417. X              (needed > 1L && obj->quan > 1L) ? "s" : "",
  1418. X              the(xname(otmp)));
  1419. X!         if(otmp->lamplit)
  1420. X              pline("The new candle%s magically ignite%s!",
  1421. X                  (needed > 1L && obj->quan > 1L) ? "s" : "",
  1422. X                  (needed > 1L && obj->quan > 1L) ? "" : "s");
  1423. X!         if(obj->unpaid)
  1424. X              verbalize("You burn %s, you bought %s!",
  1425. X                  (needed > 1L && obj->quan > 1L) ? "them" : "it",
  1426. X                  (needed > 1L && obj->quan > 1L) ? "them" : "it");
  1427. X***************
  1428. X*** 1560,1566 ****
  1429. X              obj->lamplit = 0;
  1430. X              check_lamps();
  1431. X              return(TRUE);
  1432. X!         } 
  1433. X  
  1434. X          if(snuff_candle(obj)) return(TRUE);
  1435. X      }
  1436. X--- 1576,1582 ----
  1437. X              obj->lamplit = 0;
  1438. X              check_lamps();
  1439. X              return(TRUE);
  1440. X!         }
  1441. X  
  1442. X          if(snuff_candle(obj)) return(TRUE);
  1443. X      }
  1444. X***************
  1445. X*** 1593,1599 ****
  1446. X          return;
  1447. X      }
  1448. X      if(obj->cursed && !rn2(2))
  1449. X!         pline("%s flicker%s for a moment, then die%s.", 
  1450. X                 The(xname(obj)),
  1451. X                 obj->quan > 1L ? "" : "s",
  1452. X                 obj->quan > 1L ? "" : "s");
  1453. X--- 1609,1615 ----
  1454. X          return;
  1455. X      }
  1456. X      if(obj->cursed && !rn2(2))
  1457. X!         pline("%s flicker%s for a moment, then die%s.",
  1458. X                 The(xname(obj)),
  1459. X                 obj->quan > 1L ? "" : "s",
  1460. X                 obj->quan > 1L ? "" : "s");
  1461. X***************
  1462. X*** 1603,1611 ****
  1463. X              Your("lamp is now on.");
  1464. X          else
  1465. X              pline("%s%s flame%s burn%s%s", The(xname(obj)),
  1466. X!                 obj->quan > 1L ? "'" : "'s",
  1467. X!                 obj->quan > 1L ? "s" : "",
  1468. X!                 obj->quan > 1L ? "" : "s",
  1469. X              Blind ? "." : " brightly!");
  1470. X          obj->lamplit = 1;
  1471. X          check_lamps();
  1472. X--- 1619,1627 ----
  1473. X              Your("lamp is now on.");
  1474. X          else
  1475. X              pline("%s%s flame%s burn%s%s", The(xname(obj)),
  1476. X!             obj->quan > 1L ? "'" : "'s",
  1477. X!             obj->quan > 1L ? "s" : "",
  1478. X!             obj->quan > 1L ? "" : "s",
  1479. X              Blind ? "." : " brightly!");
  1480. X          obj->lamplit = 1;
  1481. X          check_lamps();
  1482. X***************
  1483. X*** 1695,1701 ****
  1484. X      cc.x = u.ux;
  1485. X      cc.y = u.uy;
  1486. X      getpos(&cc, TRUE, "the desired position");
  1487. X!         if(cc.x == -10) return 0; /* user pressed esc */
  1488. X      if (!(Jumping & ~INTRINSIC) && distu(cc.x, cc.y) != 5) {
  1489. X          pline("Illegal move!");
  1490. X          return 0;
  1491. X--- 1711,1717 ----
  1492. X      cc.x = u.ux;
  1493. X      cc.y = u.uy;
  1494. X      getpos(&cc, TRUE, "the desired position");
  1495. X!     if(cc.x == -10) return 0; /* user pressed esc */
  1496. X      if (!(Jumping & ~INTRINSIC) && distu(cc.x, cc.y) != 5) {
  1497. X          pline("Illegal move!");
  1498. X          return 0;
  1499. X***************
  1500. X*** 1705,1711 ****
  1501. X      } else if (!cansee(cc.x, cc.y)) {
  1502. X          You("cannot see where to land!");
  1503. X          return 0;
  1504. X!     } else if (mtmp = m_at(cc.x, cc.y)) {
  1505. X          You("cannot trample %s!", mon_nam(mtmp));
  1506. X          return 0;
  1507. X      } else if (!isok(cc.x, cc.y) ||
  1508. X--- 1721,1727 ----
  1509. X      } else if (!cansee(cc.x, cc.y)) {
  1510. X          You("cannot see where to land!");
  1511. X          return 0;
  1512. X!     } else if ((mtmp = m_at(cc.x, cc.y)) != 0) {
  1513. X          You("cannot trample %s!", mon_nam(mtmp));
  1514. X          return 0;
  1515. X      } else if (!isok(cc.x, cc.y) ||
  1516. X***************
  1517. X*** 1763,1769 ****
  1518. X      /* This takes only 1 move.  If this is to be changed to take many
  1519. X       * moves, we've got to deal with decaying corpses...
  1520. X       */
  1521. X!     if (!(corpse = floorfood("can", 1))) return;
  1522. X      if (corpse->oeaten) {
  1523. X          You("cannot tin something which is partly eaten.");
  1524. X          return;
  1525. X--- 1779,1785 ----
  1526. X      /* This takes only 1 move.  If this is to be changed to take many
  1527. X       * moves, we've got to deal with decaying corpses...
  1528. X       */
  1529. X!     if (!(corpse = floorfood("tin", 1))) return;
  1530. X      if (corpse->oeaten) {
  1531. X          You("cannot tin something which is partly eaten.");
  1532. X          return;
  1533. X***************
  1534. X*** 1794,1800 ****
  1535. X          pline("That's too insubstantial to tin.");
  1536. X          return;
  1537. X      }
  1538. X!     if(can = mksobj(TIN, FALSE, FALSE)) {
  1539. X          can->corpsenm = corpse->corpsenm;
  1540. X          can->cursed = obj->cursed;
  1541. X          can->blessed = obj->blessed;
  1542. X--- 1810,1816 ----
  1543. X          pline("That's too insubstantial to tin.");
  1544. X          return;
  1545. X      }
  1546. X!     if ((can = mksobj(TIN, FALSE, FALSE)) != 0) {
  1547. X          can->corpsenm = corpse->corpsenm;
  1548. X          can->cursed = obj->cursed;
  1549. X          can->blessed = obj->blessed;
  1550. X***************
  1551. X*** 1802,1819 ****
  1552. X          can->known = 1;
  1553. X          can->spe = -1;  /* Mark tinned tins. No spinach allowed... */
  1554. X          if (carried(corpse)) {
  1555. X!             if(corpse->unpaid) {
  1556. X              verbalize("You tin it, you bought it!");
  1557. X              bill_dummy_object(corpse);
  1558. X          }
  1559. X!             useup(corpse);
  1560. X          } else {
  1561. X!             if(costly_spot(corpse->ox, corpse->oy) &&
  1562. X                !corpse->no_charge) {
  1563. X              verbalize("You tin it, you bought it!");
  1564. X              bill_dummy_object(corpse);
  1565. X          }
  1566. X!             useupf(corpse);
  1567. X          }
  1568. X          can = hold_another_object(can, "You make, but cannot pick up, %s.",
  1569. X                        doname(can), (const char *)0);
  1570. X--- 1818,1835 ----
  1571. X          can->known = 1;
  1572. X          can->spe = -1;  /* Mark tinned tins. No spinach allowed... */
  1573. X          if (carried(corpse)) {
  1574. X!         if(corpse->unpaid) {
  1575. X              verbalize("You tin it, you bought it!");
  1576. X              bill_dummy_object(corpse);
  1577. X          }
  1578. X!         useup(corpse);
  1579. X          } else {
  1580. X!         if(costly_spot(corpse->ox, corpse->oy) &&
  1581. X                !corpse->no_charge) {
  1582. X              verbalize("You tin it, you bought it!");
  1583. X              bill_dummy_object(corpse);
  1584. X          }
  1585. X!         useupf(corpse);
  1586. X          }
  1587. X          can = hold_another_object(can, "You make, but cannot pick up, %s.",
  1588. X                        doname(can), (const char *)0);
  1589. X***************
  1590. X*** 1830,1836 ****
  1591. X      if (obj && obj->cursed) {
  1592. X          switch (rn2(6)) {
  1593. X              static char buf[BUFSZ];
  1594. X!             case 0: make_sick(Sick ? 1L : (long) rn1(20, 20), TRUE);
  1595. X                  Strcpy(buf, xname(obj));
  1596. X                  u.usick_cause = (const char *)buf;
  1597. X                  break;
  1598. X--- 1846,1852 ----
  1599. X      if (obj && obj->cursed) {
  1600. X          switch (rn2(6)) {
  1601. X              static char buf[BUFSZ];
  1602. X!             case 0: make_sick(Sick ? Sick/4 + 1L : (long) rn1(ACURR(A_CON), 20), TRUE);
  1603. X                  Strcpy(buf, xname(obj));
  1604. X                  u.usick_cause = (const char *)buf;
  1605. X                  break;
  1606. X***************
  1607. X*** 1851,1857 ****
  1608. X          }
  1609. X          return;
  1610. X      }
  1611. X!         
  1612. X      if (Sick) {
  1613. X          make_sick(0L, TRUE);
  1614. X          did_something++;
  1615. X--- 1867,1873 ----
  1616. X          }
  1617. X          return;
  1618. X      }
  1619. X! 
  1620. X      if (Sick) {
  1621. X          make_sick(0L, TRUE);
  1622. X          did_something++;
  1623. X***************
  1624. X*** 1884,1890 ****
  1625. X              /* don't recover strength lost while hungry */
  1626. X              if ((blessed || j==i) &&
  1627. X                  ((j != A_STR || u.uhs < WEAK)
  1628. X!                 ? (ABASE(i) < AMAX(i))
  1629. X                  : (ABASE(A_STR) < (AMAX(A_STR) - 1)))) {
  1630. X                  did_something++;
  1631. X                  /* They may have to use it several times... */
  1632. X--- 1900,1906 ----
  1633. X              /* don't recover strength lost while hungry */
  1634. X              if ((blessed || j==i) &&
  1635. X                  ((j != A_STR || u.uhs < WEAK)
  1636. X!                 ? (ABASE(j) < AMAX(j))
  1637. X                  : (ABASE(A_STR) < (AMAX(A_STR) - 1)))) {
  1638. X                  did_something++;
  1639. X                  /* They may have to use it several times... */
  1640. X***************
  1641. X*** 1892,1898 ****
  1642. X                      did_stat++;
  1643. X                      pline("This makes you feel good!");
  1644. X                  }
  1645. X!                 ABASE(i)++;
  1646. X                  flags.botl = 1;
  1647. X              }
  1648. X          }
  1649. X--- 1908,1914 ----
  1650. X                      did_stat++;
  1651. X                      pline("This makes you feel good!");
  1652. X                  }
  1653. X!                 ABASE(j)++;
  1654. X                  flags.botl = 1;
  1655. X              }
  1656. X          }
  1657. X***************
  1658. X*** 1954,1959 ****
  1659. X--- 1970,1976 ----
  1660. X      if (obj->spe > 0) {
  1661. X          if ((obj->cursed || Fumbling) && !rn2(2)) {
  1662. X              obj->spe--;
  1663. X+             check_unpaid(obj);
  1664. X              dropx(obj);
  1665. X              pline("%s slips from your %s.", The(xname(obj)),
  1666. X                    makeplural(body_part(FINGER)));
  1667. X***************
  1668. X*** 1962,1967 ****
  1669. X--- 1979,1985 ----
  1670. X          otmp = getobj(lubricables, "grease");
  1671. X          if (!otmp) return;
  1672. X          obj->spe--;
  1673. X+         check_unpaid(obj);
  1674. X          if (otmp != &zeroobj) {
  1675. X              You("cover your %s with a thick layer of grease.",
  1676. X                  xname(otmp));
  1677. X***************
  1678. X*** 1994,2000 ****
  1679. X          if (obj == ublindf) {
  1680. X              if(cursed(obj)) break;
  1681. X              else Blindf_off(obj);
  1682. X!         } 
  1683. X          else if (!ublindf) Blindf_on(obj);
  1684. X          else You("are already %s.", ublindf->otyp == TOWEL ?
  1685. X               "covered by a towel" : "wearing a blindfold");
  1686. X--- 2012,2018 ----
  1687. X          if (obj == ublindf) {
  1688. X              if(cursed(obj)) break;
  1689. X              else Blindf_off(obj);
  1690. X!         }
  1691. X          else if (!ublindf) Blindf_on(obj);
  1692. X          else You("are already %s.", ublindf->otyp == TOWEL ?
  1693. X               "covered by a towel" : "wearing a blindfold");
  1694. X***************
  1695. X*** 2005,2011 ****
  1696. X      case SACK:
  1697. X      case BAG_OF_HOLDING:
  1698. X      case OILSKIN_SACK:
  1699. X!         res = use_container(obj, 1); 
  1700. X          break;
  1701. X      case BAG_OF_TRICKS:
  1702. X          if(obj->spe > 0) {
  1703. X--- 2023,2029 ----
  1704. X      case SACK:
  1705. X      case BAG_OF_HOLDING:
  1706. X      case OILSKIN_SACK:
  1707. X!         res = use_container(obj, 1);
  1708. X          break;
  1709. X      case BAG_OF_TRICKS:
  1710. X          if(obj->spe > 0) {
  1711. X***************
  1712. X*** 2012,2017 ****
  1713. X--- 2030,2036 ----
  1714. X              register int cnt = 1;
  1715. X  
  1716. X              obj->spe--;
  1717. X+             check_unpaid(obj);
  1718. X              if(!rn2(23)) cnt += rn2(7) + 1;
  1719. X              while(cnt--)
  1720. X                  (void) makemon((struct permonst *) 0, u.ux, u.uy);
  1721. X***************
  1722. X*** 2055,2061 ****
  1723. X          break;
  1724. X      case BELL:
  1725. X      case BELL_OF_OPENING:
  1726. X!             use_bell(obj);
  1727. X          break;
  1728. X      case CANDELABRUM_OF_INVOCATION:
  1729. X          use_candelabrum(obj);
  1730. X--- 2074,2080 ----
  1731. X          break;
  1732. X      case BELL:
  1733. X      case BELL_OF_OPENING:
  1734. X!         use_bell(obj);
  1735. X          break;
  1736. X      case CANDELABRUM_OF_INVOCATION:
  1737. X          use_candelabrum(obj);
  1738. X***************
  1739. X*** 2071,2081 ****
  1740. X          break;
  1741. X  #ifdef TOURIST
  1742. X      case EXPENSIVE_CAMERA:
  1743. X!         res = use_camera(obj); 
  1744. X          break;
  1745. X  #endif
  1746. X      case TOWEL:
  1747. X!         res = use_towel(obj); 
  1748. X          break;
  1749. X      case CRYSTAL_BALL:
  1750. X          use_crystal_ball(obj);
  1751. X--- 2090,2100 ----
  1752. X          break;
  1753. X  #ifdef TOURIST
  1754. X      case EXPENSIVE_CAMERA:
  1755. X!         res = use_camera(obj);
  1756. X          break;
  1757. X  #endif
  1758. X      case TOWEL:
  1759. X!         res = use_towel(obj);
  1760. X          break;
  1761. X      case CRYSTAL_BALL:
  1762. X          use_crystal_ball(obj);
  1763. X***************
  1764. X*** 2119,2124 ****
  1765. X--- 2138,2144 ----
  1766. X              const char *what;
  1767. X  
  1768. X              obj->spe--;
  1769. X+             check_unpaid(obj);
  1770. X              if (!rn2(13)) {
  1771. X              otmp = mkobj(POTION_CLASS, FALSE);
  1772. X              if (objects[otmp->otyp].oc_magic) do {
  1773. X*** /tmp/da10802    Tue Jun  1 16:12:38 1993
  1774. X--- src/artifact.c    Fri May 28 11:40:24 1993
  1775. X***************
  1776. X*** 1,4 ****
  1777. X! /*    SCCS Id: @(#)artifact.c    3.1    93/02/17    */
  1778. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1779. X  /* NetHack may be freely redistributed.  See license for details. */
  1780. X  
  1781. X--- 1,4 ----
  1782. X! /*    SCCS Id: @(#)artifact.c    3.1    93/05/25    */
  1783. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1784. X  /* NetHack may be freely redistributed.  See license for details. */
  1785. X  
  1786. X***************
  1787. X*** 7,13 ****
  1788. X  #ifdef OVLB
  1789. X  #include "artilist.h"
  1790. X  #else
  1791. X! STATIC_DCL const struct artifact artilist[];
  1792. X  #endif
  1793. X  /*
  1794. X   * Note:  both artilist[] and artiexist[] have a dummy element #0,
  1795. X--- 7,13 ----
  1796. X  #ifdef OVLB
  1797. X  #include "artilist.h"
  1798. X  #else
  1799. X! STATIC_DCL struct artifact artilist[];
  1800. X  #endif
  1801. X  /*
  1802. X   * Note:  both artilist[] and artiexist[] have a dummy element #0,
  1803. X***************
  1804. X*** 33,45 ****
  1805. X--- 33,61 ----
  1806. X  /* flags including which artifacts have already been created */
  1807. X  static boolean artiexist[1+NROFARTIFACTS+1];
  1808. X  
  1809. X+ static void NDECL(hack_artifacts);
  1810. X  static boolean FDECL(attacks, (int,struct obj *));
  1811. X  
  1812. X+ /* handle some special cases; must be called after u_init() */
  1813. X+ static void
  1814. X+ hack_artifacts()
  1815. X+ {
  1816. X+     /* Excalibur can be used by any lawful character, not just knights */
  1817. X+     if (pl_character[0] != 'K')
  1818. X+         artilist[ART_EXCALIBUR].class = '\0';
  1819. X+ #ifdef MULDGN
  1820. X+     /* Mitre of Holiness has same alignment as priest starts out with */
  1821. X+     if (pl_character[0] == 'P')
  1822. X+         artilist[ART_MITRE_OF_HOLINESS].alignment = u.ualignbase[1];
  1823. X+ #endif
  1824. X+ }
  1825. X+ 
  1826. X  /* zero out the artifact existence list */
  1827. X  void
  1828. X  init_artifacts()
  1829. X  {
  1830. X      (void) memset((genericptr_t) artiexist, 0, sizeof artiexist);
  1831. X+     hack_artifacts();
  1832. X  }
  1833. X  
  1834. X  void
  1835. X***************
  1836. X*** 54,59 ****
  1837. X--- 70,76 ----
  1838. X  int fd;
  1839. X  {
  1840. X      mread(fd, (genericptr_t) artiexist, sizeof artiexist);
  1841. X+     hack_artifacts();    /* redo non-saved special cases */
  1842. X  }
  1843. X  
  1844. X  const char *
  1845. X***************
  1846. X*** 202,209 ****
  1847. X  artifact_unexist(otmp)
  1848. X      register struct obj *otmp;
  1849. X  {
  1850. X!     if (otmp->oartifact && artiexist[otmp->oartifact])
  1851. X!     artiexist[otmp->oartifact] = 0;
  1852. X      else
  1853. X      impossible("Destroying non-existing artifact?!");
  1854. X  }
  1855. X--- 219,226 ----
  1856. X  artifact_unexist(otmp)
  1857. X      register struct obj *otmp;
  1858. X  {
  1859. X!     if (otmp->oartifact && artiexist[(int)otmp->oartifact])
  1860. X!     artiexist[(int)otmp->oartifact] = 0;
  1861. X      else
  1862. X      impossible("Destroying non-existing artifact?!");
  1863. X  }
  1864. X***************
  1865. X*** 404,415 ****
  1866. X      ((oart->alignment !=
  1867. X        (yours ? u.ualign.type : sgn(mon->data->maligntyp))) ||
  1868. X       (yours && u.ualign.record < 0));
  1869. X-     /*
  1870. X-      * hack: Excalibur allows all lawfuls to touch it, but "class" is
  1871. X-      * set to 'K' to allow Knights to get it via sacrifice.  This requires an
  1872. X-      * additional artifact field to fix, or some similar treatment. -dlc
  1873. X-      */
  1874. X-     if (obj->oartifact == ART_EXCALIBUR && !badalign) badclass = FALSE;
  1875. X  
  1876. X      if(((badclass || badalign) && (oart->spfx & SPFX_INTEL)) ||
  1877. X         (badalign && (!yours || !rn2(4))))  {
  1878. X--- 421,426 ----
  1879. X***************
  1880. X*** 762,772 ****
  1881. X      }
  1882. X      /* end of Magicbane code */
  1883. X  
  1884. X!     /* We really want "on a natural 19 or 20" but Nethack does it in */
  1885. X      /* reverse from AD&D. */
  1886. X      if (spec_ability(otmp, SPFX_BEHEAD)) {
  1887. X  #ifdef MULDGN
  1888. X!         if (otmp->oartifact == ART_TSURUGI_OF_MURAMASA && dieroll <= 2) {
  1889. X          /* not really beheading, but so close, why add another SPFX */
  1890. X          if (youattack && u.uswallow && mdef == u.ustuck) {
  1891. X              You("slice %s wide open!", mon_nam(mdef));
  1892. X--- 773,783 ----
  1893. X      }
  1894. X      /* end of Magicbane code */
  1895. X  
  1896. X!     /* We really want "on a natural 20" but Nethack does it in */
  1897. X      /* reverse from AD&D. */
  1898. X      if (spec_ability(otmp, SPFX_BEHEAD)) {
  1899. X  #ifdef MULDGN
  1900. X!         if (otmp->oartifact == ART_TSURUGI_OF_MURAMASA && dieroll == 1) {
  1901. X          /* not really beheading, but so close, why add another SPFX */
  1902. X          if (youattack && u.uswallow && mdef == u.ustuck) {
  1903. X              You("slice %s wide open!", mon_nam(mdef));
  1904. X***************
  1905. X*** 789,795 ****
  1906. X                  return TRUE;
  1907. X              }
  1908. X              *dmgptr = mdef->mhp;
  1909. X!             pline("The razorsharp blade cuts %s in half!",
  1910. X                    mon_nam(mdef));
  1911. X              otmp->dknown = TRUE;
  1912. X              return TRUE;
  1913. X--- 800,806 ----
  1914. X                  return TRUE;
  1915. X              }
  1916. X              *dmgptr = mdef->mhp;
  1917. X!             pline("The razor-sharp blade cuts %s in half!",
  1918. X                    mon_nam(mdef));
  1919. X              otmp->dknown = TRUE;
  1920. X              return TRUE;
  1921. X***************
  1922. X*** 802,816 ****
  1923. X                  return TRUE;
  1924. X              }
  1925. X  #endif
  1926. X!             *dmgptr = u.uhp;
  1927. X!             pline("The razorsharp blade cuts you in half!");
  1928. X              otmp->dknown = TRUE;
  1929. X              return TRUE;
  1930. X          }
  1931. X!         } else 
  1932. X  #endif /* MULDGN */
  1933. X!             if (otmp->oartifact == ART_VORPAL_BLADE &&
  1934. X!             (dieroll <= 2 || mdef->data == &mons[PM_JABBERWOCK])) {
  1935. X          if (youattack && u.uswallow && mdef == u.ustuck)
  1936. X              return FALSE;
  1937. X          if (!youdefend) {
  1938. X--- 813,838 ----
  1939. X                  return TRUE;
  1940. X              }
  1941. X  #endif
  1942. X!             /* Players with negative AC's take less damage instead
  1943. X!              * of just not getting hit.  We must add a large enough
  1944. X!              * value to the damage so that this reduction in
  1945. X!              * damage does not prevent death.
  1946. X!              */
  1947. X!             *dmgptr = u.uhp + 1234;
  1948. X!             pline("The razor-sharp blade cuts you in half!");
  1949. X              otmp->dknown = TRUE;
  1950. X              return TRUE;
  1951. X          }
  1952. X!         } else
  1953. X  #endif /* MULDGN */
  1954. X!         if (otmp->oartifact == ART_VORPAL_BLADE &&
  1955. X!             (dieroll == 1 || mdef->data == &mons[PM_JABBERWOCK])) {
  1956. X! 
  1957. X!         static const char *behead_msg[2] = {
  1958. X!              "%s beheads %s!",
  1959. X!              "%s decapitates %s!"
  1960. X!         };
  1961. X! 
  1962. X          if (youattack && u.uswallow && mdef == u.ustuck)
  1963. X              return FALSE;
  1964. X          if (!youdefend) {
  1965. X***************
  1966. X*** 824,833 ****
  1967. X                  *dmgptr = 0;
  1968. X                  return (youattack || vis);
  1969. X              }
  1970. X              *dmgptr = mdef->mhp;
  1971. X!             pline("%s cuts off %s head!",
  1972. X!                     artilist[ART_VORPAL_BLADE].name,
  1973. X!                     s_suffix(mon_nam(mdef)));
  1974. X              otmp->dknown = TRUE;
  1975. X              return TRUE;
  1976. X          } else {
  1977. X--- 846,861 ----
  1978. X                  *dmgptr = 0;
  1979. X                  return (youattack || vis);
  1980. X              }
  1981. X+             if (noncorporeal(mdef->data) || amorphous(mdef->data)) {
  1982. X+                 pline("%s slices through %s neck.",
  1983. X+                       artilist[ART_VORPAL_BLADE].name,
  1984. X+                       s_suffix(mon_nam(mdef)));
  1985. X+                 return (youattack || vis);
  1986. X+             }
  1987. X              *dmgptr = mdef->mhp;
  1988. X!             pline(behead_msg[rn2(SIZE(behead_msg))],
  1989. X!                   artilist[ART_VORPAL_BLADE].name,
  1990. X!                   mon_nam(mdef));
  1991. X              otmp->dknown = TRUE;
  1992. X              return TRUE;
  1993. X          } else {
  1994. X***************
  1995. X*** 838,847 ****
  1996. X                  *dmgptr = 0;
  1997. X                  return TRUE;
  1998. X              }
  1999. X  #endif
  2000. X!             *dmgptr = u.uhp;
  2001. X!             pline("%s cuts off your head!",
  2002. X!                     artilist[ART_VORPAL_BLADE].name);
  2003. X              otmp->dknown = TRUE;
  2004. X              /* Should amulets fall off? */
  2005. X              return TRUE;
  2006. X--- 866,880 ----
  2007. X                  *dmgptr = 0;
  2008. X                  return TRUE;
  2009. X              }
  2010. X+             if (noncorporeal(uasmon) || amorphous(uasmon)) {
  2011. X+                 pline("%s slices through your neck.",
  2012. X+                       artilist[ART_VORPAL_BLADE].name);
  2013. X+                 return TRUE;
  2014. X+             }
  2015. X  #endif
  2016. X!             *dmgptr = u.uhp + 1234;
  2017. X!             pline(behead_msg[rn2(SIZE(behead_msg))],
  2018. X!                   artilist[ART_VORPAL_BLADE].name, "you");
  2019. X              otmp->dknown = TRUE;
  2020. X              /* Should amulets fall off? */
  2021. X              return TRUE;
  2022. X***************
  2023. X*** 1044,1053 ****
  2024. X        }
  2025. X      }
  2026. X      } else {
  2027. X!     boolean on;
  2028. X!     unsigned long cprop;
  2029. X!     cprop = u.uprops[oart->inv_prop].p_flgs ^= W_ARTI;
  2030. X!     on = (cprop & W_ARTI) != 0; /* did we just turn on the invoked prop? */
  2031. X  
  2032. X      if(on && obj->age > monstermoves) {
  2033. X          /* the artifact is tired :-) */
  2034. X--- 1077,1084 ----
  2035. X        }
  2036. X      }
  2037. X      } else {
  2038. X!     long cprop = (u.uprops[oart->inv_prop].p_flgs ^= W_ARTI);
  2039. X!     boolean on = (cprop & W_ARTI) != 0; /* true if invoked prop just set */
  2040. X  
  2041. X      if(on && obj->age > monstermoves) {
  2042. X          /* the artifact is tired :-) */
  2043. END_OF_FILE
  2044. if test 55493 -ne `wc -c <'patches02a'`; then
  2045.     echo shar: \"'patches02a'\" unpacked with wrong size!
  2046. fi
  2047. # end of 'patches02a'
  2048. if test -f 'sys/amiga/amitty.c' -a "${1}" != "-c" ; then 
  2049.   echo shar: Renaming existing file \"'sys/amiga/amitty.c'\" to \"'sys/amiga/amitty.c.orig'\"
  2050.   mv -f 'sys/amiga/amitty.c' 'sys/amiga/amitty.c.orig'
  2051. fi
  2052. echo shar: Extracting \"'sys/amiga/amitty.c'\" \(1512 characters\)
  2053. sed "s/^X//" >'sys/amiga/amitty.c' <<'END_OF_FILE'
  2054. X/*    SCCS Id: @(#)amitty.c     3.1    93/01/08
  2055. X/*    Copyright (c) Kenneth Lorber, Bethesda, Maryland 1993      */
  2056. X/* NetHack may be freely redistributed.  See license for details. */
  2057. X
  2058. X/* TTY-specific code for the Amiga */
  2059. X
  2060. X/* Still to do:
  2061. X * add command line switches for enough control to use as BBS door
  2062. X * add realy termcap handling - currently requires ANSI_DEFAULT
  2063. X * fix tids everywhere
  2064. X * fix commented out code that tries (and fails) to avoid problems with
  2065. X *  typeahead - we may need to resort to basic packet I/O. Sigh.
  2066. X * prototype and related cleanup
  2067. X */
  2068. X
  2069. X#include "hack.h"
  2070. X#include "termcap.h"
  2071. X#include <stdio.h>
  2072. X
  2073. Xvoid NDECL( get_scr_size );
  2074. Xvoid NDECL( tty_change_color );
  2075. Xchar *NDECL( tty_get_color_string );
  2076. X
  2077. X#ifdef TTY_GRAPHICS
  2078. Xvoid settty(const char *s){
  2079. X    end_screen();
  2080. X    if(s)raw_print(s);
  2081. X    flags.cbreak=ON;    /* this is too easy: probably wrong */
  2082. X#if 0 /* should be version>=36 */
  2083. X    if(IsInteractive(Input())){
  2084. X        SetMode(Input(),0);    /* con mode */
  2085. X    }
  2086. X#endif
  2087. X}
  2088. Xvoid gettty(){
  2089. X#if 0 /* should be VERSION >=36 */
  2090. X    if(IsInteractive(Input())){
  2091. X        SetMode(Input(),1);    /* raw mode */
  2092. X    }
  2093. X#endif
  2094. X}
  2095. Xvoid setftty(){
  2096. X    flags.cbreak=ON;    /* ditto */
  2097. X}
  2098. Xchar kill_char='X'-'@';
  2099. Xchar erase_char='\b';
  2100. Xtgetch(){
  2101. X#if 1
  2102. X    int x=getch();        /* can't use getch() - typeahead ends up stalling the
  2103. X                 * game (since it's a con:) */
  2104. X#else
  2105. X    int x;
  2106. X    Read(Input(),&x,1);
  2107. X#endif
  2108. X    return (x=='\r')?'\n':x;
  2109. X}
  2110. Xvoid get_scr_size(){
  2111. X    CO=80;
  2112. X    LI=24;
  2113. X}
  2114. X
  2115. X#endif
  2116. X
  2117. Xvoid tty_change_color() {}
  2118. Xchar *tty_get_color_string() { return( "" ); }
  2119. END_OF_FILE
  2120. if test 1512 -ne `wc -c <'sys/amiga/amitty.c'`; then
  2121.     echo shar: \"'sys/amiga/amitty.c'\" unpacked with wrong size!
  2122. fi
  2123. # end of 'sys/amiga/amitty.c'
  2124. if test -f 'sys/amiga/randwin.uu' -a "${1}" != "-c" ; then 
  2125.   echo shar: Renaming existing file \"'sys/amiga/randwin.uu'\" to \"'sys/amiga/randwin.uu.orig'\"
  2126.   mv -f 'sys/amiga/randwin.uu' 'sys/amiga/randwin.uu.orig'
  2127. fi
  2128. echo shar: Extracting \"'sys/amiga/randwin.uu'\" \(963 characters\)
  2129. sed "s/^X//" >'sys/amiga/randwin.uu' <<'END_OF_FILE'
  2130. Xbegin 664 randwin.pw
  2131. XM4&]W97)7:6YD;W=S('8R+C5C(*DQ.3@W+"`Q.3@X(&)Y($E.3U9!5%)/3DE#
  2132. XM4RP@24Y#+B`@("`@("`@("`@("`@("`@("`@("`@```"[`````E```#\````
  2133. XM`0`````!`````!!A;6EG83IR86YD=VEN+F,`!\\UT``````"@`#(``(``8``
  2134. XM``\`````!\L\^````````````````@````$``````0`````!``````R@H*``
  2135. XM``#P\/"00'`````!``(0``!(`D``!0`%_____P`````'SU_@````````````
  2136. XM```````````!!\\Z>```````!5)N9%\```$`K@`Z`/D`6@`%``7_____````
  2137. XM`0```````&,`00`P`!$````#``$'SUU4``````?/4?@`````````````!\]=
  2138. XM@/____\#```%!\]=9````````````#$````Q`!(````2```````````'``$`
  2139. XM``@`!0`````'SU(8``````````5/2T%9``````H````!!\]2*`?/7?@'SUX(
  2140. XM!\]>&`?/7B@'SUXX`````0`````!``````$``````C$``````0`````!``8`
  2141. XM`0``!P`&``````?/8``'SV`P````(EEO=2!A<VME9"!F;W(@82!R86YD;VT@
  2142. XM0VAA<F%C=&5R+@`&``$```\`$@`````'SV!0!\]@>````!Y)('1H:6YK('1H
  2143. XM870@>6]U('=I;&P@:&%V92!A;@`&``$``!D`'0`````'SV"8!\]@P````!EE
  2144. XM>&-I=&EN9R!G86UE('!L87EI;F<@87,``0`!``!#`"\`````!\]@X`?/80``
  2145. XM```10VAA<F%C=&5R($-H;VEC90`&``$``,8`'0`````'SUY(``````````)A
  2146. X!```1
  2147. X`
  2148. Xend
  2149. END_OF_FILE
  2150. if test 963 -ne `wc -c <'sys/amiga/randwin.uu'`; then
  2151.     echo shar: \"'sys/amiga/randwin.uu'\" unpacked with wrong size!
  2152. fi
  2153. # end of 'sys/amiga/randwin.uu'
  2154. echo shar: End of archive 8 \(of 33\).
  2155. cp /dev/null ark8isdone
  2156. MISSING=""
  2157. 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
  2158.     if test ! -f ark${I}isdone ; then
  2159.     MISSING="${MISSING} ${I}"
  2160.     fi
  2161. done
  2162. if test "${MISSING}" = "" ; then
  2163.     echo You have unpacked all 33 archives.
  2164.     echo "Now execute ./patchit.sh"
  2165.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2166. else
  2167.     echo You still need to unpack the following archives:
  2168.     echo "        " ${MISSING}
  2169. fi
  2170. ##  End of shell archive.
  2171. exit 0
  2172.