home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / games / volume16 / nethck31 / patch2c < prev    next >
Encoding:
Text File  |  1993-06-15  |  61.7 KB  |  2,258 lines

  1. Path: uunet!news.tek.com!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v17i078:  nethack31 - display oriented dungeons & dragons (Ver. 3.1), Patch2c/33
  5. Date: 11 Jun 1993 00:05:44 GMT
  6. Organization: Tektronix, Inc, Redmond, OR, USA
  7. Lines: 2245
  8. Approved: billr@saab.CNA.TEK.COM
  9. Message-ID: <1v8i8o$ipi@ying.cna.tek.com>
  10. NNTP-Posting-Host: saab.cna.tek.com
  11. Xref: uunet comp.sources.games:1766
  12.  
  13. Submitted-by: izchak@linc.cis.upenn.edu (Izchak Miller)
  14. Posting-number: Volume 17, Issue 78
  15. Archive-name: nethack31/Patch2c
  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 3 (of 33)."
  28. # Contents:  include/mttypriv.h patches02i
  29. # Wrapped by billr@saab on Thu Jun 10 16:55:00 1993
  30. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  31. if test -f 'include/mttypriv.h' -a "${1}" != "-c" ; then 
  32.   echo shar: Renaming existing file \"'include/mttypriv.h'\" to \"'include/mttypriv.h.orig'\"
  33.   mv -f 'include/mttypriv.h' 'include/mttypriv.h.orig'
  34. fi
  35. echo shar: Extracting \"'include/mttypriv.h'\" \(1297 characters\)
  36. sed "s/^X//" >'include/mttypriv.h' <<'END_OF_FILE'
  37. X/*    SCCS Id: @(#)mttypriv.h    3.1    93/03/01            */
  38. X/* Copyright (c) Jon W{tte 1993.                    */
  39. X/* NetHack may be freely redistributed.  See license for details.    */
  40. X
  41. X/*
  42. X * This file contains private structures used to implement the
  43. X * tty windows - note that these structures may change between
  44. X * minor releases!
  45. X */
  46. X
  47. X#ifndef _H_tty_private
  48. X# define _H_tty_private
  49. X
  50. X# ifndef _H_tty_public
  51. X#  include "mactty.h"
  52. X# endif
  53. X
  54. X#define TA_TO_RGB(ta,rgb) (((rgb).red=(((ta)>>16)&0xff)*257),((rgb).green=(((ta)>>8)&0xff)*257),\
  55. X    ((rgb).blue=((ta)&0xff)*257)),rgb
  56. X
  57. Xtypedef struct tty_record {
  58. X    void                * not_used ;
  59. X    WindowPtr            its_window ;
  60. X    GWorldPtr            its_window_world ;
  61. X    BitMap                its_bits ;
  62. X    GrafPtr                offscreen_port ;
  63. X    GWorldPtr            offscreen_world ;
  64. X#if CLIP_RECT_ONLY
  65. X    Rect                invalid_rect ;
  66. X#else
  67. X    RgnHandle            invalid_part ;
  68. X#endif
  69. X
  70. X    short                font_number ;
  71. X    short                font_size ;
  72. X    short                char_width ;
  73. X    short                row_height ;
  74. X    short                ascent_height ;
  75. X
  76. X    short                x_size ;
  77. X    short                y_size ;
  78. X    short                x_curs ;
  79. X    short                y_curs ;
  80. X
  81. X    long                attribute [ TTY_NUMBER_ATTRIBUTES ] ;
  82. X    long                last_cursor ;
  83. X
  84. X#if TTY_INPUT
  85. X    short                input_buffer_len ;
  86. X    short                input_buffer_limit ;
  87. X    char                * input_buffer ;
  88. X#endif
  89. X
  90. X    Boolean                was_allocated ;
  91. X    Boolean                curs_state ;
  92. X    Boolean                uses_gworld ;
  93. X} tty_record ;
  94. X
  95. X
  96. X#endif
  97. END_OF_FILE
  98. if test 1297 -ne `wc -c <'include/mttypriv.h'`; then
  99.     echo shar: \"'include/mttypriv.h'\" unpacked with wrong size!
  100. fi
  101. # end of 'include/mttypriv.h'
  102. if test -f 'patches02i' -a "${1}" != "-c" ; then 
  103.   echo shar: Renaming existing file \"'patches02i'\" to \"'patches02i.orig'\"
  104.   mv -f 'patches02i' 'patches02i.orig'
  105. fi
  106. echo shar: Extracting \"'patches02i'\" \(56999 characters\)
  107. sed "s/^X//" >'patches02i' <<'END_OF_FILE'
  108. X*** /tmp/da11426    Tue Jun  1 16:16:08 1993
  109. X--- src/topten.c    Tue May 25 15:33:42 1993
  110. X***************
  111. X*** 36,42 ****
  112. X  #define    POINTSMIN    1    /* must be > 0 */
  113. X  #define    ENTRYMAX    100    /* must be >= 10 */
  114. X  
  115. X! #ifndef MICRO
  116. X  #define    PERS_IS_UID        /* delete for PERSMAX per name; now per uid */
  117. X  #endif
  118. X  struct toptenentry {
  119. X--- 36,42 ----
  120. X  #define    POINTSMIN    1    /* must be > 0 */
  121. X  #define    ENTRYMAX    100    /* must be >= 10 */
  122. X  
  123. X! #if !defined(MICRO) && !defined(MAC)
  124. X  #define    PERS_IS_UID        /* delete for PERSMAX per name; now per uid */
  125. X  #endif
  126. X  struct toptenentry {
  127. X***************
  128. X*** 77,98 ****
  129. X      /* note: fscanf() below must read the record's terminating newline */
  130. X      final_fpos = tt->fpos = ftell(rfile);
  131. X  #endif
  132. X  #ifdef NO_SCAN_BRACK
  133. X      if(fscanf(rfile,"%6s %d %d %d %d %d %d %ld%*c%c%c %s %s%*c",
  134. X- #  define TTFIELDS 13
  135. X  #else
  136. X      if(fscanf(rfile, "%6s %d %d %d %d %d %d %ld %c%c %[^,],%[^\n]%*c",
  137. X- #  define TTFIELDS 12
  138. X  #endif
  139. X              tt->date, &tt->uid,
  140. X              &tt->deathdnum, &tt->deathlev,
  141. X              &tt->maxlvl, &tt->hp, &tt->maxhp, &tt->points,
  142. X              &tt->plchar, &tt->sex,
  143. X- #ifdef LATTICE    /* return value is broken also, sigh */
  144. X-             tt->name, tt->death) < 1)
  145. X- #else
  146. X              tt->name, tt->death) != TTFIELDS)
  147. X- #endif
  148. X  #undef TTFIELDS
  149. X          tt->points = 0;
  150. X      else {
  151. X--- 77,93 ----
  152. X      /* note: fscanf() below must read the record's terminating newline */
  153. X      final_fpos = tt->fpos = ftell(rfile);
  154. X  #endif
  155. X+ #define TTFIELDS 12
  156. X  #ifdef NO_SCAN_BRACK
  157. X      if(fscanf(rfile,"%6s %d %d %d %d %d %d %ld%*c%c%c %s %s%*c",
  158. X  #else
  159. X      if(fscanf(rfile, "%6s %d %d %d %d %d %d %ld %c%c %[^,],%[^\n]%*c",
  160. X  #endif
  161. X              tt->date, &tt->uid,
  162. X              &tt->deathdnum, &tt->deathlev,
  163. X              &tt->maxlvl, &tt->hp, &tt->maxhp, &tt->points,
  164. X              &tt->plchar, &tt->sex,
  165. X              tt->name, tt->death) != TTFIELDS)
  166. X  #undef TTFIELDS
  167. X          tt->points = 0;
  168. X      else {
  169. X***************
  170. X*** 208,217 ****
  171. X  
  172. X  #if defined(WIZARD) || defined(EXPLORE_MODE)
  173. X      if (wizard || discover) {
  174. X!         raw_print("");
  175. X!         raw_printf(
  176. X            "Since you were in %s mode, the score list will not be checked.",
  177. X              wizard ? "wizard" : "discover");
  178. X          return;
  179. X      }
  180. X  #endif
  181. X--- 203,214 ----
  182. X  
  183. X  #if defined(WIZARD) || defined(EXPLORE_MODE)
  184. X      if (wizard || discover) {
  185. X!         HUP {
  186. X!         raw_print("");
  187. X!         raw_printf(
  188. X            "Since you were in %s mode, the score list will not be checked.",
  189. X              wizard ? "wizard" : "discover");
  190. X+         }
  191. X          return;
  192. X      }
  193. X  #endif
  194. X***************
  195. X*** 533,538 ****
  196. X--- 530,543 ----
  197. X          return;
  198. X      }
  199. X  
  200. X+ #ifdef    AMIGA
  201. X+     {
  202. X+         extern winid amii_rawprwin;
  203. X+         init_nhwindows();
  204. X+         amii_rawprwin = create_nhwindow( NHW_TEXT );
  205. X+     }
  206. X+ #endif
  207. X+ 
  208. X      /* If the score list isn't after a game, we never went through */
  209. X      /* init_dungeons() */
  210. X      if (wiz1_level.dlevel == 0) init_dungeons();
  211. X***************
  212. X*** 556,562 ****
  213. X--- 561,571 ----
  214. X  #else
  215. X          player0 = plname;
  216. X          if(!*player0)
  217. X+ #ifdef AMIGA
  218. X+             player0 = "all";    /* single user system */
  219. X+ #else
  220. X              player0 = "hackplayer";
  221. X+ #endif
  222. X          playerct = 1;
  223. X          players = &player0;
  224. X  #endif
  225. X***************
  226. X*** 602,607 ****
  227. X--- 611,621 ----
  228. X                   hname);
  229. X          }
  230. X          }
  231. X+ #ifdef    AMIGA
  232. X+         display_nhwindow( amii_rawprwin, 1 );
  233. X+         destroy_nhwindow( amii_rawprwin );
  234. X+         amii_rawprwin = WIN_ERR;
  235. X+ #endif
  236. X          return;
  237. X      }
  238. X  
  239. X***************
  240. X*** 651,656 ****
  241. X--- 665,675 ----
  242. X          break;
  243. X      }
  244. X  #endif /* nonsense /**/
  245. X+ #ifdef    AMIGA
  246. X+     display_nhwindow( amii_rawprwin, 1 );
  247. X+     destroy_nhwindow( amii_rawprwin );
  248. X+     amii_rawprwin = WIN_ERR;
  249. X+ #endif
  250. X  }
  251. X  
  252. X  static int
  253. X*** /tmp/da11442    Tue Jun  1 16:16:12 1993
  254. X--- src/trap.c    Tue Jun  1 10:47:53 1993
  255. X***************
  256. X*** 1,8 ****
  257. X! /*    SCCS Id: @(#)trap.c    3.1    93/02/13    */
  258. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  259. X  /* NetHack may be freely redistributed.  See license for details. */
  260. X  
  261. X! #include    "hack.h"
  262. X  
  263. X  #ifdef OVLB
  264. X  const char *traps[TRAPNUM] = {
  265. X--- 1,8 ----
  266. X! /*    SCCS Id: @(#)trap.c    3.1    93/05/25    */
  267. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  268. X  /* NetHack may be freely redistributed.  See license for details. */
  269. X  
  270. X! #include "hack.h"
  271. X  
  272. X  #ifdef OVLB
  273. X  const char *traps[TRAPNUM] = {
  274. X***************
  275. X*** 125,133 ****
  276. X--- 125,135 ----
  277. X  register int x, y, typ;
  278. X  {
  279. X      register struct trap *ttmp;
  280. X+     register struct rm *lev;
  281. X      register boolean oldplace;
  282. X  
  283. X      if ((ttmp = t_at(x,y)) != 0) {
  284. X+         if (ttmp->ttyp == MAGIC_PORTAL) return (struct trap *)0;
  285. X          oldplace = TRUE;
  286. X          if (u.utrap && (x == u.ux) && (y == u.uy) && 
  287. X            ((u.utraptype == TT_BEARTRAP && typ != BEAR_TRAP) ||
  288. X***************
  289. X*** 148,156 ****
  290. X          case PIT:
  291. X          case SPIKED_PIT:
  292. X          case TRAPDOOR:
  293. X!         levl[x][y].doormask = 0;   /* subsumes altarmask, icedpool... */
  294. X!         if (IS_ROOM(levl[x][y].typ))
  295. X!             levl[x][y].typ = ROOM;
  296. X          break;
  297. X      }
  298. X      ttmp->tseen = 0;
  299. X--- 150,172 ----
  300. X          case PIT:
  301. X          case SPIKED_PIT:
  302. X          case TRAPDOOR:
  303. X!         lev = &levl[x][y];
  304. X!         lev->doormask = 0;    /* subsumes altarmask, icedpool... */
  305. X!         if (IS_ROOM(lev->typ)) /* && !IS_AIR(lev->typ) */
  306. X!             lev->typ = ROOM;
  307. X! #if defined(POLYSELF) || defined(MUSE)
  308. X!         /*
  309. X!          * some cases which can happen when digging
  310. X!          * down while phazing thru solid areas
  311. X!          */
  312. X!         else if (lev->typ == STONE || lev->typ == SCORR)
  313. X!             lev->typ = CORR;
  314. X!         else if (IS_WALL(lev->typ) ||
  315. X!              IS_DOOR(lev->typ) || lev->typ == SDOOR)
  316. X!             lev->typ = level.flags.is_maze_lev ? ROOM :
  317. X!                    level.flags.is_cavernous_lev ? CORR : DOOR;
  318. X! #endif
  319. X!         unearth_objs(x, y);
  320. X          break;
  321. X      }
  322. X      ttmp->tseen = 0;
  323. X***************
  324. X*** 181,187 ****
  325. X  # endif
  326. X      tmp2 = !sobj_at(BOULDER,x,y) && (trapok || !t_at(x,y));
  327. X      tmp3 = !(is_pool(x,y) &&
  328. X!            !(Levitation || Wwalking || Magical_breathing
  329. X  # ifdef POLYSELF
  330. X           || is_flyer(uasmon) || is_swimmer(uasmon)
  331. X           || is_clinger(uasmon)
  332. X--- 197,203 ----
  333. X  # endif
  334. X      tmp2 = !sobj_at(BOULDER,x,y) && (trapok || !t_at(x,y));
  335. X      tmp3 = !(is_pool(x,y) &&
  336. X!            !(Levitation || Wwalking || Amphibious
  337. X  # ifdef POLYSELF
  338. X           || is_flyer(uasmon) || is_swimmer(uasmon)
  339. X           || is_clinger(uasmon)
  340. X***************
  341. X*** 200,206 ****
  342. X          !MON_AT(x, y) &&
  343. X          !sobj_at(BOULDER,x,y) && (trapok || !t_at(x,y)) &&
  344. X          !(is_pool(x,y) &&
  345. X!         !(Levitation || Wwalking || Magical_breathing
  346. X  # ifdef POLYSELF
  347. X            || is_flyer(uasmon) || is_swimmer(uasmon)
  348. X            || is_clinger(uasmon)
  349. X--- 216,222 ----
  350. X          !MON_AT(x, y) &&
  351. X          !sobj_at(BOULDER,x,y) && (trapok || !t_at(x,y)) &&
  352. X          !(is_pool(x,y) &&
  353. X!         !(Levitation || Wwalking || Amphibious
  354. X  # ifdef POLYSELF
  355. X            || is_flyer(uasmon) || is_swimmer(uasmon)
  356. X            || is_clinger(uasmon)
  357. X***************
  358. X*** 273,279 ****
  359. X      } while(!rn2(4) && newlevel < dunlevs_in_dungeon(&u.uz));
  360. X  
  361. X      if(td) pline("A trap door opens up under you!");
  362. X!     else pline("The floor opens up under you!");
  363. X  
  364. X      if(Levitation || u.ustuck || !Can_fall_thru(&u.uz)
  365. X  #ifdef POLYSELF
  366. X--- 289,295 ----
  367. X      } while(!rn2(4) && newlevel < dunlevs_in_dungeon(&u.uz));
  368. X  
  369. X      if(td) pline("A trap door opens up under you!");
  370. X!     else pline("The %s opens up under you!", surface(u.ux,u.uy));
  371. X  
  372. X      if(Levitation || u.ustuck || !Can_fall_thru(&u.uz)
  373. X  #ifdef POLYSELF
  374. X***************
  375. X*** 937,944 ****
  376. X  
  377. X          case FIRE_TRAP:
  378. X              if (in_sight)
  379. X!         pline("A tower of flame bursts from the floor under %s!",
  380. X!                     mon_nam(mtmp));
  381. X              if(resists_fire(mptr)) {
  382. X                  if (in_sight) {
  383. X                  shieldeff(mtmp->mx,mtmp->my);
  384. X--- 953,960 ----
  385. X  
  386. X          case FIRE_TRAP:
  387. X              if (in_sight)
  388. X!              pline("A tower of flame bursts from the %s under %s!",
  389. X!                 surface(mtmp->mx,mtmp->my), mon_nam(mtmp));
  390. X              if(resists_fire(mptr)) {
  391. X                  if (in_sight) {
  392. X                  shieldeff(mtmp->mx,mtmp->my);
  393. X***************
  394. X*** 954,959 ****
  395. X--- 970,977 ----
  396. X              (void) destroy_mitem(mtmp, SCROLL_CLASS, AD_FIRE);
  397. X              (void) destroy_mitem(mtmp, SPBOOK_CLASS, AD_FIRE);
  398. X              (void) destroy_mitem(mtmp, POTION_CLASS, AD_FIRE);
  399. X+             if (is_ice(mtmp->mx,mtmp->my))
  400. X+                 melt_ice(mtmp->mx,mtmp->my);
  401. X              if (in_sight) seetrap(trap);
  402. X              break;
  403. X  
  404. X***************
  405. X*** 1055,1060 ****
  406. X--- 1073,1079 ----
  407. X              break;
  408. X  
  409. X          case TELEP_TRAP:
  410. X+             if(tele_restrict(mtmp)) break;
  411. X          case MAGIC_PORTAL:
  412. X  #ifdef WALKIES
  413. X              if(teleport_pet(mtmp)) {
  414. X***************
  415. X*** 1133,1139 ****
  416. X                  break; /* monsters usually don't set it off */
  417. X              if(is_flyer(mptr)) {
  418. X                  if (in_sight) {
  419. X!     pline("A trigger appears in a pile of soil below %s.", Monnam(mtmp));
  420. X                      seetrap(trap);
  421. X                  }
  422. X                  if (rn2(3)) break;
  423. X--- 1152,1158 ----
  424. X                  break; /* monsters usually don't set it off */
  425. X              if(is_flyer(mptr)) {
  426. X                  if (in_sight) {
  427. X!     pline("A trigger appears in a pile of soil below %s.", mon_nam(mtmp));
  428. X                      seetrap(trap);
  429. X                  }
  430. X                  if (rn2(3)) break;
  431. X***************
  432. X*** 1345,1353 ****
  433. X          default:
  434. X              dotrap(trap);
  435. X      }
  436. X!     if(!flags.nopick && OBJ_AT(u.ux, u.uy) &&
  437. X!        !Is_airlevel(&u.uz) && !Is_waterlevel(&u.uz) &&
  438. X!        (!is_pool(u.ux,u.uy) || Underwater))
  439. X          pickup(1);
  440. X      return 0;
  441. X  }
  442. X--- 1364,1370 ----
  443. X          default:
  444. X              dotrap(trap);
  445. X      }
  446. X!     if(!Is_airlevel(&u.uz) && !Is_waterlevel(&u.uz))
  447. X          pickup(1);
  448. X      return 0;
  449. X  }
  450. X***************
  451. X*** 1404,1409 ****
  452. X--- 1421,1439 ----
  453. X      (void) safe_teleds();
  454. X  }
  455. X  
  456. X+ boolean
  457. X+ tele_restrict(mon)
  458. X+ struct monst *mon;
  459. X+ {
  460. X+     if(level.flags.noteleport) {
  461. X+         if (canseemon(mon))
  462. X+             pline("A mysterious force prevents %s from teleporting!",
  463. X+             mon_nam(mon));
  464. X+         return TRUE;
  465. X+     }
  466. X+     return FALSE;
  467. X+ }
  468. X+ 
  469. X  void
  470. X  teleds(nux, nuy)
  471. X  register int nux,nuy;
  472. X***************
  473. X*** 1423,1433 ****
  474. X          u.uundetected = 0;
  475. X      if (u.usym == S_MIMIC_DEF) u.usym = S_MIMIC;
  476. X  #endif
  477. X-     if(Punished) placebc();
  478. X      if(u.uswallow){
  479. X          u.uswldtim = u.uswallow = 0;
  480. X          docrt();
  481. X      }
  482. X      initrack(); /* teleports mess up tracking monsters without this */
  483. X      /*
  484. X       *  Make sure the hero disappears from the old location.  This will
  485. X--- 1453,1463 ----
  486. X          u.uundetected = 0;
  487. X      if (u.usym == S_MIMIC_DEF) u.usym = S_MIMIC;
  488. X  #endif
  489. X      if(u.uswallow){
  490. X          u.uswldtim = u.uswallow = 0;
  491. X          docrt();
  492. X      }
  493. X+     if(Punished) placebc();
  494. X      initrack(); /* teleports mess up tracking monsters without this */
  495. X      /*
  496. X       *  Make sure the hero disappears from the old location.  This will
  497. X***************
  498. X*** 1446,1452 ****
  499. X  {
  500. X      struct trap *trap;
  501. X      boolean castit = FALSE;
  502. X!     register int sp_no = 0;
  503. X  
  504. X      trap = t_at(u.ux, u.uy);
  505. X      if (trap && (!trap->tseen || trap->ttyp != TELEP_TRAP))
  506. X--- 1476,1482 ----
  507. X  {
  508. X      struct trap *trap;
  509. X      boolean castit = FALSE;
  510. X!     register int sp_no = 0, energy;
  511. X  
  512. X      trap = t_at(u.ux, u.uy);
  513. X      if (trap && (!trap->tseen || trap->ttyp != TELEP_TRAP))
  514. X***************
  515. X*** 1503,1514 ****
  516. X      }
  517. X  
  518. X      if(!trap && (u.uhunger <= 100 || ACURR(A_STR) < 6)) {
  519. X-         You("lack the strength for a teleport spell.");
  520. X  #ifdef WIZARD
  521. X!         if(!wizard)
  522. X  #endif
  523. X!         return(1);
  524. X      }
  525. X      if(!trap &&
  526. X        check_capacity("Your concentration falters from carrying so much."))
  527. X          return 1;
  528. X--- 1533,1563 ----
  529. X      }
  530. X  
  531. X      if(!trap && (u.uhunger <= 100 || ACURR(A_STR) < 6)) {
  532. X  #ifdef WIZARD
  533. X!         if (!wizard) {
  534. X  #endif
  535. X!             You("lack the strength %s.",
  536. X!                 castit ? "for a teleport spell" : "to teleport");
  537. X!             return 1;
  538. X! #ifdef WIZARD
  539. X!         }
  540. X! #endif
  541. X      }
  542. X+ 
  543. X+     energy = objects[SPE_TELEPORT_AWAY].oc_level * 7 / 2 - 2;
  544. X+ 
  545. X+     if(!trap && u.uen <= energy) {
  546. X+ #ifdef WIZARD
  547. X+         if (!wizard) {
  548. X+ #endif
  549. X+             You("lack the energy %s.",
  550. X+                 castit ? "for a teleport spell" : "to teleport");
  551. X+             return 1;
  552. X+ #ifdef WIZARD
  553. X+         } else u.uen = energy;
  554. X+ #endif
  555. X+     }
  556. X+ 
  557. X      if(!trap &&
  558. X        check_capacity("Your concentration falters from carrying so much."))
  559. X          return 1;
  560. X***************
  561. X*** 1522,1528 ****
  562. X              if (!wizard)
  563. X  #endif
  564. X              return(0);
  565. X!     }
  566. X  #ifdef WALKIES
  567. X      if(next_to_u()) {
  568. X  #endif
  569. X--- 1571,1579 ----
  570. X              if (!wizard)
  571. X  #endif
  572. X              return(0);
  573. X!     } else if (!trap)
  574. X!         u.uen -= energy;
  575. X! 
  576. X  #ifdef WALKIES
  577. X      if(next_to_u()) {
  578. X  #endif
  579. X***************
  580. X*** 1729,1735 ****
  581. X       * SCR_FIRE by GAN 11/02/86
  582. X       */
  583. X  
  584. X!     pline("A tower of flame bursts from the floor!");
  585. X      if(Fire_resistance) {
  586. X          shieldeff(u.ux, u.uy);
  587. X          You("are uninjured.");
  588. X--- 1780,1786 ----
  589. X       * SCR_FIRE by GAN 11/02/86
  590. X       */
  591. X  
  592. X!     pline("A tower of flame bursts from the %s!", surface(u.ux,u.uy));
  593. X      if(Fire_resistance) {
  594. X          shieldeff(u.ux, u.uy);
  595. X          You("are uninjured.");
  596. X***************
  597. X*** 1741,1746 ****
  598. X--- 1792,1799 ----
  599. X      destroy_item(SCROLL_CLASS, AD_FIRE);
  600. X      destroy_item(SPBOOK_CLASS, AD_FIRE);
  601. X      destroy_item(POTION_CLASS, AD_FIRE);
  602. X+     if (is_ice(u.ux, u.uy))
  603. X+         melt_ice(u.ux, u.uy);
  604. X  }
  605. X  
  606. X  static void
  607. X***************
  608. X*** 1888,1895 ****
  609. X          } else if(is_rustprone(obj) && obj->oeroded < MAX_ERODE &&
  610. X                !(obj->oerodeproof || (obj->blessed && !rnl(4))) &&
  611. X                (force || rn2(12) > Luck)) {
  612. X!             /* all metal stuff and armor except body armor
  613. X!                protected by oilskin cloak */
  614. X              if(obj->oclass != ARMOR_CLASS || obj != uarm ||
  615. X                 !uarmc || uarmc->otyp != OILSKIN_CLOAK ||
  616. X                  (uarmc->cursed && !rn2(3)))
  617. X--- 1941,1948 ----
  618. X          } else if(is_rustprone(obj) && obj->oeroded < MAX_ERODE &&
  619. X                !(obj->oerodeproof || (obj->blessed && !rnl(4))) &&
  620. X                (force || rn2(12) > Luck)) {
  621. X!             /* all metal stuff and armor except (body armor
  622. X!                protected by oilskin cloak) */
  623. X              if(obj->oclass != ARMOR_CLASS || obj != uarm ||
  624. X                 !uarmc || uarmc->otyp != OILSKIN_CLOAK ||
  625. X                  (uarmc->cursed && !rn2(3)))
  626. X***************
  627. X*** 1965,1971 ****
  628. X  #ifdef POLYSELF
  629. X           is_swimmer(uasmon) ||
  630. X  #endif
  631. X!          Magical_breathing)) {
  632. X          /* water effects on objects every now and then */
  633. X          if (!rn2(5)) inpool_ok = TRUE;
  634. X          else return(FALSE);
  635. X--- 2018,2024 ----
  636. X  #ifdef POLYSELF
  637. X           is_swimmer(uasmon) ||
  638. X  #endif
  639. X!          Amphibious)) {
  640. X          /* water effects on objects every now and then */
  641. X          if (!rn2(5)) inpool_ok = TRUE;
  642. X          else return(FALSE);
  643. X***************
  644. X*** 1972,1979 ****
  645. X      }
  646. X  
  647. X      if (!u.uinwater) {
  648. X!         You("%s into the water!",
  649. X!         Is_waterlevel(&u.uz) ? "plunge" : "fall");
  650. X  #ifdef POLYSELF
  651. X          if(!is_swimmer(uasmon))
  652. X  #endif
  653. X--- 2025,2033 ----
  654. X      }
  655. X  
  656. X      if (!u.uinwater) {
  657. X!         You("%s into the water%c",
  658. X!         Is_waterlevel(&u.uz) ? "plunge" : "fall",
  659. X!         Amphibious ? '.' : '!');
  660. X  #ifdef POLYSELF
  661. X          if(!is_swimmer(uasmon))
  662. X  #endif
  663. X***************
  664. X*** 1992,2005 ****
  665. X              You("multiply.");
  666. X          }
  667. X      }
  668. X- 
  669. X-     if(is_swimmer(uasmon) && !inpool_ok) {
  670. X-         if (Punished) placebc();
  671. X-         u.uinwater = 1;
  672. X-         under_water(1);
  673. X-         vision_full_recalc = 1;
  674. X-         return(FALSE);
  675. X-     }
  676. X  #endif
  677. X      if (inpool_ok) return(FALSE);
  678. X  #ifdef WALKIES
  679. X--- 2046,2051 ----
  680. X***************
  681. X*** 2010,2021 ****
  682. X          unleash_all();
  683. X      }
  684. X  #endif
  685. X!     if (Magical_breathing) {
  686. X!         pline("But wait!");
  687. X!         Your("lungs start acting like gills.");
  688. X!         if (!Is_waterlevel(&u.uz))
  689. X!             Your("%s the bottom.",Hallucination ? "keel hits" : "feet touch");
  690. X!         if (Punished) placebc();
  691. X          u.uinwater = 1;
  692. X          under_water(1);
  693. X          vision_full_recalc = 1;
  694. X--- 2056,2079 ----
  695. X          unleash_all();
  696. X      }
  697. X  #endif
  698. X!     if (Amphibious
  699. X! #ifdef POLYSELF
  700. X!             || is_swimmer(uasmon)
  701. X! #endif
  702. X!                         ) {
  703. X!         if (Amphibious) {
  704. X!             if (flags.verbose)
  705. X!                 pline("But you aren't drowning.");
  706. X!             if (!Is_waterlevel(&u.uz))
  707. X!                 if (Hallucination) 
  708. X!                     Your("keel hits the bottom.");
  709. X!                 else
  710. X!                     You("touch bottom.");
  711. X!         }
  712. X!         if (Punished) {
  713. X!             unplacebc();
  714. X!             placebc();
  715. X!         }
  716. X          u.uinwater = 1;
  717. X          under_water(1);
  718. X          vision_full_recalc = 1;
  719. X***************
  720. X*** 2076,2083 ****
  721. X              done(DROWNING);
  722. X          }
  723. X      u.uinwater = 0;
  724. X!     You("find yourself back %s.",Is_waterlevel(&u.uz) ?
  725. X!         "in an air bubble" : "on dry land");
  726. X      return(TRUE);
  727. X  }
  728. X  
  729. X--- 2134,2141 ----
  730. X              done(DROWNING);
  731. X          }
  732. X      u.uinwater = 0;
  733. X!     You("find yourself back %s.", Is_waterlevel(&u.uz) ?
  734. X!         "in an air bubble" : "on land");
  735. X      return(TRUE);
  736. X  }
  737. X  
  738. X***************
  739. X*** 2216,2222 ****
  740. X              if(!force && (confused || Fumbling || 
  741. X                               rnd(75+level_difficulty()/2) > ch)) {
  742. X                  You("set it off!");
  743. X!                 b_trapped("door");
  744. X              } else
  745. X                  You("disarm it!");
  746. X              levl[x][y].doormask &= ~D_TRAPPED;
  747. X--- 2274,2280 ----
  748. X              if(!force && (confused || Fumbling || 
  749. X                               rnd(75+level_difficulty()/2) > ch)) {
  750. X                  You("set it off!");
  751. X!                 b_trapped("door", FINGER);
  752. X              } else
  753. X                  You("disarm it!");
  754. X              levl[x][y].doormask &= ~D_TRAPPED;
  755. X***************
  756. X*** 2327,2333 ****
  757. X          case 14:
  758. X          case 13:
  759. X              You("feel a needle prick your %s.",body_part(bodypart));
  760. X!             poisoned("needle", A_CON, "poison needle",10);
  761. X              exercise(A_CON, FALSE);
  762. X              break;
  763. X          case 12:
  764. X--- 2385,2391 ----
  765. X          case 14:
  766. X          case 13:
  767. X              You("feel a needle prick your %s.",body_part(bodypart));
  768. X!             poisoned("needle", A_CON, "poisoned needle",10);
  769. X              exercise(A_CON, FALSE);
  770. X              break;
  771. X          case 12:
  772. X***************
  773. X*** 2343,2348 ****
  774. X--- 2401,2408 ----
  775. X              destroy_item(SCROLL_CLASS, AD_FIRE);
  776. X              destroy_item(SPBOOK_CLASS, AD_FIRE);
  777. X              destroy_item(POTION_CLASS, AD_FIRE);
  778. X+             if (is_ice(u.ux, u.uy))
  779. X+                 melt_ice(u.ux, u.uy);
  780. X              break;
  781. X          case 8:
  782. X          case 7:
  783. X***************
  784. X*** 2422,2440 ****
  785. X      dealloc_trap(trap);
  786. X  }
  787. X  
  788. X! /* used for doors.  can be used for anything else that opens. */
  789. X  void
  790. X! b_trapped(item)
  791. X  register const char *item;
  792. X  {
  793. X      register int lvl = level_difficulty();
  794. X!     int dmg = rnd(5 + (lvl<5 ? lvl : 2+lvl/2));
  795. X  
  796. X      pline("KABOOM!!  %s was booby-trapped!", The(item));
  797. X!     if (u.ulevel < 4 && lvl < 3 && !rnl(3))
  798. X!         You("are shaken, but luckily unhurt.");        
  799. X!     else losehp(dmg, "explosion", KILLED_BY_AN);
  800. X      exercise(A_STR, FALSE);
  801. X      make_stunned(HStun + dmg, TRUE);
  802. X  }
  803. X  
  804. X--- 2482,2500 ----
  805. X      dealloc_trap(trap);
  806. X  }
  807. X  
  808. X! /* used for doors (also tins).  can be used for anything else that opens. */
  809. X  void
  810. X! b_trapped(item, bodypart)
  811. X  register const char *item;
  812. X+ register int bodypart;
  813. X  {
  814. X      register int lvl = level_difficulty();
  815. X!     int dmg = rnd(5 + (lvl < 5 ? lvl : 2+lvl/2));
  816. X  
  817. X      pline("KABOOM!!  %s was booby-trapped!", The(item));
  818. X!     losehp(dmg, "explosion", KILLED_BY_AN);
  819. X      exercise(A_STR, FALSE);
  820. X+     if (bodypart) exercise(A_CON, FALSE);
  821. X      make_stunned(HStun + dmg, TRUE);
  822. X  }
  823. X  
  824. X*** /tmp/da11450    Tue Jun  1 16:16:16 1993
  825. X--- src/u_init.c    Tue Apr 27 17:00:42 1993
  826. X***************
  827. X*** 1,4 ****
  828. X! /*    SCCS Id: @(#)u_init.c    3.1    93/02/21    */
  829. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  830. X  /* NetHack may be freely redistributed.  See license for details. */
  831. X  
  832. X--- 1,4 ----
  833. X! /*    SCCS Id: @(#)u_init.c    3.1    93/04/24    */
  834. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  835. X  /* NetHack may be freely redistributed.  See license for details. */
  836. X  
  837. X***************
  838. X*** 368,374 ****
  839. X               * generators are bad enough to seriously skew the
  840. X               * results if we use rn2(2)...  --KAA
  841. X               */
  842. X! 
  843. X          /*
  844. X           * Elves are people of music and song, or they are warriors.
  845. X           * Warriors get mithril coats; non-warriors MAY get an
  846. X--- 368,374 ----
  847. X               * generators are bad enough to seriously skew the
  848. X               * results if we use rn2(2)...  --KAA
  849. X               */
  850. X!         ini_inv(Elf);
  851. X          /*
  852. X           * Elves are people of music and song, or they are warriors.
  853. X           * Warriors get mithril coats; non-warriors MAY get an
  854. X***************
  855. X*** 375,396 ****
  856. X           * instrument.  We use a kludge to get only non-magic
  857. X           * instruments.
  858. X           */
  859. X!         if (Elf[E_ARMOR].trotyp == ELVEN_CLOAK) {
  860. X!             if (!rn2(5)) {
  861. X!                 static int trotyp[] = {
  862. X!                     WOODEN_FLUTE, TOOLED_HORN, WOODEN_HARP,
  863. X!                     BELL, BUGLE, LEATHER_DRUM
  864. X!                 };
  865. X! 
  866. X!                 Instrument[0].trotyp = trotyp[rn2(SIZE(trotyp))];
  867. X! #ifdef DEBUG
  868. X!                 debugpline("Elf got instrument %d",
  869. X!                     Instrument[0].trotyp);
  870. X! #endif
  871. X!                 ini_inv(Instrument);
  872. X!             }
  873. X          }
  874. X-         ini_inv(Elf);
  875. X          if(!rn2(5)) ini_inv(Blindfold);
  876. X          else if(!rn2(6)) ini_inv(Lamp);
  877. X          knows_object(ELVEN_SHORT_SWORD);
  878. X--- 375,388 ----
  879. X           * instrument.  We use a kludge to get only non-magic
  880. X           * instruments.
  881. X           */
  882. X!         if (Elf[E_ARMOR].trotyp == ELVEN_CLOAK && !rn2(5)) {
  883. X!             static int trotyp[] = {
  884. X!             WOODEN_FLUTE, TOOLED_HORN, WOODEN_HARP,
  885. X!             BELL, BUGLE, LEATHER_DRUM
  886. X!             };
  887. X!             Instrument[0].trotyp = trotyp[rn2(SIZE(trotyp))];
  888. X!             ini_inv(Instrument);
  889. X          }
  890. X          if(!rn2(5)) ini_inv(Blindfold);
  891. X          else if(!rn2(6)) ini_inv(Lamp);
  892. X          knows_object(ELVEN_SHORT_SWORD);
  893. X*** /tmp/da11458    Tue Jun  1 16:16:19 1993
  894. X--- src/uhitm.c    Tue Jun  1 14:25:48 1993
  895. X***************
  896. X*** 323,328 ****
  897. X--- 323,330 ----
  898. X          }
  899. X  #endif
  900. X      } else {
  901. X+         int oldhp = mon->mhp;
  902. X+ 
  903. X          /* we hit the monster; be careful: it might die! */
  904. X          notonhead = (mon->mx != u.ux+u.dx || mon->my != u.uy+u.dy);
  905. X          if((malive = hmon(mon, uwep, 0)) == TRUE) {
  906. X***************
  907. X*** 337,343 ****
  908. X                                  )
  909. X                  u.ustuck = 0;
  910. X          }
  911. X!         if (mon->wormno) cutworm(mon, u.ux+u.dx, u.uy+u.dy, uwep);
  912. X          }
  913. X          if(mon->ispriest && !rn2(2)) ghod_hitsu(mon);
  914. X          if(special) (void) angry_guards(!flags.soundok);
  915. X--- 339,350 ----
  916. X                                  )
  917. X                  u.ustuck = 0;
  918. X          }
  919. X!         /* If no damage was done (Vorpal Blade and not on head)
  920. X!          * do not cut the worm.  We lost the information long ago, so
  921. X!          * we must do this by checking the hit points.
  922. X!          */
  923. X!         if (mon->wormno && mon->mhp < oldhp)
  924. X!             cutworm(mon, u.ux+u.dx, u.uy+u.dy, uwep);
  925. X          }
  926. X          if(mon->ispriest && !rn2(2)) ghod_hitsu(mon);
  927. X          if(special) (void) angry_guards(!flags.soundok);
  928. X***************
  929. X*** 1347,1359 ****
  930. X              if (mon->data == &mons[PM_SHADE])
  931. X                  Your("hug passes harmlessly through %s.",
  932. X                  mon_nam(mon));
  933. X!             else if (!sticks(mon->data))
  934. X                  if (mon==u.ustuck) {
  935. X                  pline("%s is being %s.", Monnam(mon),
  936. X                      u.umonnum==PM_ROPE_GOLEM ? "choked":
  937. X                      "crushed");
  938. X                  sum[i] = damageum(mon, mattk);
  939. X!                 } else if(sum[i-1] && sum[i-2]) {
  940. X                  You("grab %s!", mon_nam(mon));
  941. X                  u.ustuck = mon;
  942. X                  sum[i] = damageum(mon, mattk);
  943. X--- 1354,1366 ----
  944. X              if (mon->data == &mons[PM_SHADE])
  945. X                  Your("hug passes harmlessly through %s.",
  946. X                  mon_nam(mon));
  947. X!             else if (!sticks(mon->data) && !u.uswallow)
  948. X                  if (mon==u.ustuck) {
  949. X                  pline("%s is being %s.", Monnam(mon),
  950. X                      u.umonnum==PM_ROPE_GOLEM ? "choked":
  951. X                      "crushed");
  952. X                  sum[i] = damageum(mon, mattk);
  953. X!                 } else if(i >= 2 && sum[i-1] && sum[i-2]) {
  954. X                  You("grab %s!", mon_nam(mon));
  955. X                  u.ustuck = mon;
  956. X                  sum[i] = damageum(mon, mattk);
  957. X***************
  958. X*** 1526,1532 ****
  959. X              } else {
  960. X                  You("are frozen by %s gaze!", 
  961. X                    s_suffix(mon_nam(mon)));
  962. X!                 nomul((ACURR(A_WIS) > 12 || rn2(4)) ? -tmp : -120);
  963. X              }
  964. X              } else {
  965. X              pline("%s cannot defend itself.",
  966. X--- 1533,1539 ----
  967. X              } else {
  968. X                  You("are frozen by %s gaze!", 
  969. X                    s_suffix(mon_nam(mon)));
  970. X!                 nomul((ACURR(A_WIS) > 12 || rn2(4)) ? -tmp : -127);
  971. X              }
  972. X              } else {
  973. X              pline("%s cannot defend itself.",
  974. X*** /tmp/da11466    Tue Jun  1 16:16:22 1993
  975. X--- src/vault.c    Tue Jun  1 12:12:46 1993
  976. X***************
  977. X*** 1,4 ****
  978. X! /*    SCCS Id: @(#)vault.c    3.1    93/01/15    */
  979. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  980. X  /* NetHack may be freely redistributed.  See license for details. */
  981. X  
  982. X--- 1,4 ----
  983. X! /*    SCCS Id: @(#)vault.c    3.1    93/03/30    */
  984. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  985. X  /* NetHack may be freely redistributed.  See license for details. */
  986. X  
  987. X***************
  988. X*** 41,47 ****
  989. X              }
  990. X          }
  991. X          levl[fcx][fcy].typ = EGD(grd)->fakecorr[fcbeg].ftyp;
  992. X!         map_background(fcx,fcy, 1);
  993. X          if(!ACCESSIBLE(levl[fcx][fcy].typ)) block_point(fcx,fcy);
  994. X          EGD(grd)->fcbeg++;
  995. X      }
  996. X--- 41,47 ----
  997. X              }
  998. X          }
  999. X          levl[fcx][fcy].typ = EGD(grd)->fakecorr[fcbeg].ftyp;
  1000. X!         map_location(fcx, fcy, 1);    /* bypass vision */
  1001. X          if(!ACCESSIBLE(levl[fcx][fcy].typ)) block_point(fcx,fcy);
  1002. X          EGD(grd)->fcbeg++;
  1003. X      }
  1004. X***************
  1005. X*** 331,338 ****
  1006. X          if(!IS_WALL(levl[x][y].typ) && !in_fcorridor(grd, x, y)) {
  1007. X              if(MON_AT(x, y) && grd->mx != x && grd->my != y) {
  1008. X              struct monst *mon = m_at(x,y);
  1009. X!             if (mon->data->msound != MS_SILENT)
  1010. X!                 yelp(mon);
  1011. X              rloc(mon);
  1012. X              }
  1013. X              if ((gold = g_at(x, y)) != 0) {
  1014. X--- 331,339 ----
  1015. X          if(!IS_WALL(levl[x][y].typ) && !in_fcorridor(grd, x, y)) {
  1016. X              if(MON_AT(x, y) && grd->mx != x && grd->my != y) {
  1017. X              struct monst *mon = m_at(x,y);
  1018. X! #ifdef SOUNDS
  1019. X!             yelp(mon);
  1020. X! #endif
  1021. X              rloc(mon);
  1022. X              }
  1023. X              if ((gold = g_at(x, y)) != 0) {
  1024. X***************
  1025. X*** 367,374 ****
  1026. X          if(!IS_WALL(levl[x][y].typ) && !in_fcorridor(grd, x, y)) {
  1027. X              if(MON_AT(x, y) && grd->mx != x && grd->my != y) {
  1028. X              struct monst *mon = m_at(x,y);
  1029. X!             if (mon->data->msound != MS_SILENT)
  1030. X!                 yelp(mon);
  1031. X              rloc(mon);
  1032. X              }
  1033. X              if ((gold = g_at(x, y)) != 0) {
  1034. X--- 368,376 ----
  1035. X          if(!IS_WALL(levl[x][y].typ) && !in_fcorridor(grd, x, y)) {
  1036. X              if(MON_AT(x, y) && grd->mx != x && grd->my != y) {
  1037. X              struct monst *mon = m_at(x,y);
  1038. X! #ifdef SOUNDS
  1039. X!             yelp(mon);
  1040. X! #endif
  1041. X              rloc(mon);
  1042. X              }
  1043. X              if ((gold = g_at(x, y)) != 0) {
  1044. X***************
  1045. X*** 724,731 ****
  1046. X      register struct obj *obj;
  1047. X  
  1048. X      for (obj = invent; obj; obj = obj->nobj)
  1049. X!         if (Is_container(obj))
  1050. X          value += contained_gold(obj);
  1051. X  
  1052. X      return(value);
  1053. X  }
  1054. X--- 726,734 ----
  1055. X      register struct obj *obj;
  1056. X  
  1057. X      for (obj = invent; obj; obj = obj->nobj)
  1058. X!         if (Has_contents(obj))
  1059. X          value += contained_gold(obj);
  1060. X+     /* unknown gold stuck inside statues may cause some consternation... */
  1061. X  
  1062. X      return(value);
  1063. X  }
  1064. X*** /tmp/da11474    Tue Jun  1 16:16:24 1993
  1065. X--- src/version.c    Mon Apr 19 16:59:52 1993
  1066. X***************
  1067. X*** 5,11 ****
  1068. X  #include    "hack.h"
  1069. X  #include    "date.h"
  1070. X  #ifndef BETA
  1071. X! # if defined(MICRO) && !defined(AMIGA) && !defined(TOS) && !defined(OS2_HPFS)
  1072. X  # include    "patchlev.h"
  1073. X  # else
  1074. X  # include    "patchlevel.h"
  1075. X--- 5,11 ----
  1076. X  #include    "hack.h"
  1077. X  #include    "date.h"
  1078. X  #ifndef BETA
  1079. X! # ifdef SHORT_FILENAMES
  1080. X  # include    "patchlev.h"
  1081. X  # else
  1082. X  # include    "patchlevel.h"
  1083. X***************
  1084. X*** 16,28 ****
  1085. X  doversion()
  1086. X  {
  1087. X  #ifdef BETA
  1088. X!     pline("%s NetHack Beta Version %s - last build %s.",
  1089. X  #else
  1090. X!     pline("%s NetHack Version %s.%d - last build %s.",
  1091. X  #endif
  1092. X!         PORT_ID, VERSION,
  1093. X! #ifndef BETA
  1094. X!         PATCHLEVEL,
  1095. X  #endif
  1096. X          BUILD_DATE);    /* from date.h, generated by 'makedefs' */
  1097. X      return 0;
  1098. X--- 16,28 ----
  1099. X  doversion()
  1100. X  {
  1101. X  #ifdef BETA
  1102. X!     pline("%s NetHack Beta Version %d.%d.%d-%d - last build %s.",
  1103. X  #else
  1104. X!     pline("%s NetHack Version %d.%d.%d - last build %s.",
  1105. X  #endif
  1106. X!         PORT_ID, VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL,
  1107. X! #ifdef BETA
  1108. X!         EDITLEVEL,
  1109. X  #endif
  1110. X          BUILD_DATE);    /* from date.h, generated by 'makedefs' */
  1111. X      return 0;
  1112. X*** /tmp/da11482    Tue Jun  1 16:16:27 1993
  1113. X--- src/vision.c    Mon Mar 29 14:33:20 1993
  1114. X***************
  1115. X*** 1,4 ****
  1116. X! /*    SCCS Id: @(#)vision.c    3.1    92/11/14    */
  1117. X  /* Copyright (c) Dean Luick, with acknowledgements to Dave Cohrs, 1990.    */
  1118. X  /* NetHack may be freely redistributed.  See license for details.    */
  1119. X  #include "hack.h"
  1120. X--- 1,4 ----
  1121. X! /*    SCCS Id: @(#)vision.c    3.1    93/03/28    */
  1122. X  /* Copyright (c) Dean Luick, with acknowledgements to Dave Cohrs, 1990.    */
  1123. X  /* NetHack may be freely redistributed.  See license for details.    */
  1124. X  #include "hack.h"
  1125. X***************
  1126. X*** 300,306 ****
  1127. X      char *rmin, *rmax;
  1128. X  {
  1129. X      int rnum = levl[u.ux][u.uy].roomno - ROOMOFFSET; /* no SHARED... */
  1130. X!     int start, stop, in_door;
  1131. X      register int zx, zy;
  1132. X  
  1133. X      /* If in a lit room, we are able to see to its boundaries. */
  1134. X--- 300,306 ----
  1135. X      char *rmin, *rmax;
  1136. X  {
  1137. X      int rnum = levl[u.ux][u.uy].roomno - ROOMOFFSET; /* no SHARED... */
  1138. X!     int start, stop, in_door, xhi, xlo, yhi, ylo;
  1139. X      register int zx, zy;
  1140. X  
  1141. X      /* If in a lit room, we are able to see to its boundaries. */
  1142. X***************
  1143. X*** 323,333 ****
  1144. X      in_door = levl[u.ux][u.uy].typ == DOOR;
  1145. X  
  1146. X      /* Can always see adjacent. */
  1147. X!     for (zy = u.uy-1; zy <= u.uy+1; zy++) {
  1148. X!     rmin[zy] = min(rmin[zy],u.ux-1);
  1149. X!     rmax[zy] = max(rmax[zy],u.ux+1);
  1150. X  
  1151. X!     for (zx = u.ux-1; zx <= u.ux+1; zx++) {
  1152. X          next[zy][zx] = COULD_SEE | IN_SIGHT;
  1153. X          /*
  1154. X           * Yuck, update adjacent non-diagonal positions when in a doorway.
  1155. X--- 323,337 ----
  1156. X      in_door = levl[u.ux][u.uy].typ == DOOR;
  1157. X  
  1158. X      /* Can always see adjacent. */
  1159. X!     ylo = max(u.uy - 1, 0);
  1160. X!     yhi = min(u.uy + 1, ROWNO - 1);
  1161. X!     xlo = max(u.ux - 1, 1);
  1162. X!     xhi = min(u.ux + 1, COLNO - 1);
  1163. X!     for (zy = ylo; zy <= yhi; zy++) {
  1164. X!     if (xlo < rmin[zy]) rmin[zy] = xlo;
  1165. X!     if (xhi > rmax[zy]) rmax[zy] = xhi;
  1166. X  
  1167. X!     for (zx = xlo; zx <= xhi; zx++) {
  1168. X          next[zy][zx] = COULD_SEE | IN_SIGHT;
  1169. X          /*
  1170. X           * Yuck, update adjacent non-diagonal positions when in a doorway.
  1171. X*** /tmp/da11490    Tue Jun  1 16:16:31 1993
  1172. X--- src/weapon.c    Wed Mar  3 14:34:34 1993
  1173. X***************
  1174. X*** 462,488 ****
  1175. X      mon->weapon_check = NEED_WEAPON;
  1176. X      return 0;
  1177. X  }
  1178. X- 
  1179. X- /* rearrange a monster's inventory so that wielded weapon is first */
  1180. X- void
  1181. X- sort_mwep(mon)
  1182. X- struct monst *mon;
  1183. X- {
  1184. X-     struct obj *otmp, *prev, *mw_tmp = MON_WEP(mon);
  1185. X- 
  1186. X-     if (!mw_tmp) return;
  1187. X-     for (otmp = mon->minvent, prev = 0; otmp; otmp = otmp->nobj) {
  1188. X-         if (otmp == mw_tmp)  break;
  1189. X-         prev = otmp;
  1190. X-     }
  1191. X-     if (!otmp) {
  1192. X-         MON_NOWEP(mon);
  1193. X-     } else if (prev) {
  1194. X-         prev->nobj = otmp->nobj;
  1195. X-         otmp->nobj = mon->minvent;
  1196. X-         mon->minvent = otmp;
  1197. X-     }
  1198. X- }
  1199. X  #endif
  1200. X  
  1201. X  int
  1202. X--- 462,467 ----
  1203. X*** /tmp/da11514    Tue Jun  1 16:16:36 1993
  1204. X--- src/windows.c    Tue Apr 13 17:37:55 1993
  1205. X***************
  1206. X*** 17,22 ****
  1207. X--- 17,25 ----
  1208. X  #endif
  1209. X  #ifdef AMIGA_INTUITION
  1210. X  extern struct window_procs amii_procs ;
  1211. X+ extern struct window_procs amiv_procs ;
  1212. X+ extern void NDECL( amii_loadlib );
  1213. X+ extern void NDECL( amiv_loadlib );
  1214. X  #endif
  1215. X  
  1216. X  NEARDATA struct window_procs windowprocs;
  1217. X***************
  1218. X*** 36,42 ****
  1219. X      { & mac_procs , NULL } ,
  1220. X  #endif
  1221. X  #ifdef AMIGA_INTUITION
  1222. X!     { & amii_procs , NULL } ,
  1223. X  #endif
  1224. X      { 0, 0 }        /* must be last */
  1225. X  };
  1226. X--- 39,51 ----
  1227. X      { & mac_procs , NULL } ,
  1228. X  #endif
  1229. X  #ifdef AMIGA_INTUITION
  1230. X!     /* A shared library is used for implementing the access to these two
  1231. X!      * different display mechanisms.  This means that the function names
  1232. X!      * are actually the same (assembler stubs) and the libraries do different
  1233. X!      * things.
  1234. X!      */
  1235. X!     { & amii_procs , amii_loadlib } ,
  1236. X!     { & amiv_procs , amiv_loadlib } ,
  1237. X  #endif
  1238. X      { 0, 0 }        /* must be last */
  1239. X  };
  1240. X*** /tmp/da11522    Tue Jun  1 16:16:38 1993
  1241. X--- src/wizard.c    Fri May 28 11:32:12 1993
  1242. X***************
  1243. X*** 1,4 ****
  1244. X! /*    SCCS Id: @(#)wizard.c    3.1    92/11/13          */
  1245. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1246. X  /* NetHack may be freely redistributed.  See license for details. */
  1247. X  
  1248. X--- 1,4 ----
  1249. X! /*    SCCS Id: @(#)wizard.c    3.1    93/05/26    */
  1250. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1251. X  /* NetHack may be freely redistributed.  See license for details. */
  1252. X  
  1253. X***************
  1254. X*** 14,25 ****
  1255. X  
  1256. X  #ifdef OVLB
  1257. X  
  1258. X! static short FDECL(which_arti, (UCHAR_P));
  1259. X  static boolean FDECL(mon_has_arti, (struct monst *,SHORT_P));
  1260. X  static struct monst *FDECL(other_mon_has_arti, (struct monst *,SHORT_P));
  1261. X  static struct obj *FDECL(on_ground, (SHORT_P));
  1262. X! static boolean FDECL(you_have, (UCHAR_P));
  1263. X! static long FDECL(target_on, (UCHAR_P,struct monst *));
  1264. X  static long FDECL(strategy, (struct monst *));
  1265. X  
  1266. X  /*    TODO:    Expand this list.    */
  1267. X--- 14,25 ----
  1268. X  
  1269. X  #ifdef OVLB
  1270. X  
  1271. X! static short FDECL(which_arti, (int));
  1272. X  static boolean FDECL(mon_has_arti, (struct monst *,SHORT_P));
  1273. X  static struct monst *FDECL(other_mon_has_arti, (struct monst *,SHORT_P));
  1274. X  static struct obj *FDECL(on_ground, (SHORT_P));
  1275. X! static boolean FDECL(you_have, (int));
  1276. X! static long FDECL(target_on, (int,struct monst *));
  1277. X  static long FDECL(strategy, (struct monst *));
  1278. X  
  1279. X  /*    TODO:    Expand this list.    */
  1280. X***************
  1281. X*** 135,141 ****
  1282. X  
  1283. X  static short
  1284. X  which_arti(mask)
  1285. X!     register uchar mask;
  1286. X  {
  1287. X      switch(mask) {
  1288. X          case M3_WANTSAMUL:    return(AMULET_OF_YENDOR);
  1289. X--- 135,141 ----
  1290. X  
  1291. X  static short
  1292. X  which_arti(mask)
  1293. X!     register int mask;
  1294. X  {
  1295. X      switch(mask) {
  1296. X          case M3_WANTSAMUL:    return(AMULET_OF_YENDOR);
  1297. X***************
  1298. X*** 205,211 ****
  1299. X  
  1300. X  static boolean
  1301. X  you_have(mask)
  1302. X!     register uchar    mask;
  1303. X  {
  1304. X      switch(mask) {
  1305. X          case M3_WANTSAMUL:    return(u.uhave.amulet);
  1306. X--- 205,211 ----
  1307. X  
  1308. X  static boolean
  1309. X  you_have(mask)
  1310. X!     register int mask;
  1311. X  {
  1312. X      switch(mask) {
  1313. X          case M3_WANTSAMUL:    return(u.uhave.amulet);
  1314. X***************
  1315. X*** 222,228 ****
  1316. X  
  1317. X  static long
  1318. X  target_on(mask, mtmp)
  1319. X!     register uchar  mask;
  1320. X      register struct monst *mtmp;
  1321. X  {
  1322. X      register short    otyp;
  1323. X--- 222,228 ----
  1324. X  
  1325. X  static long
  1326. X  target_on(mask, mtmp)
  1327. X!     register int mask;
  1328. X      register struct monst *mtmp;
  1329. X  {
  1330. X      register short    otyp;
  1331. X***************
  1332. X*** 329,338 ****
  1333. X  
  1334. X          default:        /* kill, maim, pillage! */
  1335. X          {
  1336. X!         long  where = (mtmp->mstrategy & 0xff000000);
  1337. X          xchar tx = (xchar)((mtmp->mstrategy >> 16) & 0xff),
  1338. X                ty = (xchar)((mtmp->mstrategy >> 8) & 0xff);
  1339. X!         uchar targ = (xchar)(mtmp->mstrategy & 0xff);
  1340. X          struct obj *otmp;
  1341. X  
  1342. X          if(!targ) { /* simply wants you to close */
  1343. X--- 329,338 ----
  1344. X  
  1345. X          default:        /* kill, maim, pillage! */
  1346. X          {
  1347. X!         long  where = (mtmp->mstrategy & 0xff000000L);
  1348. X          xchar tx = (xchar)((mtmp->mstrategy >> 16) & 0xff),
  1349. X                ty = (xchar)((mtmp->mstrategy >> 8) & 0xff);
  1350. X!         int   targ = (mtmp->mstrategy & 0xff);
  1351. X          struct obj *otmp;
  1352. X  
  1353. X          if(!targ) { /* simply wants you to close */
  1354. X***************
  1355. X*** 388,394 ****
  1356. X  {
  1357. X      register struct monst *mtmp2;
  1358. X  
  1359. X!     if(mtmp2 = makemon(&mons[PM_WIZARD_OF_YENDOR], u.ux, u.uy)) {
  1360. X          mtmp2->msleep = mtmp2->mtame = mtmp2->mpeaceful = 0;
  1361. X          if (!u.uhave.amulet && rn2(2)) {  /* give clone a fake */
  1362. X              mtmp2->minvent = mksobj(FAKE_AMULET_OF_YENDOR, TRUE, FALSE);
  1363. X--- 388,394 ----
  1364. X  {
  1365. X      register struct monst *mtmp2;
  1366. X  
  1367. X!     if ((mtmp2 = makemon(&mons[PM_WIZARD_OF_YENDOR], u.ux, u.uy)) != 0) {
  1368. X          mtmp2->msleep = mtmp2->mtame = mtmp2->mpeaceful = 0;
  1369. X          if (!u.uhave.amulet && rn2(2)) {  /* give clone a fake */
  1370. X              mtmp2->minvent = mksobj(FAKE_AMULET_OF_YENDOR, TRUE, FALSE);
  1371. X***************
  1372. X*** 435,441 ****
  1373. X  {
  1374. X      register struct monst    *mtmp;
  1375. X  
  1376. X!     if(mtmp = makemon(&mons[PM_WIZARD_OF_YENDOR], u.ux, u.uy)) {
  1377. X          mtmp->msleep = mtmp->mtame = mtmp->mpeaceful = 0;
  1378. X          set_malign(mtmp);
  1379. X          pline("A voice booms out...");
  1380. X--- 435,441 ----
  1381. X  {
  1382. X      register struct monst    *mtmp;
  1383. X  
  1384. X!     if ((mtmp = makemon(&mons[PM_WIZARD_OF_YENDOR], u.ux, u.uy)) != 0) {
  1385. X          mtmp->msleep = mtmp->mtame = mtmp->mpeaceful = 0;
  1386. X          set_malign(mtmp);
  1387. X          pline("A voice booms out...");
  1388. X*** /tmp/da11538    Tue Jun  1 16:16:43 1993
  1389. X--- src/worn.c    Sat Mar 13 16:33:03 1993
  1390. X***************
  1391. X*** 131,138 ****
  1392. X  # ifdef TOURIST
  1393. X          else if (obj->otyp == HAWAIIAN_SHIRT) flag = W_ARMU;
  1394. X  # endif
  1395. X!         else if (is_cloak(obj)) flag = W_ARMC;
  1396. X!         else if (is_helmet(obj)) flag = W_ARMH;
  1397. X          else if (is_shield(obj)) {
  1398. X              if (MON_WEP(mon) && bimanual(MON_WEP(mon)))
  1399. X                  continue;
  1400. X--- 131,141 ----
  1401. X  # ifdef TOURIST
  1402. X          else if (obj->otyp == HAWAIIAN_SHIRT) flag = W_ARMU;
  1403. X  # endif
  1404. X!         else if (is_cloak(obj)) {
  1405. X!             if (cantweararm(mon->data))
  1406. X!                 continue;
  1407. X!             flag = W_ARMC;
  1408. X!         } else if (is_helmet(obj)) flag = W_ARMH;
  1409. X          else if (is_shield(obj)) {
  1410. X              if (MON_WEP(mon) && bimanual(MON_WEP(mon)))
  1411. X                  continue;
  1412. X***************
  1413. X*** 140,152 ****
  1414. X          } else if (is_gloves(obj)) {
  1415. X              if (MON_WEP(mon) && MON_WEP(mon)->cursed)
  1416. X                  continue;
  1417. X!             flag = W_ARMG;
  1418. X!         } else if (is_boots(obj)) flag = W_ARMF;
  1419. X!         else if (obj->oclass == ARMOR_CLASS) {
  1420. X! #ifdef POLYSELF
  1421. X              if (cantweararm(mon->data))
  1422. X                  continue;
  1423. X- #endif
  1424. X              flag = W_ARM;
  1425. X          } else continue;
  1426. X          if (mon->misc_worn_check & flag) continue;
  1427. X--- 143,156 ----
  1428. X          } else if (is_gloves(obj)) {
  1429. X              if (MON_WEP(mon) && MON_WEP(mon)->cursed)
  1430. X                  continue;
  1431. X!             flag = W_ARMG;
  1432. X!         } else if (is_boots(obj)) {
  1433. X!             if (slithy(mon->data) || mon->data->mlet == S_CENTAUR)
  1434. X!                 continue;
  1435. X!             flag = W_ARMF;
  1436. X!         } else if (obj->oclass == ARMOR_CLASS) {
  1437. X              if (cantweararm(mon->data))
  1438. X                  continue;
  1439. X              flag = W_ARM;
  1440. X          } else continue;
  1441. X          if (mon->misc_worn_check & flag) continue;
  1442. X***************
  1443. X*** 310,315 ****
  1444. X--- 314,322 ----
  1445. X          otmp->owornmask &= ~W_ARMH;
  1446. X          rel_1_obj(mon, otmp);
  1447. X          }
  1448. X+     }
  1449. X+     if (nohands(mdat) || verysmall(mdat) || slithy(mdat) ||
  1450. X+         mdat->mlet == S_CENTAUR) {
  1451. X          if (otmp = which_armor(mon, W_ARMF)) {
  1452. X          if (vis) {
  1453. X              if (is_whirly(mon->data))
  1454. X*** /tmp/da11554    Tue Jun  1 16:16:47 1993
  1455. X--- src/zap.c    Fri May 28 16:20:14 1993
  1456. X***************
  1457. X*** 1,4 ****
  1458. X! /*    SCCS Id: @(#)zap.c    3.1    92/10/21    */
  1459. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1460. X  /* NetHack may be freely redistributed.  See license for details. */
  1461. X  
  1462. X--- 1,4 ----
  1463. X! /*    SCCS Id: @(#)zap.c    3.1    93/05/17    */
  1464. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1465. X  /* NetHack may be freely redistributed.  See license for details. */
  1466. X  
  1467. X***************
  1468. X*** 19,25 ****
  1469. X  extern boolean m_using;
  1470. X  #endif
  1471. X  
  1472. X- static boolean FDECL(obj_resists, (struct obj *));
  1473. X  static boolean FDECL(obj_shudders, (struct obj *));
  1474. X  static void FDECL(polyuse, (struct obj*, int, int));
  1475. X  static void FDECL(do_osshock, (struct obj *));
  1476. X--- 19,24 ----
  1477. X***************
  1478. X*** 49,55 ****
  1479. X  #define ZT_SPELL(x)        (10+(x))
  1480. X  #define ZT_BREATH(x)    (20+(x))
  1481. X  
  1482. X! const char *fl[]= {
  1483. X      "magic missile",    /* Wands must be 0-9 */
  1484. X      "bolt of fire",
  1485. X      "bolt of cold",
  1486. X--- 48,54 ----
  1487. X  #define ZT_SPELL(x)        (10+(x))
  1488. X  #define ZT_BREATH(x)    (20+(x))
  1489. X  
  1490. X! const char *flash_types[] = {        /* also used in buzzmu(mcastu.c) */
  1491. X      "magic missile",    /* Wands must be 0-9 */
  1492. X      "bolt of fire",
  1493. X      "bolt of cold",
  1494. X***************
  1495. X*** 93,104 ****
  1496. X  register struct obj *otmp;
  1497. X  {
  1498. X      register boolean wake = FALSE;
  1499. X  #ifdef MULDGN
  1500. X      boolean dbldam = (pl_character[0] == 'K') && u.uhave.questart;
  1501. X  #endif
  1502. X      register int dmg;
  1503. X  
  1504. X!     switch(otmp->otyp) {
  1505. X      case WAN_STRIKING:
  1506. X      case SPE_FORCE_BOLT:
  1507. X          wake = TRUE;
  1508. X--- 92,104 ----
  1509. X  register struct obj *otmp;
  1510. X  {
  1511. X      register boolean wake = FALSE;
  1512. X+     register int otyp = otmp->otyp;
  1513. X  #ifdef MULDGN
  1514. X      boolean dbldam = (pl_character[0] == 'K') && u.uhave.questart;
  1515. X  #endif
  1516. X      register int dmg;
  1517. X  
  1518. X!     switch(otyp) {
  1519. X      case WAN_STRIKING:
  1520. X      case SPE_FORCE_BOLT:
  1521. X          wake = TRUE;
  1522. X***************
  1523. X*** 107,118 ****
  1524. X  #ifdef MULDGN
  1525. X              if(dbldam) dmg *= 2;
  1526. X  #endif
  1527. X!             hit((otmp->otyp == WAN_STRIKING) ? "wand" :
  1528. X!                         "spell", mtmp, exclam(dmg));
  1529. X              (void) resist(mtmp, otmp->oclass, dmg, TELL);
  1530. X!         } else miss((otmp->otyp == WAN_STRIKING) ? "wand" :
  1531. X!                         "spell", mtmp);
  1532. X!         makeknown(otmp->otyp);
  1533. X          break;
  1534. X      case WAN_SLOW_MONSTER:
  1535. X      case SPE_SLOW_MONSTER:
  1536. X--- 107,117 ----
  1537. X  #ifdef MULDGN
  1538. X              if(dbldam) dmg *= 2;
  1539. X  #endif
  1540. X!             hit((otyp == WAN_STRIKING) ? "wand" : "spell",
  1541. X!                 mtmp, exclam(dmg));
  1542. X              (void) resist(mtmp, otmp->oclass, dmg, TELL);
  1543. X!         } else miss((otyp == WAN_STRIKING) ? "wand" : "spell", mtmp);
  1544. X!         makeknown(otyp);
  1545. X          break;
  1546. X      case WAN_SLOW_MONSTER:
  1547. X      case SPE_SLOW_MONSTER:
  1548. X***************
  1549. X*** 153,159 ****
  1550. X              if (!rn2(25)) {
  1551. X              if (canseemon(mtmp)) {
  1552. X                  pline("%s shudders!", Monnam(mtmp));
  1553. X!                 makeknown(otmp->otyp);
  1554. X              }
  1555. X              /* no corpse after system shock */
  1556. X              xkilled(mtmp, 3);
  1557. X--- 152,158 ----
  1558. X              if (!rn2(25)) {
  1559. X              if (canseemon(mtmp)) {
  1560. X                  pline("%s shudders!", Monnam(mtmp));
  1561. X!                 makeknown(otyp);
  1562. X              }
  1563. X              /* no corpse after system shock */
  1564. X              xkilled(mtmp, 3);
  1565. X***************
  1566. X*** 160,166 ****
  1567. X              }
  1568. X              else if (newcham(mtmp, (struct permonst *)0) )
  1569. X              if (!Hallucination && (!Blind || sensemon(mtmp)))
  1570. X!                 makeknown(otmp->otyp);
  1571. X          }
  1572. X          break;
  1573. X      case WAN_CANCELLATION:
  1574. X--- 159,165 ----
  1575. X              }
  1576. X              else if (newcham(mtmp, (struct permonst *)0) )
  1577. X              if (!Hallucination && (!Blind || sensemon(mtmp)))
  1578. X!                 makeknown(otyp);
  1579. X          }
  1580. X          break;
  1581. X      case WAN_CANCELLATION:
  1582. X***************
  1583. X*** 188,194 ****
  1584. X      case WAN_NOTHING:
  1585. X          break;
  1586. X      case WAN_PROBING:
  1587. X!         makeknown(otmp->otyp);
  1588. X          mstatusline(mtmp);
  1589. X          break;
  1590. X      case WAN_OPENING:
  1591. X--- 187,193 ----
  1592. X      case WAN_NOTHING:
  1593. X          break;
  1594. X      case WAN_PROBING:
  1595. X!         makeknown(otyp);
  1596. X          mstatusline(mtmp);
  1597. X          break;
  1598. X      case WAN_OPENING:
  1599. X***************
  1600. X*** 198,211 ****
  1601. X                  else pline("%s opens its mouth!", Monnam(mtmp));
  1602. X              }
  1603. X              expels(mtmp, mtmp->data, TRUE);
  1604. X              break;
  1605. X          }
  1606. X      case WAN_LOCKING:
  1607. X      case SPE_KNOCK:
  1608. X      case SPE_WIZARD_LOCK:
  1609. X          break;
  1610. X      default:
  1611. X!         impossible("What an interesting effect (%u)", otmp->otyp);
  1612. X      }
  1613. X      if(wake) {
  1614. X          if(mtmp->mhp > 0) {
  1615. X--- 197,223 ----
  1616. X                  else pline("%s opens its mouth!", Monnam(mtmp));
  1617. X              }
  1618. X              expels(mtmp, mtmp->data, TRUE);
  1619. X+         }
  1620. X              break;
  1621. X+     case SPE_HEALING:
  1622. X+     case SPE_EXTRA_HEALING:
  1623. X+         mtmp->mhp += (otyp == SPE_HEALING) ? rnd(8) : d(2,8)+2;
  1624. X+         if (mtmp->mhp > mtmp->mhpmax) 
  1625. X+             mtmp->mhp = mtmp->mhpmax;
  1626. X+         if (canseemon(mtmp))
  1627. X+             pline(otyp == SPE_HEALING ? "%s begins to look better." :
  1628. X+               "%s looks much better.", Monnam(mtmp));
  1629. X+         if (mtmp->mtame || mtmp->mpeaceful) {            
  1630. X+             adjalign((pl_character[0] == 'H') ? 1 :
  1631. X+                  sgn(u.ualign.type));
  1632. X          }
  1633. X+          break;
  1634. X      case WAN_LOCKING:
  1635. X      case SPE_KNOCK:
  1636. X      case SPE_WIZARD_LOCK:
  1637. X          break;
  1638. X      default:
  1639. X!         impossible("What an interesting effect (%u)", otyp);
  1640. X      }
  1641. X      if(wake) {
  1642. X          if(mtmp->mhp > 0) {
  1643. X***************
  1644. X*** 399,407 ****
  1645. X      uncurse(obj);
  1646. X  }
  1647. X  
  1648. X! static boolean
  1649. X! obj_resists(obj)
  1650. X  struct obj *obj;
  1651. X  {
  1652. X      if (obj->otyp == AMULET_OF_YENDOR ||
  1653. X          obj->otyp == SPE_BOOK_OF_THE_DEAD ||
  1654. X--- 411,420 ----
  1655. X      uncurse(obj);
  1656. X  }
  1657. X  
  1658. X! boolean
  1659. X! obj_resists(obj, ochance, achance)
  1660. X  struct obj *obj;
  1661. X+ int ochance, achance;    /* percent chance for ordinary objects, artifacts */
  1662. X  {
  1663. X      if (obj->otyp == AMULET_OF_YENDOR ||
  1664. X          obj->otyp == SPE_BOOK_OF_THE_DEAD ||
  1665. X***************
  1666. X*** 410,418 ****
  1667. X          (obj->otyp == CORPSE && is_rider(&mons[obj->corpsenm]))) {
  1668. X          return TRUE;
  1669. X      } else {
  1670. X!         int chance = rn2(20);
  1671. X!         /* artifacts resist 95% of the time; normal objects 5% */
  1672. X!         return (obj->oartifact ? !!chance : !chance);
  1673. X      }
  1674. X  }
  1675. X  
  1676. X--- 423,431 ----
  1677. X          (obj->otyp == CORPSE && is_rider(&mons[obj->corpsenm]))) {
  1678. X          return TRUE;
  1679. X      } else {
  1680. X!         int chance = rn2(100);
  1681. X! 
  1682. X!         return (chance < (obj->oartifact ? achance : ochance));
  1683. X      }
  1684. X  }
  1685. X  
  1686. X***************
  1687. X*** 475,481 ****
  1688. X  {
  1689. X      struct permonst *mdat = (struct permonst *)0;
  1690. X      struct monst *mtmp;
  1691. X!     char *material;
  1692. X      int pm_index;
  1693. X  
  1694. X      /* no golems if you zap only one object -- not enough stuff */
  1695. X--- 488,494 ----
  1696. X  {
  1697. X      struct permonst *mdat = (struct permonst *)0;
  1698. X      struct monst *mtmp;
  1699. X!     const char *material;
  1700. X      int pm_index;
  1701. X  
  1702. X      /* no golems if you zap only one object -- not enough stuff */
  1703. X***************
  1704. X*** 581,593 ****
  1705. X      register int res = 1;
  1706. X      struct obj *otmp2;
  1707. X  
  1708. X!     if(obj == uball || obj == uchain)
  1709. X          res = 0;
  1710. X!     else
  1711. X      switch(otmp->otyp) {
  1712. X      case WAN_POLYMORPH:
  1713. X      case SPE_POLYMORPH:
  1714. X!         if (obj_resists(obj)) {
  1715. X              res = 0;
  1716. X              break;
  1717. X          } else if (obj_shudders(obj)) {
  1718. X--- 594,613 ----
  1719. X      register int res = 1;
  1720. X      struct obj *otmp2;
  1721. X  
  1722. X!     if (obj == uball) {
  1723. X          res = 0;
  1724. X!     } else if (obj == uchain) {
  1725. X!         if (otmp->otyp == WAN_OPENING || otmp->otyp == SPE_KNOCK) {
  1726. X!             unpunish();
  1727. X!             res = 1;
  1728. X!             makeknown(otmp->otyp);
  1729. X!         } else
  1730. X!             res = 0;
  1731. X!     } else
  1732. X      switch(otmp->otyp) {
  1733. X      case WAN_POLYMORPH:
  1734. X      case SPE_POLYMORPH:
  1735. X!         if (obj_resists(obj, 5, 95)) {
  1736. X              res = 0;
  1737. X              break;
  1738. X          } else if (obj_shudders(obj)) {
  1739. X***************
  1740. X*** 646,651 ****
  1741. X--- 666,672 ----
  1742. X              otmp2->otyp = LOW_BOOTS;
  1743. X              otmp2->oclass = ARMOR_CLASS;
  1744. X              otmp2->spe = 0;
  1745. X+             otmp2->oeroded = 0;
  1746. X              otmp2->oerodeproof = TRUE;
  1747. X              otmp2->quan = 1L;
  1748. X              otmp2->cursed = FALSE;
  1749. X***************
  1750. X*** 653,659 ****
  1751. X          }
  1752. X  
  1753. X          /* no box contents --KAA */
  1754. X!         if (Is_container(otmp2) || otmp2->otyp == STATUE)
  1755. X              delete_contents(otmp2);
  1756. X  
  1757. X          /* 'n' merged objects may be fused into 1 object */
  1758. X--- 674,680 ----
  1759. X          }
  1760. X  
  1761. X          /* no box contents --KAA */
  1762. X!         if (Has_contents(otmp2))
  1763. X              delete_contents(otmp2);
  1764. X  
  1765. X          /* 'n' merged objects may be fused into 1 object */
  1766. X***************
  1767. X*** 676,682 ****
  1768. X                    shop_keeper(*in_rooms(obj->ox, obj->oy, SHOPBASE));
  1769. X  
  1770. X              if ((!obj->no_charge ||
  1771. X!              (Is_container(obj) &&
  1772. X                  (contained_cost(obj, shkp, 0L, FALSE) != 0L)))
  1773. X                 && inhishop(shkp)) {
  1774. X                  if(shkp->mpeaceful) {
  1775. X--- 697,703 ----
  1776. X                    shop_keeper(*in_rooms(obj->ox, obj->oy, SHOPBASE));
  1777. X  
  1778. X              if ((!obj->no_charge ||
  1779. X!              (Has_contents(obj) &&
  1780. X                  (contained_cost(obj, shkp, 0L, FALSE) != 0L)))
  1781. X                 && inhishop(shkp)) {
  1782. X                  if(shkp->mpeaceful) {
  1783. X***************
  1784. X*** 699,711 ****
  1785. X              fracture_rock(obj);
  1786. X          else if (obj->otyp == STATUE)
  1787. X              (void) break_statue(obj);
  1788. X!         else
  1789. X              res = 0;
  1790. X          makeknown(otmp->otyp);
  1791. X          break;
  1792. X      case WAN_CANCELLATION:
  1793. X      case SPE_CANCELLATION:
  1794. X          cancel_item(obj);
  1795. X          break;
  1796. X      case WAN_TELEPORTATION:
  1797. X      case SPE_TELEPORT_AWAY:
  1798. X--- 720,745 ----
  1799. X              fracture_rock(obj);
  1800. X          else if (obj->otyp == STATUE)
  1801. X              (void) break_statue(obj);
  1802. X!         else {
  1803. X!             (void)breaks(obj, FALSE);
  1804. X              res = 0;
  1805. X+         }
  1806. X          makeknown(otmp->otyp);
  1807. X          break;
  1808. X+     case WAN_DIGGING:
  1809. X+     case SPE_DIG:
  1810. X+         /* vaporize boulders */
  1811. X+         if (obj->otyp == BOULDER) {
  1812. X+             delobj(obj);
  1813. X+             res = 0;
  1814. X+         }
  1815. X+         break;
  1816. X      case WAN_CANCELLATION:
  1817. X      case SPE_CANCELLATION:
  1818. X          cancel_item(obj);
  1819. X+ #ifdef TEXTCOLOR
  1820. X+         newsym(obj->ox,obj->oy);    /* might change color */
  1821. X+ #endif
  1822. X          break;
  1823. X      case WAN_TELEPORTATION:
  1824. X      case SPE_TELEPORT_AWAY:
  1825. X***************
  1826. X*** 721,734 ****
  1827. X          break;
  1828. X      case WAN_OPENING:
  1829. X      case SPE_KNOCK:
  1830. X-         /* Zap it at the chain, not the ball */
  1831. X-         if (obj == uchain) {
  1832. X-             unpunish();
  1833. X-             res = 1;
  1834. X-             makeknown(obj->otyp);
  1835. X-             break;
  1836. X-         }
  1837. X-         /* fall through */
  1838. X      case WAN_LOCKING:
  1839. X      case SPE_WIZARD_LOCK:
  1840. X          if(Is_box(obj))
  1841. X--- 755,760 ----
  1842. X***************
  1843. X*** 735,742 ****
  1844. X              res = boxlock(obj, otmp);
  1845. X          else
  1846. X              res = 0;
  1847. X!         if (res /* && obj->oclass == WAND_CLASS */)
  1848. X!             makeknown(obj->otyp);
  1849. X          break;
  1850. X      case WAN_SLOW_MONSTER:        /* no effect on objects */
  1851. X      case SPE_SLOW_MONSTER:
  1852. X--- 761,768 ----
  1853. X              res = boxlock(obj, otmp);
  1854. X          else
  1855. X              res = 0;
  1856. X!         if (res /* && otmp->oclass == WAND_CLASS */)
  1857. X!             makeknown(otmp->otyp);
  1858. X          break;
  1859. X      case WAN_SLOW_MONSTER:        /* no effect on objects */
  1860. X      case SPE_SLOW_MONSTER:
  1861. X***************
  1862. X*** 743,748 ****
  1863. X--- 769,776 ----
  1864. X      case WAN_SPEED_MONSTER:
  1865. X      case WAN_NOTHING:
  1866. X      case WAN_PROBING:
  1867. X+     case SPE_HEALING:
  1868. X+     case SPE_EXTRA_HEALING:
  1869. X          res = 0;
  1870. X          break;
  1871. X      default:
  1872. X***************
  1873. X*** 990,996 ****
  1874. X          case SPE_CANCELLATION:
  1875. X              cancel_monst(&youmonst, obj, TRUE, FALSE, TRUE);
  1876. X              break;
  1877. X!            case WAN_MAKE_INVISIBLE: {
  1878. X              /* have to test before changing HInvis but must change
  1879. X               * HInvis before doing newsym().
  1880. X               */
  1881. X--- 1018,1024 ----
  1882. X          case SPE_CANCELLATION:
  1883. X              cancel_monst(&youmonst, obj, TRUE, FALSE, TRUE);
  1884. X              break;
  1885. X!         case WAN_MAKE_INVISIBLE: {
  1886. X              /* have to test before changing HInvis but must change
  1887. X               * HInvis before doing newsym().
  1888. X               */
  1889. X***************
  1890. X*** 1006,1012 ****
  1891. X              }
  1892. X              break;
  1893. X          }
  1894. X!            case WAN_SPEED_MONSTER:
  1895. X              if (!(Fast & INTRINSIC)) {
  1896. X              You("seem to be moving faster.");
  1897. X              makeknown(WAN_SPEED_MONSTER);
  1898. X--- 1034,1040 ----
  1899. X              }
  1900. X              break;
  1901. X          }
  1902. X!         case WAN_SPEED_MONSTER:
  1903. X              if (!(Fast & INTRINSIC)) {
  1904. X              You("seem to be moving faster.");
  1905. X              makeknown(WAN_SPEED_MONSTER);
  1906. X***************
  1907. X*** 1014,1020 ****
  1908. X              }
  1909. X              Fast |= FROMOUTSIDE;
  1910. X              break;
  1911. X!            case WAN_SLEEP:
  1912. X              makeknown(WAN_SLEEP);
  1913. X          case SPE_SLEEP:
  1914. X              if(Sleep_resistance) {
  1915. X--- 1042,1048 ----
  1916. X              }
  1917. X              Fast |= FROMOUTSIDE;
  1918. X              break;
  1919. X!         case WAN_SLEEP:
  1920. X              makeknown(WAN_SLEEP);
  1921. X          case SPE_SLEEP:
  1922. X              if(Sleep_resistance) {
  1923. X***************
  1924. X*** 1067,1075 ****
  1925. X              }
  1926. X  #endif
  1927. X              break;
  1928. X          case SPE_DIG:
  1929. X          case SPE_DETECT_UNSEEN:
  1930. X-         case WAN_DIGGING:
  1931. X          case WAN_NOTHING:
  1932. X          case WAN_OPENING:
  1933. X          case WAN_LOCKING:
  1934. X--- 1095,1110 ----
  1935. X              }
  1936. X  #endif
  1937. X              break;
  1938. X+         case SPE_HEALING:
  1939. X+         case SPE_EXTRA_HEALING:
  1940. X+             healup(obj->otyp == SPE_HEALING ? rnd(8) : d(2,8)+2,
  1941. X+                0, FALSE, FALSE);
  1942. X+             You(obj->otyp == SPE_HEALING ? "begin to feel better." :
  1943. X+             "feel a fair bit better.");
  1944. X+             break;
  1945. X+         case WAN_DIGGING:
  1946. X          case SPE_DIG:
  1947. X          case SPE_DETECT_UNSEEN:
  1948. X          case WAN_NOTHING:
  1949. X          case WAN_OPENING:
  1950. X          case WAN_LOCKING:
  1951. X***************
  1952. X*** 1712,1721 ****
  1953. X      return(cnt);
  1954. X  }
  1955. X  
  1956. X! /* type == 0 to 9     : you shooting a wand */
  1957. X! /* type == 10 to 19   : you casting a spell */
  1958. X! /* type == 20 to 29   : you breathing as a monster */
  1959. X! /* type == -10 to -19   : monster casting spell */
  1960. X  /* type == -20 to -29 : monster breathing at you */
  1961. X  /* type == -30 to -39 : monster shooting a wand (MUSE only) */
  1962. X  /* called with dx = dy = 0 with vertical bolts */
  1963. X--- 1747,1756 ----
  1964. X      return(cnt);
  1965. X  }
  1966. X  
  1967. X! /* type ==   0 to   9 : you shooting a wand */
  1968. X! /* type ==  10 to  19 : you casting a spell */
  1969. X! /* type ==  20 to  29 : you breathing as a monster */
  1970. X! /* type == -10 to -19 : monster casting spell */
  1971. X  /* type == -20 to -29 : monster breathing at you */
  1972. X  /* type == -30 to -39 : monster shooting a wand (MUSE only) */
  1973. X  /* called with dx = dy = 0 with vertical bolts */
  1974. X***************
  1975. X*** 1730,1739 ****
  1976. X      register xchar lsx, lsy;
  1977. X      struct monst *mon;
  1978. X      boolean bodyhit = FALSE, shopdamage = FALSE;
  1979. X  #ifdef MUSE
  1980. X!     register const char *fltxt = fl[(type <= -30) ? abstype : abs(type)];
  1981. X  #else
  1982. X!     register const char *fltxt = fl[abs(type)];
  1983. X  #endif
  1984. X      if(u.uswallow) {
  1985. X      register int tmp;
  1986. X--- 1765,1776 ----
  1987. X      register xchar lsx, lsy;
  1988. X      struct monst *mon;
  1989. X      boolean bodyhit = FALSE, shopdamage = FALSE;
  1990. X+     register const char *fltxt;
  1991. X+ 
  1992. X  #ifdef MUSE
  1993. X!     fltxt = flash_types[(type <= -30) ? abstype : abs(type)];
  1994. X  #else
  1995. X!     fltxt = flash_types[abs(type)];
  1996. X  #endif
  1997. X      if(u.uswallow) {
  1998. X      register int tmp;
  1999. X***************
  2000. X*** 1774,1804 ****
  2001. X          if (type >= 0) mon->data->mflags3 &= ~M3_WAITMASK;
  2002. X          if (rnd(20) < 18 + find_mac(mon)) {
  2003. X  #ifdef MUSE
  2004. X!         struct obj *orefl = which_armor(mon, W_ARMS);
  2005. X! 
  2006. X!         if (orefl && orefl->otyp == SHIELD_OF_REFLECTION) {
  2007. X              if(cansee(mon->mx,mon->my)) {
  2008. X              hit(fltxt, mon, exclam(0));
  2009. X!             pline("But it reflects from %s shield!",
  2010. X!                   s_suffix(mon_nam(mon)));
  2011. X!             makeknown(SHIELD_OF_REFLECTION);
  2012. X!             shieldeff(sx, sy);
  2013. X              }
  2014. X- 
  2015. X              dx = -dx;
  2016. X              dy = -dy;
  2017. X-         } else if ((orefl = which_armor(mon, W_AMUL)) &&
  2018. X-                     orefl->otyp == AMULET_OF_REFLECTION) {
  2019. X-             if(cansee(mon->mx,mon->my)) {
  2020. X-             hit(fltxt, mon, exclam(0));
  2021. X-             pline("But it reflects from %s amulet!",
  2022. X-                   s_suffix(mon_nam(mon)));
  2023. X-             makeknown(AMULET_OF_REFLECTION);
  2024. X-             shieldeff(sx, sy);
  2025. X-             }
  2026. X- 
  2027. X-             dx = -dx;
  2028. X-             dy = -dy;
  2029. X          } else
  2030. X  #endif
  2031. X          {
  2032. X--- 1811,1824 ----
  2033. X          if (type >= 0) mon->data->mflags3 &= ~M3_WAITMASK;
  2034. X          if (rnd(20) < 18 + find_mac(mon)) {
  2035. X  #ifdef MUSE
  2036. X!         if (mon_reflects(mon, "")) {
  2037. X              if(cansee(mon->mx,mon->my)) {
  2038. X              hit(fltxt, mon, exclam(0));
  2039. X!             shieldeff(mon->mx, mon->my);
  2040. X!             (void) mon_reflects(mon, "But it reflects from %s %s!");
  2041. X              }
  2042. X              dx = -dx;
  2043. X              dy = -dy;
  2044. X          } else
  2045. X  #endif
  2046. X          {
  2047. X***************
  2048. X*** 1820,1827 ****
  2049. X                  mon->mhp = mon->mhpmax;
  2050. X              break; /* Out of while loop */
  2051. X              }
  2052. X!             if(mon->data == &mons[PM_DEATH] &&
  2053. X!                             abs(type)%10 == ZT_DEATH) {
  2054. X                  if(cansee(mon->mx,mon->my)) {
  2055. X                  hit(fltxt, mon, exclam(tmp));
  2056. X                      pline("Death absorbs the deadly %s!",
  2057. X--- 1840,1846 ----
  2058. X                  mon->mhp = mon->mhpmax;
  2059. X              break; /* Out of while loop */
  2060. X              }
  2061. X!             if(mon->data == &mons[PM_DEATH] && abstype == ZT_DEATH) {
  2062. X                  if(cansee(mon->mx,mon->my)) {
  2063. X                  hit(fltxt, mon, exclam(tmp));
  2064. X                      pline("Death absorbs the deadly %s!",
  2065. X***************
  2066. X*** 1983,1990 ****
  2067. X              else if(Antimagic) {
  2068. X              shieldeff(sx, sy);
  2069. X              You("aren't affected.");
  2070. X!             } else
  2071. X!             u.uhp = -1;
  2072. X              break;
  2073. X          case ZT_LIGHTNING:
  2074. X              if (Shock_resistance) {
  2075. X--- 2002,2010 ----
  2076. X              else if(Antimagic) {
  2077. X              shieldeff(sx, sy);
  2078. X              You("aren't affected.");
  2079. X!             break;
  2080. X!             }
  2081. X!             u.uhp = -1;
  2082. X              break;
  2083. X          case ZT_LIGHTNING:
  2084. X              if (Shock_resistance) {
  2085. X***************
  2086. X*** 2078,2083 ****
  2087. X--- 2098,2127 ----
  2088. X                    abstype == ZT_DEATH ? "disintegrate" : "destroy");
  2089. X  }
  2090. X  
  2091. X+ void
  2092. X+ melt_ice(x, y)
  2093. X+ xchar x, y;
  2094. X+ {
  2095. X+     struct rm *lev = &levl[x][y];
  2096. X+ 
  2097. X+     if (lev->typ == DRAWBRIDGE_UP)
  2098. X+         lev->drawbridgemask &= ~DB_ICE;    /* revert to DB_MOAT */
  2099. X+     else {    /* lev->typ == ICE */
  2100. X+ #ifdef STUPID
  2101. X+         if (lev->icedpool == ICED_POOL) lev->typ = POOL;
  2102. X+         else lev->typ = MOAT;
  2103. X+ #else
  2104. X+         lev->typ = (lev->icedpool == ICED_POOL ? POOL : MOAT);
  2105. X+ #endif
  2106. X+         lev->icedpool = 0;
  2107. X+     }
  2108. X+     unearth_objs(x, y);
  2109. X+     newsym(x,y);
  2110. X+     if (cansee(x,y)) Norep("The ice crackles and melts.");
  2111. X+     if (x == u.ux && y == u.uy)
  2112. X+         spoteffects();    /* possibly drown, notice objects */
  2113. X+ }
  2114. X+ 
  2115. X  /* Burn floor scrolls, evaporate pools, etc...  in a single square.  Used
  2116. X   * both for normal bolts of fire, cold, etc... and for fireballs.
  2117. X   * Sets shopdamage to TRUE if a shop door is destroyed, and returns the 
  2118. X***************
  2119. X*** 2096,2116 ****
  2120. X  
  2121. X      if(abstype == ZT_FIRE) {
  2122. X          if(is_ice(x, y)) {
  2123. X!         if (lev->typ == DRAWBRIDGE_UP)
  2124. X!             lev->drawbridgemask &= ~DB_ICE;    /* revert to DB_MOAT */
  2125. X!         else {    /* lev->typ == ICE */
  2126. X! #ifdef STUPID
  2127. X!             if (lev->icedpool == ICED_POOL) lev->typ = POOL;
  2128. X!             else lev->typ = MOAT;
  2129. X! #else
  2130. X!             lev->typ = (lev->icedpool == ICED_POOL ? POOL : MOAT);
  2131. X! #endif
  2132. X!             lev->icedpool = 0;
  2133. X!         }
  2134. X!         newsym(x,y);
  2135. X!         Norep("The ice crackles and melts.");
  2136. X!         if (x == u.ux && y == u.uy)
  2137. X!             spoteffects();    /* possibly drown */
  2138. X          } else if(is_pool(x,y)) {
  2139. X          const char *msgtxt = "You hear hissing gas.";
  2140. X          if(lev->typ != POOL) {    /* MOAT or DRAWBRIDGE_UP */
  2141. X--- 2140,2146 ----
  2142. X  
  2143. X      if(abstype == ZT_FIRE) {
  2144. X          if(is_ice(x, y)) {
  2145. X!         melt_ice(x, y);
  2146. X          } else if(is_pool(x,y)) {
  2147. X          const char *msgtxt = "You hear hissing gas.";
  2148. X          if(lev->typ != POOL) {    /* MOAT or DRAWBRIDGE_UP */
  2149. X***************
  2150. X*** 2121,2127 ****
  2151. X              rangemod -= 3;
  2152. X              lev->typ = ROOM;
  2153. X              ttmp = maketrap(x, y, PIT);
  2154. X!             ttmp->tseen = 1;
  2155. X              if (cansee(x,y)) msgtxt = "The water evaporates.";
  2156. X          }
  2157. X          Norep(msgtxt);
  2158. X--- 2151,2157 ----
  2159. X              rangemod -= 3;
  2160. X              lev->typ = ROOM;
  2161. X              ttmp = maketrap(x, y, PIT);
  2162. X!             if (ttmp) ttmp->tseen = 1;
  2163. X              if (cansee(x,y)) msgtxt = "The water evaporates.";
  2164. X          }
  2165. X          Norep(msgtxt);
  2166. X***************
  2167. X*** 2152,2165 ****
  2168. X                      (lev->typ == POOL ? ICED_POOL : ICED_MOAT);
  2169. X              lev->typ = (lava ? ROOM : ICE);
  2170. X              }
  2171. X!             /*
  2172. X!              * Not perfect: There could be stuff on the bottom.  If
  2173. X!              * we leave it here, it'll pop to the surface which is
  2174. X!              * strange, so just destroy all the objects at this location.
  2175. X!              * A better solution requires major changes (as usual).
  2176. X!              */
  2177. X!             if(OBJ_AT(x,y))
  2178. X!             delallobj(x,y);
  2179. X              if(cansee(x,y)) {
  2180. X              if(moat)
  2181. X                  Norep("The moat is bridged with ice!");
  2182. X--- 2182,2188 ----
  2183. X                      (lev->typ == POOL ? ICED_POOL : ICED_MOAT);
  2184. X              lev->typ = (lava ? ROOM : ICE);
  2185. X              }
  2186. X!             bury_objs(x,y);
  2187. X              if(cansee(x,y)) {
  2188. X              if(moat)
  2189. X                  Norep("The moat is bridged with ice!");
  2190. X***************
  2191. X*** 2295,2313 ****
  2192. X      } while(!goodpos(tx,ty,(struct monst *)0, (struct permonst *)0));
  2193. X      freeobj(obj);
  2194. X      if (flooreffects(obj, tx, ty, "fall"))
  2195. X!          return;
  2196. X!     if(costly_spot(otx, oty) && (!costly_spot(tx, ty) ||
  2197. X!                      !index(in_rooms(tx, ty, 0),
  2198. X!                         *in_rooms(otx, oty, 0)))) {
  2199. X          if(costly_spot(u.ux, u.uy) &&
  2200. X                  index(u.urooms, *in_rooms(otx, oty, 0)))
  2201. X              addtobill(obj, FALSE, FALSE, FALSE);
  2202. X          else (void)stolen_value(obj, otx, oty, FALSE, FALSE);
  2203. X      }
  2204. X      obj->nobj = fobj;
  2205. X      fobj = obj;
  2206. X      place_object(obj, tx, ty);
  2207. X-     newsym(otx, oty);
  2208. X      newsym(tx,ty);
  2209. X  }
  2210. X  
  2211. X--- 2318,2340 ----
  2212. X      } while(!goodpos(tx,ty,(struct monst *)0, (struct permonst *)0));
  2213. X      freeobj(obj);
  2214. X      if (flooreffects(obj, tx, ty, "fall"))
  2215. X!         return;
  2216. X!     if (otx == 0 && oty == 0) {
  2217. X!         ;    /* fell through a trapdoor; no update of old loc needed */
  2218. X!     } else {
  2219. X!         if (costly_spot(otx, oty)
  2220. X!           && (!costly_spot(tx, ty) ||
  2221. X!           !index(in_rooms(tx, ty, 0), *in_rooms(otx, oty, 0)))) {
  2222. X          if(costly_spot(u.ux, u.uy) &&
  2223. X                  index(u.urooms, *in_rooms(otx, oty, 0)))
  2224. X              addtobill(obj, FALSE, FALSE, FALSE);
  2225. X          else (void)stolen_value(obj, otx, oty, FALSE, FALSE);
  2226. X+         }
  2227. X+         newsym(otx, oty);    /* update old location */
  2228. X      }
  2229. X      obj->nobj = fobj;
  2230. X      fobj = obj;
  2231. X      place_object(obj, tx, ty);
  2232. X      newsym(tx,ty);
  2233. X  }
  2234. X  
  2235. END_OF_FILE
  2236. if test 56999 -ne `wc -c <'patches02i'`; then
  2237.     echo shar: \"'patches02i'\" unpacked with wrong size!
  2238. fi
  2239. # end of 'patches02i'
  2240. echo shar: End of archive 3 \(of 33\).
  2241. cp /dev/null ark3isdone
  2242. MISSING=""
  2243. 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
  2244.     if test ! -f ark${I}isdone ; then
  2245.     MISSING="${MISSING} ${I}"
  2246.     fi
  2247. done
  2248. if test "${MISSING}" = "" ; then
  2249.     echo You have unpacked all 33 archives.
  2250.     echo "Now execute ./patchit.sh"
  2251.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2252. else
  2253.     echo You still need to unpack the following archives:
  2254.     echo "        " ${MISSING}
  2255. fi
  2256. ##  End of shell archive.
  2257. exit 0
  2258.