home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / games / volume16 / nethack31 / patch2c / patches02i
Text File  |  1993-06-16  |  57KB  |  2,128 lines

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