home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume7 / nethack3 / patch6l < prev    next >
Encoding:
Internet Message Format  |  1989-11-27  |  55.1 KB

  1. Path: uunet!zephyr.ens.tek.com!tekgen!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v08i065:  NetHack3 -  display oriented dungeons & dragons (Ver. 3.0), Patch6l
  5. Message-ID: <4854@tekred.CNA.TEK.COM>
  6. Date: 22 Nov 89 19:55:04 GMT
  7. Sender: nobody@tekred.CNA.TEK.COM
  8. Lines: 2038
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: Izchak Miller <izchak@linc.cis.upenn.edu>
  12. Posting-number: Volume 8, Issue 65
  13. Archive-name: NetHack3/Patch6l
  14. Patch-To: NetHack3: Volume 7, Issue 56-93
  15.  
  16.  
  17.  
  18. #! /bin/sh
  19. # This is a shell archive.  Remove anything before this line, then unpack
  20. # it by saving it into a file and typing "sh file".  To overwrite existing
  21. # files, type "sh file -c".  You can also feed this as standard input via
  22. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  23. # will see the following message at the end:
  24. #        "End of archive 12 (of 15)."
  25. # Contents:  patches06l
  26. # Wrapped by billr@saab on Wed Nov 22 10:50:19 1989
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. if test -f 'patches06l' -a "${1}" != "-c" ; then 
  29.   echo shar: Will not clobber existing file \"'patches06l'\"
  30. else
  31. echo shar: Extracting \"'patches06l'\" \(52555 characters\)
  32. sed "s/^X//" >'patches06l' <<'END_OF_FILE'
  33. X*** src/Old/topl.c    Sun Nov 19 13:15:11 1989
  34. X--- src/topl.c    Sun Oct 22 11:45:53 1989
  35. X***************
  36. X*** 320,326 ****
  37. X  
  38. X  void
  39. X  putstr(s)
  40. X! register char *s;
  41. X  {
  42. X      while(*s) putsym(*s++);
  43. X  }
  44. X--- 320,326 ----
  45. X  
  46. X  void
  47. X  putstr(s)
  48. X! register const char *s;
  49. X  {
  50. X      while(*s) putsym(*s++);
  51. X  }
  52. X***************
  53. X*** 327,333 ****
  54. X  
  55. X  char
  56. X  yn_function(resp, def)
  57. X! char *resp, def;
  58. X  /*
  59. X   *   Generic yes/no function
  60. X   */
  61. X--- 327,334 ----
  62. X  
  63. X  char
  64. X  yn_function(resp, def)
  65. X! const char *resp;
  66. X! char def;
  67. X  /*
  68. X   *   Generic yes/no function
  69. X   */
  70. X*** src/Old/topten.c    Sun Nov 19 13:15:26 1989
  71. X--- src/topten.c    Sat Nov 18 21:20:51 1989
  72. X***************
  73. X*** 1,4 ****
  74. X! /*    SCCS Id: @(#)topten.c    3.0    88/11/24
  75. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  76. X  /* NetHack may be freely redistributed.  See license for details. */
  77. X  
  78. X--- 1,4 ----
  79. X! /*    SCCS Id: @(#)topten.c    3.0    89/11/15
  80. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  81. X  /* NetHack may be freely redistributed.  See license for details. */
  82. X  
  83. X***************
  84. X*** 37,45 ****
  85. X      char date[7];        /* yymmdd */
  86. X  } *tt_head;
  87. X  
  88. X! static char *itoa P((int)), *ordin P((int));
  89. X  static void outheader();
  90. X! static int outentry P((int,struct toptenentry *,int));
  91. X  
  92. X  void
  93. X  topten(){
  94. X--- 37,45 ----
  95. X      char date[7];        /* yymmdd */
  96. X  } *tt_head;
  97. X  
  98. X! static char *FDECL(itoa, (int)), *FDECL(ordin, (int));
  99. X  static void outheader();
  100. X! static int FDECL(outentry, (int,struct toptenentry *,int));
  101. X  
  102. X  void
  103. X  topten(){
  104. X***************
  105. X*** 416,422 ****
  106. X          Strcat(linebuf, "starved to death");
  107. X          starv = TRUE;
  108. X        } else if(!strcmp(t1->death,"poisoned")) {
  109. X!         Strcat(linebuf, "was posioned");
  110. X        } else if(!strcmp(t1->death,"crushed")) {
  111. X          Strcat(linebuf, "was crushed to death");
  112. X        } else if(!strncmp(t1->death, "turned to stone by ",19)) {
  113. X--- 416,422 ----
  114. X          Strcat(linebuf, "starved to death");
  115. X          starv = TRUE;
  116. X        } else if(!strcmp(t1->death,"poisoned")) {
  117. X!         Strcat(linebuf, "was poisoned");
  118. X        } else if(!strcmp(t1->death,"crushed")) {
  119. X          Strcat(linebuf, "was crushed to death");
  120. X        } else if(!strncmp(t1->death, "turned to stone by ",19)) {
  121. X***************
  122. X*** 437,452 ****
  123. X          Sprintf(eos(linebuf), " [max %d]", t1->maxlvl);
  124. X        if(quit && t1->death[4]) Strcat(linebuf, t1->death + 4);
  125. X      }
  126. X!     if(iskilled) Sprintf(eos(linebuf), " by %s%s",
  127. X        (!strncmp(t1->death, "trick", 5) || !strncmp(t1->death, "the ", 4)
  128. X         || !strncmp(t1->death, "Mr. ", 4) || !strncmp(t1->death, "Ms. ", 4)
  129. X         || !strcmp(t1->death, "contaminated water")
  130. X         || (!strncmp(eos(t1->death)-4,"tion",4) && *(eos(t1->death)-5)!='o')
  131. X!        ) ? "" :
  132. X!       index(vowels,*t1->death) ? "an " : "a ",
  133. X!       t1->death);
  134. X!     if (isstoned) Sprintf(eos(linebuf), " by %s%s", index(vowels,
  135. X!         *(t1->death + 19)) ? "an " : "a ", t1->death + 19);
  136. X      Strcat(linebuf, ".");
  137. X      if(t1->maxhp) {
  138. X        register char *bp = eos(linebuf);
  139. X--- 437,449 ----
  140. X          Sprintf(eos(linebuf), " [max %d]", t1->maxlvl);
  141. X        if(quit && t1->death[4]) Strcat(linebuf, t1->death + 4);
  142. X      }
  143. X!     if(iskilled) Sprintf(eos(linebuf), " by %s",
  144. X        (!strncmp(t1->death, "trick", 5) || !strncmp(t1->death, "the ", 4)
  145. X         || !strncmp(t1->death, "Mr. ", 4) || !strncmp(t1->death, "Ms. ", 4)
  146. X         || !strcmp(t1->death, "contaminated water")
  147. X         || (!strncmp(eos(t1->death)-4,"tion",4) && *(eos(t1->death)-5)!='o')
  148. X!        ) ? t1->death : an(t1->death));
  149. X!     if (isstoned) Sprintf(eos(linebuf), " by %s", an(t1->death + 19));
  150. X      Strcat(linebuf, ".");
  151. X      if(t1->maxhp) {
  152. X        register char *bp = eos(linebuf);
  153. X***************
  154. X*** 566,572 ****
  155. X          if(!argv[1][2]){
  156. X              argc--;
  157. X              argv++;
  158. X!         } else if(!argv[1][3] && index("ABCEHKPRSTVW", argv[1][2])) {
  159. X              argv[1]++;
  160. X              argv[1][0] = '-';
  161. X          } else    argv[1] += 2;
  162. X--- 563,569 ----
  163. X          if(!argv[1][2]){
  164. X              argc--;
  165. X              argv++;
  166. X!         } else if(!argv[1][3] && index(pl_classes, argv[1][2])) {
  167. X              argv[1]++;
  168. X              argv[1][0] = '-';
  169. X          } else    argv[1] += 2;
  170. X***************
  171. X*** 680,688 ****
  172. X         .hacklog or something in his home directory. */
  173. X      flags.beginner = (total_score < 6000);
  174. X      for(i=0; i<6; i++)
  175. X!         if(!index(totchars, "ABCEHKPRSTVW"[i])) {
  176. X          flags.beginner = 1;
  177. X!         if(!pl_character[0]) pl_character[0] = "ABCEHKPRSTVW"[i];
  178. X          break;
  179. X      }
  180. X  #endif /* nonsense /**/
  181. X--- 677,685 ----
  182. X         .hacklog or something in his home directory. */
  183. X      flags.beginner = (total_score < 6000);
  184. X      for(i=0; i<6; i++)
  185. X!         if(!index(totchars, pl_classes[i])) {
  186. X          flags.beginner = 1;
  187. X!         if(!pl_character[0]) pl_character[0] = pl_classes[i];
  188. X          break;
  189. X      }
  190. X  #endif /* nonsense /**/
  191. X*** src/Old/trap.c    Sun Nov 19 13:16:07 1989
  192. X--- src/trap.c    Sat Nov 11 17:06:43 1989
  193. X***************
  194. X*** 1,4 ****
  195. X! /*    SCCS Id: @(#)trap.c    3.0    88/10/22
  196. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  197. X  /* NetHack may be freely redistributed.  See license for details. */
  198. X  
  199. X--- 1,4 ----
  200. X! /*    SCCS Id: @(#)trap.c    3.0    89/11/10
  201. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  202. X  /* NetHack may be freely redistributed.  See license for details. */
  203. X  
  204. X***************
  205. X*** 196,201 ****
  206. X--- 196,207 ----
  207. X                    Levitation ? "float" : "fly");
  208. X              break;
  209. X              }
  210. X+ #ifdef POLYSELF
  211. X+             if(amorphous(uasmon)) {
  212. X+             pline("A bear trap closes harmlessly through you.");
  213. X+             break;
  214. X+             }
  215. X+ #endif
  216. X              u.utrap = 4 + rn2(4);
  217. X              u.utraptype = TT_BEARTRAP;
  218. X              pline("A bear trap closes on your %s!",
  219. X***************
  220. X*** 207,221 ****
  221. X              break;
  222. X          case STATUE_TRAP:
  223. X              deltrap(trap);
  224. X!             for(otmp=fobj; otmp; otmp=otmp->nobj) {
  225. X!             if(otmp->otyp == STATUE && otmp->ox == u.ux &&
  226. X!                 otmp->oy == u.uy && otmp->corpsenm == trap->pm)
  227. X                  if(mtmp=makemon(&mons[trap->pm],u.ux,u.uy)) {
  228. X                  pline("The statue comes to life!");
  229. X                  delobj(otmp);
  230. X                  break;
  231. X                  }
  232. X-             }
  233. X              break;
  234. X          case MONST_TRAP:
  235. X              if(mtmp=makemon(&mons[trap->pm],u.ux,u.uy)) {
  236. X--- 213,226 ----
  237. X              break;
  238. X          case STATUE_TRAP:
  239. X              deltrap(trap);
  240. X!             for(otmp=level.objects[u.ux][u.uy];
  241. X!                         otmp; otmp = otmp->nexthere)
  242. X!             if(otmp->otyp == STATUE && otmp->corpsenm == trap->pm)
  243. X                  if(mtmp=makemon(&mons[trap->pm],u.ux,u.uy)) {
  244. X                  pline("The statue comes to life!");
  245. X                  delobj(otmp);
  246. X                  break;
  247. X                  }
  248. X              break;
  249. X          case MONST_TRAP:
  250. X              if(mtmp=makemon(&mons[trap->pm],u.ux,u.uy)) {
  251. X***************
  252. X*** 323,329 ****
  253. X              } else {
  254. X  #ifdef ENDGAME
  255. X              if(dlevel == ENDLEVEL) {
  256. X!                 pline("A shiver runs down your spine...");
  257. X                  break;
  258. X              }
  259. X  #endif
  260. X--- 328,334 ----
  261. X              } else {
  262. X  #ifdef ENDGAME
  263. X              if(dlevel == ENDLEVEL) {
  264. X!                 You("feel a wrenching sensation.");
  265. X                  break;
  266. X              }
  267. X  #endif
  268. X***************
  269. X*** 344,351 ****
  270. X              You("are covered with rust!");
  271. X              rehumanize();
  272. X              break;
  273. X!             }
  274. X  #endif /* GOLEMS */
  275. X  #endif
  276. X          /* Unlike monsters, traps cannot aim their rust attacks at
  277. X           * you, so instead of looping through and taking either the
  278. X--- 349,364 ----
  279. X              You("are covered with rust!");
  280. X              rehumanize();
  281. X              break;
  282. X!             } else
  283. X  #endif /* GOLEMS */
  284. X+             if (u.umonnum == PM_GREMLIN && rn2(3)) {
  285. X+             pline("A gush of water hits you!");
  286. X+             if(mtmp = cloneu()) {
  287. X+                 mtmp->mhpmax = (u.mhmax /= 2);
  288. X+                 You("multiply.");
  289. X+             }
  290. X+             break;
  291. X+             }
  292. X  #endif
  293. X          /* Unlike monsters, traps cannot aim their rust attacks at
  294. X           * you, so instead of looping through and taking either the
  295. X***************
  296. X*** 635,641 ****
  297. X          mtmp->mtrapseen |= (1 << tt);
  298. X          switch (tt) {
  299. X          case BEAR_TRAP:
  300. X!             if(bigmonst(mtmp->data)) {
  301. X                  if(in_sight)
  302. X                    pline("%s is caught in a bear trap!",
  303. X                      Monnam(mtmp));
  304. X--- 648,656 ----
  305. X          mtmp->mtrapseen |= (1 << tt);
  306. X          switch (tt) {
  307. X          case BEAR_TRAP:
  308. X!             if(mtmp->data->msize > MZ_SMALL &&
  309. X!                !amorphous(mtmp->data)) {
  310. X!                 mtmp->mtrapped = 1;
  311. X                  if(in_sight)
  312. X                    pline("%s is caught in a bear trap!",
  313. X                      Monnam(mtmp));
  314. X***************
  315. X*** 644,650 ****
  316. X                      || mtmp->data == &mons[PM_BUGBEAR])
  317. X                      && flags.soundok)
  318. X                  You("hear the roaring of an angry bear!");
  319. X-                 mtmp->mtrapped = 1;
  320. X              }
  321. X              break;
  322. X  #ifdef POLYSELF
  323. X--- 659,664 ----
  324. X***************
  325. X*** 665,672 ****
  326. X                                  mon_nam(mtmp));
  327. X                  mondied(mtmp);
  328. X                  trapkilled = TRUE;
  329. X!             }
  330. X  #endif /* GOLEMS */
  331. X              break;
  332. X          case PIT:
  333. X          case SPIKED_PIT:
  334. X--- 679,695 ----
  335. X                                  mon_nam(mtmp));
  336. X                  mondied(mtmp);
  337. X                  trapkilled = TRUE;
  338. X!             } else
  339. X  #endif /* GOLEMS */
  340. X+             if (mtmp->data == &mons[PM_GREMLIN] && rn2(3)) {
  341. X+                 struct monst *mtmp2 = clone_mon(mtmp);
  342. X+ 
  343. X+                 if (mtmp2) {
  344. X+                     mtmp2->mhpmax = (mtmp->mhpmax /= 2);
  345. X+                     if(in_sight)
  346. X+                     pline("%s multiplies.", Monnam(mtmp));
  347. X+                 }
  348. X+             }
  349. X              break;
  350. X          case PIT:
  351. X          case SPIKED_PIT:
  352. X***************
  353. X*** 740,746 ****
  354. X              if(!is_flyer(mtmp->data)
  355. X  #ifdef WORM
  356. X                  && !mtmp->wormno
  357. X!                 /* long worms cannot be allowed to change levels */
  358. X  #endif
  359. X                  ){
  360. X  #ifdef WALKIES
  361. X--- 763,769 ----
  362. X              if(!is_flyer(mtmp->data)
  363. X  #ifdef WORM
  364. X                  && !mtmp->wormno
  365. X!                 /* long worms with tails mustn't change levels */
  366. X  #endif
  367. X                  ){
  368. X  #ifdef WALKIES
  369. X***************
  370. X*** 866,872 ****
  371. X          }
  372. X      } else
  373. X          if (Hallucination)
  374. X!             pline("Oh wow!  You're floating in the air!");
  375. X          else
  376. X              You("start to float in the air!");
  377. X  }
  378. X--- 889,895 ----
  379. X          }
  380. X      } else
  381. X          if (Hallucination)
  382. X!             pline("Up, up, and awaaaay!  You're walking on air!");
  383. X          else
  384. X              You("start to float in the air!");
  385. X  }
  386. X***************
  387. X*** 1009,1015 ****
  388. X              }
  389. X          }
  390. X          if (trap)
  391. X!             You("jump onto the teleportation trap...");
  392. X      }
  393. X      if(!trap && (!Teleportation ||
  394. X         (u.ulevel < (pl_character[0] == 'W' ? 8 : 12)
  395. X--- 1032,1043 ----
  396. X              }
  397. X          }
  398. X          if (trap)
  399. X! #ifdef POLYSELF
  400. X!             You("%s onto the teleportation trap.",
  401. X!                 nolimbs(uasmon) ? "slither" : "jump");
  402. X! #else
  403. X!             You("jump onto the teleportation trap.");
  404. X! #endif
  405. X      }
  406. X      if(!trap && (!Teleportation ||
  407. X         (u.ulevel < (pl_character[0] == 'W' ? 8 : 12)
  408. X***************
  409. X*** 1088,1094 ****
  410. X  int attach;
  411. X  {
  412. X      if(!uchain || !uball){
  413. X!         impossible("Where are your chain and ball??");
  414. X          return;
  415. X      }
  416. X      if(!carried(uball))
  417. X--- 1116,1122 ----
  418. X  int attach;
  419. X  {
  420. X      if(!uchain || !uball){
  421. X!         impossible("Where are your ball and chain?");
  422. X          return;
  423. X      }
  424. X      if(!carried(uball))
  425. X***************
  426. X*** 1230,1236 ****
  427. X        }  else
  428. X          You("hear a deafening roar!");
  429. X        while(cnt--)
  430. X!        (void) makemon((struct permonst *) 0, u.ux, u.uy);
  431. X      }
  432. X      else
  433. X        switch (fate) {
  434. X--- 1258,1264 ----
  435. X        }  else
  436. X          You("hear a deafening roar!");
  437. X        while(cnt--)
  438. X!         (void) makemon((struct permonst *) 0, u.ux, u.uy);
  439. X      }
  440. X      else
  441. X        switch (fate) {
  442. X***************
  443. X*** 1256,1262 ****
  444. X              } else {
  445. X                  num = rnd(6);
  446. X                  u.uhpmax -= num;
  447. X!                 losehp(num,"a burst of flame");
  448. X                  break;
  449. X              }
  450. X                }
  451. X--- 1284,1290 ----
  452. X              } else {
  453. X                  num = rnd(6);
  454. X                  u.uhpmax -= num;
  455. X!                 losehp(num,"burst of flame");
  456. X                  break;
  457. X              }
  458. X                }
  459. X***************
  460. X*** 1263,1276 ****
  461. X  
  462. X           /* odd feelings */
  463. X           case 13:   pline("A shiver runs up and down your spine!");
  464. X              break;
  465. X!          case 14:   You("hear distant howling.");
  466. X              break;
  467. X           case 15:   You("suddenly yearn for your distant homeland.");
  468. X              break;
  469. X           case 16:   Your("pack shakes violently!");
  470. X              break;
  471. X!          case 17:    You("smell charred flesh.");
  472. X              break;
  473. X  
  474. X           /* very occasionally something nice happens. */
  475. X--- 1291,1309 ----
  476. X  
  477. X           /* odd feelings */
  478. X           case 13:   pline("A shiver runs up and down your spine!");
  479. X+              /* TO DO: What if you're polymorphed into something spineless? */
  480. X              break;
  481. X!          case 14:    You(Hallucination ?
  482. X!                 "hear the moon howling at you." :
  483. X!                 "hear distant howling.");
  484. X              break;
  485. X           case 15:   You("suddenly yearn for your distant homeland.");
  486. X              break;
  487. X           case 16:   Your("pack shakes violently!");
  488. X              break;
  489. X!          case 17:    You(Hallucination ?
  490. X!                 "smell hamburgers." :
  491. X!                 "smell charred flesh.");
  492. X              break;
  493. X  
  494. X           /* very occasionally something nice happens. */
  495. X***************
  496. X*** 1292,1301 ****
  497. X             {  register struct obj *obj;
  498. X  
  499. X              /* below plines added by GAN 10/30/86 */
  500. X!             if (Hallucination)
  501. X!                 You("feel in touch with the Universal Oneness.");
  502. X!             else
  503. X!                 You("feel like someone is helping you.");
  504. X              for(obj = invent; obj ; obj = obj->nobj)
  505. X                     if(obj->owornmask || obj->otyp == LOADSTONE)
  506. X                      obj->cursed = 0;
  507. X--- 1325,1333 ----
  508. X             {  register struct obj *obj;
  509. X  
  510. X              /* below plines added by GAN 10/30/86 */
  511. X!             You(Hallucination ?
  512. X!                 "feel in touch with the Universal Oneness." :
  513. X!                 "feel like someone is helping you.");
  514. X              for(obj = invent; obj ; obj = obj->nobj)
  515. X                     if(obj->owornmask || obj->otyp == LOADSTONE)
  516. X                      obj->cursed = 0;
  517. X***************
  518. X*** 1328,1334 ****
  519. X      }
  520. X  
  521. X  #ifdef POLYSELF
  522. X!     if(u.usym == S_GREMLIN && rn2(3)) {
  523. X          struct monst *mtmp;
  524. X          if(mtmp = cloneu()) {
  525. X              mtmp->mhpmax = (u.mhmax /= 2);
  526. X--- 1360,1366 ----
  527. X      }
  528. X  
  529. X  #ifdef POLYSELF
  530. X!     if(u.umonnum == PM_GREMLIN && rn2(3)) {
  531. X          struct monst *mtmp;
  532. X          if(mtmp = cloneu()) {
  533. X              mtmp->mhpmax = (u.mhmax /= 2);
  534. X***************
  535. X*** 1376,1382 ****
  536. X  int
  537. X  dountrap() {    /* disarm a trapped object */
  538. X      register struct obj *otmp;
  539. X!     register boolean confused = (Confusion > 0);
  540. X      register int x,y;
  541. X      int ch;
  542. X      struct trap *ttmp;
  543. X--- 1408,1414 ----
  544. X  int
  545. X  dountrap() {    /* disarm a trapped object */
  546. X      register struct obj *otmp;
  547. X!     register boolean confused = (Confusion > 0 || Hallucination > 0);
  548. X      register int x,y;
  549. X      int ch;
  550. X      struct trap *ttmp;
  551. X***************
  552. X*** 1392,1440 ****
  553. X      y = u.uy + u.dy;
  554. X  
  555. X      if(!u.dx && !u.dy) {
  556. X!         if(OBJ_AT(x, y))
  557. X!         for(otmp = fobj; otmp; otmp = otmp->nobj)
  558. X!             if((otmp->ox == x) && (otmp->oy == y))
  559. X!             if(Is_box(otmp)) {
  560. X!                 pline("There is %s here, check for traps? ",
  561. X!                   doname(otmp));
  562. X! 
  563. X!                 switch (ynq()) {
  564. X!                 case 'q': return(0);
  565. X!                 case 'n': continue;
  566. X!                 }
  567. X! 
  568. X!                 if((otmp->otrapped && !confused 
  569. X!                     && rn2(MAXLEVEL+2-dlevel) < 10)
  570. X!                    || confused && !rn2(3)) {
  571. X!                 You("find a trap on the %s!  Disarm it? ",
  572. X!                        xname(otmp));
  573. X  
  574. X!                 switch (ynq()) {
  575. X!                     case 'q': return(1);
  576. X!                     case 'n': continue;
  577. X!                 }
  578. X! 
  579. X!                 if(otmp->otrapped) {
  580. X!                     ch = 15 +
  581. X!                      (pl_character[0] == 'R') ? u.ulevel*3 :
  582. X!                      u.ulevel;
  583. X!                     if(confused || Fumbling || rnd(75+dlevel/2) > ch) {
  584. X!                     You("set it off!");
  585. X!                     chest_trap(otmp, FINGER);
  586. X!                     } else {
  587. X!                     You("disarm it!");
  588. X!                         otmp->otrapped = 0;
  589. X!                     }
  590. X!                 } else pline("That %s was not trapped.",
  591. X!                          doname(otmp));
  592. X!                 return(1);
  593. X                  } else {
  594. X!                 You("find no traps on the %s.",
  595. X!                     xname(otmp));
  596. X!                 return(1);
  597. X                  }
  598. X!             }
  599. X          if ((ttmp = t_at(x,y)) && ttmp->tseen)
  600. X          You("cannot disable this trap.");
  601. X          else
  602. X--- 1424,1465 ----
  603. X      y = u.uy + u.dy;
  604. X  
  605. X      if(!u.dx && !u.dy) {
  606. X!         for(otmp = level.objects[x][y]; otmp; otmp = otmp->nexthere)
  607. X!         if(Is_box(otmp)) {
  608. X!             pline("There is %s here, check for traps? ", doname(otmp));
  609. X  
  610. X!             switch (ynq()) {
  611. X!             case 'q': return(0);
  612. X!             case 'n': continue;
  613. X!             }
  614. X! 
  615. X!             if((otmp->otrapped && !confused 
  616. X!                 && rn2(MAXLEVEL+2-dlevel) < 10)
  617. X!                || confused && !rn2(3)) {
  618. X!             You("find a trap on the %s!  Disarm it? ", xname(otmp));
  619. X! 
  620. X!             switch (ynq()) {
  621. X!                 case 'q': return(1);
  622. X!                 case 'n': continue;
  623. X!             }
  624. X! 
  625. X!             if(otmp->otrapped) {
  626. X!                 ch = 15 + (pl_character[0] == 'R') ? u.ulevel*3
  627. X!                                 : u.ulevel;
  628. X!                 if(confused || Fumbling || rnd(75+dlevel/2) > ch) {
  629. X!                 You("set it off!");
  630. X!                 chest_trap(otmp, FINGER);
  631. X                  } else {
  632. X!                 You("disarm it!");
  633. X!                 otmp->otrapped = 0;
  634. X                  }
  635. X!             } else pline("That %s was not trapped.", doname(otmp));
  636. X!             return(1);
  637. X!             } else {
  638. X!             You("find no traps on the %s.", xname(otmp));
  639. X!             return(1);
  640. X!             }
  641. X!         }
  642. X          if ((ttmp = t_at(x,y)) && ttmp->tseen)
  643. X          You("cannot disable this trap.");
  644. X          else
  645. X***************
  646. X*** 1505,1514 ****
  647. X              Sprintf(buf, "exploding %s", xname(obj));
  648. X  
  649. X              delete_contents(obj);
  650. X!             for(otmp = fobj; otmp; otmp = otmp2) {
  651. X!                 otmp2 = otmp->nobj;
  652. X!                 if((otmp->ox == u.ux) && (otmp->oy == u.uy))
  653. X!                 delobj(otmp);
  654. X              }
  655. X  
  656. X              losehp(d(6,6), buf);
  657. X--- 1530,1539 ----
  658. X              Sprintf(buf, "exploding %s", xname(obj));
  659. X  
  660. X              delete_contents(obj);
  661. X!             for(otmp = level.objects[u.ux][u.uy];
  662. X!                             otmp; otmp = otmp2) {
  663. X!                 otmp2 = otmp->nexthere;
  664. X!                 delobj(otmp);
  665. X              }
  666. X  
  667. X              losehp(d(6,6), buf);
  668. X***************
  669. X*** 1689,1696 ****
  670. X  unconscious()
  671. X  {
  672. X      return (multi < 0 && (!nomovemsg ||
  673. X!           !strncmp(nomovemsg,"You wake", 8) ||
  674. X!           !strncmp(nomovemsg,"You awake", 9) ||
  675. X!           !strncmp(nomovemsg,"You regain con", 15) ||
  676. X!           !strncmp(nomovemsg,"You are consci", 15)));
  677. X  }
  678. X--- 1714,1721 ----
  679. X  unconscious()
  680. X  {
  681. X      return (multi < 0 && (!nomovemsg ||
  682. X!         !strncmp(nomovemsg,"You wake", 8) ||
  683. X!         !strncmp(nomovemsg,"You awake", 9) ||
  684. X!         !strncmp(nomovemsg,"You regain con", 15) ||
  685. X!         !strncmp(nomovemsg,"You are consci", 15)));
  686. X  }
  687. X*** src/Old/u_init.c    Sun Nov 19 13:17:03 1989
  688. X--- src/u_init.c    Fri Nov 17 19:32:23 1989
  689. X***************
  690. X*** 1,4 ****
  691. X! /*    SCCS Id: @(#)u_init.c    3.0    88/04/13
  692. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  693. X  /* NetHack may be freely redistributed.  See license for details. */
  694. X  
  695. X--- 1,4 ----
  696. X! /*    SCCS Id: @(#)u_init.c    3.0    89/11/15
  697. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  698. X  /* NetHack may be freely redistributed.  See license for details. */
  699. X  
  700. X***************
  701. X*** 13,19 ****
  702. X      Bitfield(trbless,2);
  703. X  };
  704. X  
  705. X! static void ini_inv P((struct trobj *));
  706. X  
  707. X  #define    UNDEF_TYP    0
  708. X  #define    UNDEF_SPE    '\177'
  709. X--- 13,19 ----
  710. X      Bitfield(trbless,2);
  711. X  };
  712. X  
  713. X! static void FDECL(ini_inv, (struct trobj *));
  714. X  
  715. X  #define    UNDEF_TYP    0
  716. X  #define    UNDEF_SPE    '\177'
  717. X***************
  718. X*** 27,36 ****
  719. X      "Priest", "Rogue", "Samurai", "Tourist", "Valkyrie", "Wizard"
  720. X  };
  721. X  
  722. X! struct you zerou;
  723. X  
  724. X! #define    NR_OF_ROLES    SIZE(roles)
  725. X! char rolesyms[NR_OF_ROLES + 1];        /* filled by u_init() */
  726. X  
  727. X  struct trobj Cave_man[] = {
  728. X  #define C_ARROWS    2
  729. X--- 27,35 ----
  730. X      "Priest", "Rogue", "Samurai", "Tourist", "Valkyrie", "Wizard"
  731. X  };
  732. X  
  733. X! const char *pl_classes = "ABCEHKPRSTVW";
  734. X  
  735. X! struct you zerou;
  736. X  
  737. X  struct trobj Cave_man[] = {
  738. X  #define C_ARROWS    2
  739. X***************
  740. X*** 235,246 ****
  741. X  static int
  742. X  role_index(pc)
  743. X  char pc;
  744. X! {        /* must be called only from u_init() */
  745. X!         /* so that rolesyms[] is defined */
  746. X      register char *cp;
  747. X  
  748. X!     if(cp = index(rolesyms, pc))
  749. X!         return(cp - rolesyms);
  750. X      return(-1);
  751. X  }
  752. X  
  753. X--- 234,244 ----
  754. X  static int
  755. X  role_index(pc)
  756. X  char pc;
  757. X! {
  758. X      register char *cp;
  759. X  
  760. X!     if(cp = index(pl_classes, pc))
  761. X!         return(cp - pl_classes);
  762. X      return(-1);
  763. X  }
  764. X  
  765. X***************
  766. X*** 258,266 ****
  767. X          roles[2] = "Cave-woman";
  768. X          roles[6] = "Priestess";
  769. X      }
  770. X-     for(i = 0; i < NR_OF_ROLES; i++)
  771. X-         rolesyms[i] = roles[i][0];
  772. X-     rolesyms[i] = 0;
  773. X  
  774. X      if(pc = pl_character[0]) {
  775. X          if('a' <= pc && pc <= 'z') pc += 'A'-'a';
  776. X--- 256,261 ----
  777. X***************
  778. X*** 290,305 ****
  779. X          goto beginner;
  780. X  
  781. X      Printf("\nWhat kind of character are you:\n\n");
  782. X!     Printf("         An");
  783. X!     Printf(" %s,",roles[0]);
  784. X!     for(i = 1; i < NR_OF_ROLES; i++) {
  785. X!         Printf(" a%s %s", index(vowels,roles[i][0]) ? "n" : "", roles[i]);
  786. X!         if((((i + 1) % 4) == 0) && (i != NR_OF_ROLES -1)) Printf(",\n        ");
  787. X!         else if(i < NR_OF_ROLES - 2)    Printf(",");
  788. X!         if(i == NR_OF_ROLES - 2)    Printf(" or");
  789. X      }
  790. X      Printf("?\n         [");
  791. X!     for(i = 0; i < NR_OF_ROLES; i++) Printf("%c,", rolesyms[i]);
  792. X      Printf(" or Q] ");
  793. X  
  794. X      while(pc = readchar()) {
  795. X--- 285,300 ----
  796. X          goto beginner;
  797. X  
  798. X      Printf("\nWhat kind of character are you:\n\n");
  799. X!     Printf("      %s,", An(roles[0]));
  800. X!     for(i = 1; i < SIZE(roles); i++) {
  801. X!         Printf(" %s", an(roles[i]));
  802. X!         if((((i + 1) % 4) == 0) && (i != SIZE(roles) -1)) 
  803. X!             Printf(",\n        ");
  804. X!         else if(i < SIZE(roles) - 2)    Printf(",");
  805. X!         if(i == SIZE(roles) - 2)    Printf(" or");
  806. X      }
  807. X      Printf("?\n         [");
  808. X!     for(i = 0; i < SIZE(roles); i++) Printf("%c,", pl_classes[i]);
  809. X      Printf(" or Q] ");
  810. X  
  811. X      while(pc = readchar()) {
  812. X***************
  813. X*** 321,331 ****
  814. X  
  815. X  beginner:
  816. X      if(!pc) {
  817. X!         i = rn2(NR_OF_ROLES);
  818. X!         pc = rolesyms[i];
  819. X!         Printf("\nThis game you will be %s %s.\n",
  820. X!             index("AEIOU", roles[i][0]) ? "an" : "a",
  821. X!             roles[i]);
  822. X          getret();
  823. X          /* give him some feedback in case mklev takes much time */
  824. X          (void) putchar('\n');
  825. X--- 316,324 ----
  826. X  
  827. X  beginner:
  828. X      if(!pc) {
  829. X!         i = rn2(SIZE(roles));
  830. X!         pc = pl_classes[i];
  831. X!         Printf("\nThis game you will be %s.\n", an(roles[i]));
  832. X          getret();
  833. X          /* give him some feedback in case mklev takes much time */
  834. X          (void) putchar('\n');
  835. X***************
  836. X*** 503,509 ****
  837. X          ini_inv(Wishing);
  838. X  #endif
  839. X      find_ac();            /* get initial ac value */
  840. X!     init_attr((pick != 'Y') ? 69 : 72);    /* init attribute values */
  841. X      max_rank_sz();            /* set max str size for class ranks */
  842. X  /*
  843. X   *    Do we really need this?
  844. X--- 496,502 ----
  845. X          ini_inv(Wishing);
  846. X  #endif
  847. X      find_ac();            /* get initial ac value */
  848. X!     init_attr((pick != 'Y') ? 75 : 77);    /* init attribute values */
  849. X      max_rank_sz();            /* set max str size for class ranks */
  850. X  /*
  851. X   *    Do we really need this?
  852. X***************
  853. X*** 619,626 ****
  854. X          if(obj->olet == FOOD_SYM && undefined) {
  855. X              obj->known = 1;
  856. X              /* needed for tins and eggs; harmless otherwise */
  857. X!             obj->bknown = (obj->otyp != DEAD_LIZARD);
  858. X!             /* only for dead lizards does the blessing not matter */
  859. X          }
  860. X          /*
  861. X           * The below lines not needed because they don't correspond
  862. X--- 612,618 ----
  863. X          if(obj->olet == FOOD_SYM && undefined) {
  864. X              obj->known = 1;
  865. X              /* needed for tins and eggs; harmless otherwise */
  866. X!             obj->bknown = 1;
  867. X          }
  868. X          /*
  869. X           * The below lines not needed because they don't correspond
  870. X*** src/Old/uhitm.c    Sun Nov 19 13:17:33 1989
  871. X--- src/uhitm.c    Sun Nov 19 09:25:37 1989
  872. X***************
  873. X*** 1,4 ****
  874. X! /*    SCCS Id: @(#)uhitm.c    3.0    88/04/11
  875. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  876. X  /* NetHack may be freely redistributed.  See license for details. */
  877. X  
  878. X--- 1,4 ----
  879. X! /*    SCCS Id: @(#)uhitm.c    3.0    89/11/19
  880. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  881. X  /* NetHack may be freely redistributed.  See license for details. */
  882. X  
  883. X***************
  884. X*** 344,353 ****
  885. X          }
  886. X      } else {
  887. X          if(obj->olet == WEAPON_SYM || obj->otyp == PICK_AXE ||
  888. X!            obj->olet == ROCK_SYM) {
  889. X  
  890. X          if(obj == uwep && (obj->otyp > VOULGE || obj->otyp < BOOMERANG)
  891. X!                 && obj->otyp != PICK_AXE)
  892. X              tmp = rnd(2);
  893. X          else {
  894. X              tmp = dmgval(obj, mon->data);
  895. X--- 344,353 ----
  896. X          }
  897. X      } else {
  898. X          if(obj->olet == WEAPON_SYM || obj->otyp == PICK_AXE ||
  899. X!            obj->otyp == UNICORN_HORN || obj->olet == ROCK_SYM) {
  900. X  
  901. X          if(obj == uwep && (obj->otyp > VOULGE || obj->otyp < BOOMERANG)
  902. X!             && obj->otyp != PICK_AXE && obj->otyp != UNICORN_HORN)
  903. X              tmp = rnd(2);
  904. X          else {
  905. X              tmp = dmgval(obj, mon->data);
  906. X***************
  907. X*** 430,436 ****
  908. X                  xkilled(mon,0);
  909. X                  return(FALSE);
  910. X              }
  911. X!             tmp = bigmonst(&mons[obj->corpsenm]) ? 5 : 2 ;
  912. X              break;
  913. X          case EGG: /* only possible if hand-to-hand */
  914. X              if(obj->corpsenm > -1
  915. X--- 430,436 ----
  916. X                  xkilled(mon,0);
  917. X                  return(FALSE);
  918. X              }
  919. X!             tmp = mons[obj->corpsenm].msize + 1;
  920. X              break;
  921. X          case EGG: /* only possible if hand-to-hand */
  922. X              if(obj->corpsenm > -1
  923. X***************
  924. X*** 629,635 ****
  925. X  
  926. X      stoned = FALSE;
  927. X      if (is_demon(uasmon) && !rn2(13) && !uwep
  928. X! # ifdef HARD
  929. X          && u.umonnum != PM_SUCCUBUS && u.umonnum != PM_INCUBUS
  930. X          && u.umonnum != PM_BALROG
  931. X  # endif
  932. X--- 629,635 ----
  933. X  
  934. X      stoned = FALSE;
  935. X      if (is_demon(uasmon) && !rn2(13) && !uwep
  936. X! # ifdef INFERNO
  937. X          && u.umonnum != PM_SUCCUBUS && u.umonnum != PM_INCUBUS
  938. X          && u.umonnum != PM_BALROG
  939. X  # endif
  940. X***************
  941. X*** 1311,1317 ****
  942. X          }
  943. X          break;
  944. X            case AD_COLD:        /* brown mold or blue jelly */
  945. X!         if(dist(mon->mx, mon->my) <= 3) {
  946. X              tmp = d((int)mon->m_lev+1, (int)ptr->mattk[i].damd);
  947. X              if(Cold_resistance) {
  948. X                shieldeff(u.ux, u.uy);
  949. X--- 1311,1317 ----
  950. X          }
  951. X          break;
  952. X            case AD_COLD:        /* brown mold or blue jelly */
  953. X!         if(monnear(mon, u.ux, u.uy)) {
  954. X              tmp = d((int)mon->m_lev+1, (int)ptr->mattk[i].damd);
  955. X              if(Cold_resistance) {
  956. X                shieldeff(u.ux, u.uy);
  957. X***************
  958. X*** 1347,1353 ****
  959. X              make_stunned((long)d((int)mon->m_lev+1, (int)ptr->mattk[i].damd), TRUE);
  960. X          break;
  961. X            case AD_FIRE:
  962. X!         if(dist(mon->mx, mon->my) <= 3) {
  963. X              tmp = d((int)mon->m_lev+1, (int)ptr->mattk[i].damd);
  964. X              if(Fire_resistance) {
  965. X                shieldeff(u.ux, u.uy);
  966. X--- 1347,1353 ----
  967. X              make_stunned((long)d((int)mon->m_lev+1, (int)ptr->mattk[i].damd), TRUE);
  968. X          break;
  969. X            case AD_FIRE:
  970. X!         if(monnear(mon, u.ux, u.uy)) {
  971. X              tmp = d((int)mon->m_lev+1, (int)ptr->mattk[i].damd);
  972. X              if(Fire_resistance) {
  973. X                shieldeff(u.ux, u.uy);
  974. X***************
  975. X*** 1379,1385 ****
  976. X      if(!u.ustuck && !mtmp->mflee && dmgtype(mtmp->data,AD_STCK))
  977. X          u.ustuck = mtmp;
  978. X      if (Blind) goto generic;
  979. X!     else if (levl[u.ux+u.dx][u.uy+u.dy].scrsym == DOOR_SYM)
  980. X  #ifdef SPELLS
  981. X      {
  982. X          if (IS_ROCK(levl[u.ux+u.dx][u.uy+u.dy].typ) ||
  983. X--- 1379,1385 ----
  984. X      if(!u.ustuck && !mtmp->mflee && dmgtype(mtmp->data,AD_STCK))
  985. X          u.ustuck = mtmp;
  986. X      if (Blind) goto generic;
  987. X!     else if (levl[u.ux+u.dx][u.uy+u.dy].scrsym == CLOSED_DOOR_SYM)
  988. X  #ifdef SPELLS
  989. X      {
  990. X          if (IS_ROCK(levl[u.ux+u.dx][u.uy+u.dy].typ) ||
  991. X*** src/Old/unixtty.c    Sun Nov 19 14:51:27 1989
  992. X--- src/unixtty.c    Sun Nov 19 14:45:10 1989
  993. X***************
  994. X*** 38,43 ****
  995. X--- 38,44 ----
  996. X  #define CBRKMASK    ICANON
  997. X  #define CBRKON        ! /* reverse condition */
  998. X  #define OSPEED(x)    ((x).c_cflag & CBAUD)
  999. X+ #define IS_7BIT(x)    ((x).c_cflag & CS7)
  1000. X  #define inputflags    c_iflag
  1001. X  #define STRIPHI        ISTRIP
  1002. X  #define GTTY(x)        (ioctl(0, TCGETA, x))
  1003. X***************
  1004. X*** 63,68 ****
  1005. X--- 64,70 ----
  1006. X  #define CBRKMASK    CBREAK
  1007. X  #define CBRKON        /* empty */
  1008. X  #define inputflags    sg_flags    /* don't know how enabling meta bits */
  1009. X+ #define IS_7BIT(x)    (FALSE)
  1010. X  #define STRIPHI        0        /* should actually be done on BSD */
  1011. X  #define OSPEED(x)    (x).sg_ospeed
  1012. X  #define GTTY(x)        (gtty(0, x))
  1013. X***************
  1014. X*** 154,160 ****
  1015. X  #endif
  1016. X          change++;
  1017. X      }
  1018. X!     curttyb.inputflags &=~ STRIPHI;
  1019. X      /* If an interrupt character is used, it will be overriden and
  1020. X       * set to ^C.
  1021. X       */
  1022. X--- 156,162 ----
  1023. X  #endif
  1024. X          change++;
  1025. X      }
  1026. X!     if(!IS_7BIT(inittyb)) curttyb.inputflags &=~ STRIPHI;
  1027. X      /* If an interrupt character is used, it will be overriden and
  1028. X       * set to ^C.
  1029. X       */
  1030. X*** src/Old/vault.c    Sun Nov 19 13:19:02 1989
  1031. X--- src/vault.c    Sat Oct 21 20:52:11 1989
  1032. X***************
  1033. X*** 147,153 ****
  1034. X  int
  1035. X  gd_move(){
  1036. X      int x, y, nx, ny;
  1037. X!     int dx, dy, gx, gy, typ, i;
  1038. X      struct fakecorridor *fcp;
  1039. X      register struct rm *crm;
  1040. X  
  1041. X--- 147,154 ----
  1042. X  int
  1043. X  gd_move(){
  1044. X      int x, y, nx, ny;
  1045. X!     int dx, dy, gx, gy, i;
  1046. X!     uchar typ;
  1047. X      struct fakecorridor *fcp;
  1048. X      register struct rm *crm;
  1049. X  
  1050. X*** src/Old/weapon.c    Sun Nov 19 13:19:28 1989
  1051. X--- src/weapon.c    Sun Nov 19 09:25:40 1989
  1052. X***************
  1053. X*** 1,4 ****
  1054. X! /*    SCCS Id: @(#)weapon.c    3.0    89/04/24
  1055. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1056. X  /* NetHack may be freely redistributed.  See license for details. */
  1057. X  
  1058. X--- 1,4 ----
  1059. X! /*    SCCS Id: @(#)weapon.c    3.0    89/11/19
  1060. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1061. X  /* NetHack may be freely redistributed.  See license for details. */
  1062. X  
  1063. X***************
  1064. X*** 22,28 ****
  1065. X  {
  1066. X      int    tmp = 0;
  1067. X  
  1068. X!     if(otmp->olet == WEAPON_SYM || otmp->otyp == PICK_AXE)
  1069. X          tmp += otmp->spe;
  1070. X  
  1071. X  /*    Put weapon specific "to hit" bonuses in below:        */
  1072. X--- 22,29 ----
  1073. X  {
  1074. X      int    tmp = 0;
  1075. X  
  1076. X!     if(otmp->olet == WEAPON_SYM || otmp->otyp == PICK_AXE
  1077. X!                         || otmp->otyp == UNICORN_HORN)
  1078. X          tmp += otmp->spe;
  1079. X  
  1080. X  /*    Put weapon specific "to hit" bonuses in below:        */
  1081. X***************
  1082. X*** 75,81 ****
  1083. X  
  1084. X      if(otmp->otyp == CREAM_PIE)    return(0);
  1085. X  
  1086. X!     if(bigmonst(ptr)) {
  1087. X          if(objects[otmp->otyp].wldam)
  1088. X          tmp = rnd(objects[otmp->otyp].wldam);
  1089. X          switch (otmp->otyp) {
  1090. X--- 76,82 ----
  1091. X  
  1092. X      if(otmp->otyp == CREAM_PIE)    return(0);
  1093. X  
  1094. X!     if(ptr->msize >= MZ_HUMAN) {
  1095. X          if(objects[otmp->otyp].wldam)
  1096. X          tmp = rnd(objects[otmp->otyp].wldam);
  1097. X          switch (otmp->otyp) {
  1098. X***************
  1099. X*** 132,138 ****
  1100. X      if (otmp->otyp == BULLWHIP && thick_skinned(ptr))
  1101. X          /* thick skinned/scaled creatures don't feel it */
  1102. X          tmp = 0;
  1103. X!     if (otmp->olet == WEAPON_SYM || otmp->otyp == PICK_AXE)
  1104. X          tmp += otmp->spe;
  1105. X  
  1106. X  /*    Put weapon vs. monster type damage bonuses in below:    */
  1107. X--- 133,140 ----
  1108. X      if (otmp->otyp == BULLWHIP && thick_skinned(ptr))
  1109. X          /* thick skinned/scaled creatures don't feel it */
  1110. X          tmp = 0;
  1111. X!     if (otmp->olet == WEAPON_SYM || otmp->otyp == PICK_AXE
  1112. X!                         || otmp->otyp == UNICORN_HORN)
  1113. X          tmp += otmp->spe;
  1114. X  
  1115. X  /*    Put weapon vs. monster type damage bonuses in below:    */
  1116. X***************
  1117. X*** 256,261 ****
  1118. X--- 258,264 ----
  1119. X  /* 0 = used by any monster; 1 = only used by strong monsters */
  1120. X  static const int hwep[][2] =
  1121. X      { {DWARVISH_MATTOCK,1}, {TWO_HANDED_SWORD,1}, {KATANA,0},
  1122. X+       {UNICORN_HORN,1},
  1123. X  #ifdef WORM
  1124. X        {CRYSKNIFE,0},
  1125. X  #endif
  1126. X***************
  1127. X*** 281,287 ****
  1128. X  #else /* TOLKIEN */
  1129. X  /* 0 = used by any monster; 1 = only used by strong monsters */
  1130. X  static const int hwep[][2] =
  1131. X!     { {TWO_HANDED_SWORD,1}, {KATANA,0},
  1132. X  #ifdef WORM
  1133. X        {CRYSKNIFE,0},
  1134. X  #endif
  1135. X--- 284,290 ----
  1136. X  #else /* TOLKIEN */
  1137. X  /* 0 = used by any monster; 1 = only used by strong monsters */
  1138. X  static const int hwep[][2] =
  1139. X!     { {TWO_HANDED_SWORD,1}, {KATANA,0}, {UNICORN_HORN,1},
  1140. X  #ifdef WORM
  1141. X        {CRYSKNIFE,0},
  1142. X  #endif
  1143. X***************
  1144. X*** 336,341 ****
  1145. X--- 339,349 ----
  1146. X      else if(ACURR(A_STR) < 69) sbon = 1;    /* up to 18/50 */
  1147. X      else if(ACURR(A_STR) < 118) sbon = 2;
  1148. X      else sbon = 3;
  1149. X+ /*
  1150. X+  *    Temporary kludge - make it a bit easier for a low level character
  1151. X+  *               to hit until we tune the game a little better.
  1152. X+  */
  1153. X+     sbon += (u.ulevel < 3) ? 2 : (u.ulevel < 5) ? 1 : 0;
  1154. X  
  1155. X      if(ACURR(A_DEX) < 4) return(sbon-3);
  1156. X      else if(ACURR(A_DEX) < 6) return(sbon-2);
  1157. X*** src/Old/wield.c    Sun Nov 19 13:19:57 1989
  1158. X--- src/wield.c    Thu Oct 19 14:23:32 1989
  1159. X***************
  1160. X*** 28,34 ****
  1161. X      }
  1162. X  }
  1163. X  
  1164. X! static const char wield_objs[] = { '#', '-', WEAPON_SYM, 0 };
  1165. X  
  1166. X  int
  1167. X  dowield()
  1168. X--- 28,34 ----
  1169. X      }
  1170. X  }
  1171. X  
  1172. X! static const char wield_objs[] = { '#', '-', WEAPON_SYM, TOOL_SYM, 0 };
  1173. X  
  1174. X  int
  1175. X  dowield()
  1176. X***************
  1177. X*** 76,81 ****
  1178. X--- 76,82 ----
  1179. X          res++;
  1180. X          if(wep->cursed && (wep->olet == WEAPON_SYM ||
  1181. X              wep->otyp == HEAVY_IRON_BALL || wep->otyp == PICK_AXE ||
  1182. X+             wep->otyp == UNICORN_HORN ||
  1183. X              wep->otyp == TIN_OPENER)) {
  1184. X              pline("The %s %s to your %s!",
  1185. X              aobjnam(wep, "weld"),
  1186. X***************
  1187. X*** 96,104 ****
  1188. X          }
  1189. X          setuwep(wep);
  1190. X      }
  1191. X      if(res && uwep)
  1192. X!         unweapon = (uwep->otyp >= BOW || uwep->otyp <= BOOMERANG) ?
  1193. X!         TRUE : FALSE;
  1194. X      return(res);
  1195. X  }
  1196. X  
  1197. X--- 97,108 ----
  1198. X          }
  1199. X          setuwep(wep);
  1200. X      }
  1201. X+     /* Note: Explicitly wielding a pick-axe will not give a "bashing"
  1202. X+      * message.  Wielding one via 'a'pplying it will.
  1203. X+      */
  1204. X      if(res && uwep)
  1205. X!         unweapon = ((uwep->otyp >= BOW || uwep->otyp <= BOOMERANG) &&
  1206. X!             uwep->otyp != PICK_AXE && uwep->otyp != UNICORN_HORN);
  1207. X      return(res);
  1208. X  }
  1209. X  
  1210. X***************
  1211. X*** 182,188 ****
  1212. X  {
  1213. X      if (obj && obj == uwep && obj->cursed &&
  1214. X            (obj->olet == WEAPON_SYM || obj->otyp == HEAVY_IRON_BALL ||
  1215. X!            obj->otyp == TIN_OPENER || obj->otyp == PICK_AXE))
  1216. X      {
  1217. X          obj->bknown = 1;
  1218. X          return 1;
  1219. X--- 186,193 ----
  1220. X  {
  1221. X      if (obj && obj == uwep && obj->cursed &&
  1222. X            (obj->olet == WEAPON_SYM || obj->otyp == HEAVY_IRON_BALL ||
  1223. X!            obj->otyp == TIN_OPENER || obj->otyp == PICK_AXE ||
  1224. X!            obj->otyp == UNICORN_HORN))
  1225. X      {
  1226. X          obj->bknown = 1;
  1227. X          return 1;
  1228. X*** src/Old/worm.c    Sun Nov 19 13:20:24 1989
  1229. X--- src/worm.c    Mon Nov 13 21:23:17 1989
  1230. X***************
  1231. X*** 142,147 ****
  1232. X--- 142,151 ----
  1233. X              newsym(wtmp->wx, wtmp->wy);
  1234. X              wtmp->wdispl = 0;
  1235. X          }
  1236. X+         else if (cansee(wtmp->wx, wtmp->wy) && !wtmp->wdispl) {
  1237. X+             atl(wtmp->wx, wtmp->wy, S_WORM_TAIL);
  1238. X+             wtmp->wdispl = 1;
  1239. X+         }
  1240. X  }
  1241. X  
  1242. X  void
  1243. X*** src/Old/worn.c    Sun Nov 19 13:20:37 1989
  1244. X--- src/worn.c    Fri Nov 17 19:32:24 1989
  1245. X***************
  1246. X*** 1,11 ****
  1247. X! /*    SCCS Id: @(#)worn.c    3.0    88/12/23
  1248. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1249. X  /* NetHack may be freely redistributed.  See license for details. */
  1250. X  
  1251. X  #include "hack.h"
  1252. X  
  1253. X! static const char crispy[] = "The flames of Hell burn you to a crisp.";
  1254. X! static void set_armor_intrinsic P((struct obj *,long,BOOLEAN_P));
  1255. X  
  1256. X  const struct worn {
  1257. X      long w_mask;
  1258. X--- 1,11 ----
  1259. X! /*    SCCS Id: @(#)worn.c    3.0    89/11/15
  1260. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1261. X  /* NetHack may be freely redistributed.  See license for details. */
  1262. X  
  1263. X  #include "hack.h"
  1264. X  
  1265. X! static const char crispy[] = "The flames of hell burn you to a crisp.";
  1266. X! static void FDECL(set_armor_intrinsic, (struct obj *,BOOLEAN_P));
  1267. X  
  1268. X  const struct worn {
  1269. X      long w_mask;
  1270. X***************
  1271. X*** 49,63 ****
  1272. X              u.uprops[objects[oobj->otyp].oc_oprop].p_flgs = 
  1273. X                  u.uprops[objects[oobj->otyp].oc_oprop].p_flgs & 
  1274. X                  ~wp->w_mask;
  1275. X!             set_armor_intrinsic(oobj, wp->w_mask, 0);
  1276. X          }
  1277. X          *(wp->w_obj) = obj;
  1278. X          if(obj) {
  1279. X              obj->owornmask |= wp->w_mask;
  1280. X!             u.uprops[objects[obj->otyp].oc_oprop].p_flgs = 
  1281. X                  u.uprops[objects[obj->otyp].oc_oprop].p_flgs | 
  1282. X                  wp->w_mask;
  1283. X!             set_armor_intrinsic(obj, wp->w_mask, 1);
  1284. X          }
  1285. X      }
  1286. X      /* A kludge to solve the problem of someone gaining fire resistance
  1287. X--- 49,67 ----
  1288. X              u.uprops[objects[oobj->otyp].oc_oprop].p_flgs = 
  1289. X                  u.uprops[objects[oobj->otyp].oc_oprop].p_flgs & 
  1290. X                  ~wp->w_mask;
  1291. X!             set_armor_intrinsic(oobj, 0);
  1292. X          }
  1293. X          *(wp->w_obj) = obj;
  1294. X          if(obj) {
  1295. X              obj->owornmask |= wp->w_mask;
  1296. X!         /* prevent getting intrinsics from wielding potions, etc... */
  1297. X!         /* wp_mask should be same as mask at this point */
  1298. X!             if(obj->olet == WEAPON_SYM || mask != W_WEP) {
  1299. X!             u.uprops[objects[obj->otyp].oc_oprop].p_flgs = 
  1300. X                  u.uprops[objects[obj->otyp].oc_oprop].p_flgs | 
  1301. X                  wp->w_mask;
  1302. X!             set_armor_intrinsic(obj, 1);
  1303. X!             }
  1304. X          }
  1305. X      }
  1306. X      /* A kludge to solve the problem of someone gaining fire resistance
  1307. X***************
  1308. X*** 98,104 ****
  1309. X                  u.uprops[objects[obj->otyp].oc_oprop].p_flgs & 
  1310. X                      ~wp->w_mask;
  1311. X              obj->owornmask &= ~wp->w_mask;
  1312. X!             set_armor_intrinsic(obj, wp->w_mask, 0);
  1313. X          }
  1314. X      /* See comments above in setworn().  The major difference is the
  1315. X       * need to check AMULET_SYM so if someone goes to Hell without
  1316. X--- 102,108 ----
  1317. X                  u.uprops[objects[obj->otyp].oc_oprop].p_flgs & 
  1318. X                      ~wp->w_mask;
  1319. X              obj->owornmask &= ~wp->w_mask;
  1320. X!             set_armor_intrinsic(obj, 0);
  1321. X          }
  1322. X      /* See comments above in setworn().  The major difference is the
  1323. X       * need to check AMULET_SYM so if someone goes to Hell without
  1324. X***************
  1325. X*** 129,137 ****
  1326. X  }
  1327. X  
  1328. X  static void
  1329. X! set_armor_intrinsic(obj,maskbit,on)
  1330. X  register struct obj *obj;
  1331. X- long maskbit;    /* people can do funny things like wield armor */
  1332. X  boolean on;
  1333. X  {
  1334. X      long *mask;
  1335. X--- 133,140 ----
  1336. X  }
  1337. X  
  1338. X  static void
  1339. X! set_armor_intrinsic(obj,on)
  1340. X  register struct obj *obj;
  1341. X  boolean on;
  1342. X  {
  1343. X      long *mask;
  1344. X***************
  1345. X*** 163,168 ****
  1346. X          default:
  1347. X              return;
  1348. X      }
  1349. X!     if (on) *mask |= maskbit;
  1350. X!     else *mask &= ~maskbit;
  1351. X  }
  1352. X--- 166,171 ----
  1353. X          default:
  1354. X              return;
  1355. X      }
  1356. X!     if (on) *mask |= WORN_ARMOR;
  1357. X!     else *mask &= ~WORN_ARMOR;
  1358. X  }
  1359. X*** src/Old/zap.c    Sun Nov 19 13:21:06 1989
  1360. X--- src/zap.c    Sat Nov 11 17:59:32 1989
  1361. X***************
  1362. X*** 1,4 ****
  1363. X! /*    SCCS Id: @(#)zap.c    3.0    88/10/25
  1364. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1365. X  /* NetHack may be freely redistributed.  See license for details. */
  1366. X  
  1367. X--- 1,4 ----
  1368. X! /*    SCCS Id: @(#)zap.c    3.0    89/11/08
  1369. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1370. X  /* NetHack may be freely redistributed.  See license for details. */
  1371. X  
  1372. X***************
  1373. X*** 45,51 ****
  1374. X  
  1375. X  #ifdef TEXTCOLOR
  1376. X  static const int zapcolor[10] = {
  1377. X!     AT_ZAP, RED, AT_ZAP, WHITE, AT_ZAP, WHITE,
  1378. X      AT_ZAP, AT_ZAP, AT_ZAP, AT_ZAP
  1379. X  };
  1380. X  #endif
  1381. X--- 45,51 ----
  1382. X  
  1383. X  #ifdef TEXTCOLOR
  1384. X  static const int zapcolor[10] = {
  1385. X!     AT_ZAP, RED|BRIGHT, AT_ZAP, WHITE|BRIGHT, AT_ZAP, WHITE|BRIGHT,
  1386. X      AT_ZAP, AT_ZAP, AT_ZAP, AT_ZAP
  1387. X  };
  1388. X  #endif
  1389. X***************
  1390. X*** 52,58 ****
  1391. X  
  1392. X  /* Routines for IMMEDIATE wands and spells. */
  1393. X  /* bhitm: monster mtmp was hit by the effect of wand or spell otmp */
  1394. X! static int
  1395. X  bhitm(mtmp, otmp)
  1396. X  register struct monst *mtmp;
  1397. X  register struct obj *otmp;
  1398. X--- 52,61 ----
  1399. X  
  1400. X  /* Routines for IMMEDIATE wands and spells. */
  1401. X  /* bhitm: monster mtmp was hit by the effect of wand or spell otmp */
  1402. X! #ifndef OVERLAY
  1403. X! static 
  1404. X! #endif
  1405. X! int
  1406. X  bhitm(mtmp, otmp)
  1407. X  register struct monst *mtmp;
  1408. X  register struct obj *otmp;
  1409. X***************
  1410. X*** 168,188 ****
  1411. X  register struct obj *obj;
  1412. X  boolean ininv;
  1413. X  {
  1414. X!     register struct monst *mtmp;
  1415. X  
  1416. X      if(obj->otyp == CORPSE) {
  1417. X!         int montype,x,y,nl;
  1418. X!         char buf[BUFSZ];
  1419. X  
  1420. X-         if (nl = obj->onamelth) Strcpy(buf, ONAME(obj));
  1421. X-         montype = obj->corpsenm;
  1422. X-         if (ininv) {
  1423. X-             x = u.ux; y = u.uy;
  1424. X-             useup(obj);
  1425. X-         } else {
  1426. X-             x = obj->ox; y = obj->oy;
  1427. X-             useupf(obj);
  1428. X-         }
  1429. X          if (cant_create(&montype)) { /* will make zombie instead */
  1430. X              mtmp = makemon(&mons[PM_HUMAN_ZOMBIE], x, y);
  1431. X              if (mtmp) {
  1432. X--- 171,183 ----
  1433. X  register struct obj *obj;
  1434. X  boolean ininv;
  1435. X  {
  1436. X!     register struct monst *mtmp = (struct monst *)0;
  1437. X  
  1438. X      if(obj->otyp == CORPSE) {
  1439. X!         int montype = obj->corpsenm;
  1440. X!         int x = ininv ? u.ux : obj->ox;
  1441. X!         int y = ininv ? u.uy : obj->oy;
  1442. X  
  1443. X          if (cant_create(&montype)) { /* will make zombie instead */
  1444. X              mtmp = makemon(&mons[PM_HUMAN_ZOMBIE], x, y);
  1445. X              if (mtmp) {
  1446. X***************
  1447. X*** 190,213 ****
  1448. X                  mtmp->mspeed = MFAST;
  1449. X              }
  1450. X          } else {
  1451. X  #ifdef ARMY
  1452. X              if (is_mercenary(&mons[montype]))
  1453. X                  montype = PM_UNARMORED_SOLDIER;
  1454. X  #endif
  1455. X!             mons[montype].pxlth += nl;
  1456. X              mtmp = makemon(&mons[montype], x, y);
  1457. X!             mons[montype].pxlth -= nl;
  1458. X              if (mtmp) {
  1459. X                  /* Monster retains its name */
  1460. X!                 mtmp->mnamelth = nl;
  1461. X!                 if (nl) Strcpy(NAME(mtmp), buf);
  1462. X                  /* No inventory for newly revived monsters */
  1463. X!                 while(obj = (mtmp->minvent)) {
  1464. X!                     mtmp->minvent = obj->nobj;
  1465. X!                     free((genericptr_t)obj);
  1466. X                  }
  1467. X              }
  1468. X!         }
  1469. X      }
  1470. X      return mtmp;
  1471. X  }
  1472. X--- 185,214 ----
  1473. X                  mtmp->mspeed = MFAST;
  1474. X              }
  1475. X          } else {
  1476. X+             struct obj *otmp;
  1477. X  #ifdef ARMY
  1478. X              if (is_mercenary(&mons[montype]))
  1479. X                  montype = PM_UNARMORED_SOLDIER;
  1480. X  #endif
  1481. X!             mons[montype].pxlth += obj->onamelth;
  1482. X              mtmp = makemon(&mons[montype], x, y);
  1483. X!             mons[montype].pxlth -= obj->onamelth;
  1484. X              if (mtmp) {
  1485. X                  /* Monster retains its name */
  1486. X!                 if (mtmp->mnamelth = obj->onamelth)
  1487. X!                     Strcpy(NAME(mtmp), ONAME(obj));
  1488. X                  /* No inventory for newly revived monsters */
  1489. X!                 while(otmp = (mtmp->minvent)) {
  1490. X!                     mtmp->minvent = otmp->nobj;
  1491. X!                     free((genericptr_t)otmp);
  1492. X                  }
  1493. X              }
  1494. X!         }
  1495. X!         if (mtmp && obj->oeaten)
  1496. X!             mtmp->mhp = eaten_stat(mtmp->mhp, obj);
  1497. X!         if (ininv) useup(obj);
  1498. X!         else useupf(obj);
  1499. X!         newsym(x, y);
  1500. X      }
  1501. X      return mtmp;
  1502. X  }
  1503. X***************
  1504. X*** 247,252 ****
  1505. X--- 248,272 ----
  1506. X  }
  1507. X  
  1508. X  static int
  1509. X+ bhitgold(gold, otmp)
  1510. X+ register struct gold *gold;
  1511. X+ register struct obj *otmp;
  1512. X+ {
  1513. X+     switch(otmp->otyp) {
  1514. X+     case WAN_TELEPORTATION:
  1515. X+ #ifdef SPELLS
  1516. X+     case SPE_TELEPORT_AWAY:
  1517. X+ #endif
  1518. X+         rlocgold(gold);
  1519. X+         break;
  1520. X+     }
  1521. X+     return 1;
  1522. X+ }
  1523. X+ 
  1524. X+ #ifndef OVERLAY
  1525. X+ static 
  1526. X+ #endif
  1527. X+ int
  1528. X  bhito(obj, otmp)    /* object obj was hit by the effect of wand otmp */
  1529. X  register struct obj *obj, *otmp;    /* returns TRUE if sth was done */
  1530. X  {
  1531. X***************
  1532. X*** 294,301 ****
  1533. X              (otmp2->olet == WEAPON_SYM && otmp2->otyp <= SHURIKEN))
  1534. X              otmp2->opoisoned = 1;
  1535. X  
  1536. X!         /* Turn dragon corpses into dragon armors */
  1537. X!         if (obj->otyp == CORPSE && obj->corpsenm >= PM_GRAY_DRAGON
  1538. X                  && obj->corpsenm <= PM_YELLOW_DRAGON) {
  1539. X              if (!rn2(10)) { /* Random failure */
  1540. X                  otmp2->otyp = TIN;
  1541. X--- 314,322 ----
  1542. X              (otmp2->olet == WEAPON_SYM && otmp2->otyp <= SHURIKEN))
  1543. X              otmp2->opoisoned = 1;
  1544. X  
  1545. X!         if (obj->otyp == CORPSE){
  1546. X!             /* Turn dragon corpses into dragon armors */
  1547. X!             if (obj->corpsenm >= PM_GRAY_DRAGON
  1548. X                  && obj->corpsenm <= PM_YELLOW_DRAGON) {
  1549. X              if (!rn2(10)) { /* Random failure */
  1550. X                  otmp2->otyp = TIN;
  1551. X***************
  1552. X*** 309,314 ****
  1553. X--- 330,344 ----
  1554. X                  otmp2->cursed = 0;
  1555. X              }
  1556. X              otmp2->corpsenm = obj->corpsenm;
  1557. X+             /* and croc corpses into shoes */
  1558. X+             } else if (obj->corpsenm == PM_CROCODILE) {
  1559. X+             otmp2->otyp = LOW_BOOTS;
  1560. X+             otmp2->olet = ARMOR_SYM;
  1561. X+             otmp2->spe = 0;
  1562. X+             otmp2->rustfree = 1;
  1563. X+             otmp2->quan = 1;
  1564. X+             otmp2->cursed = 0;
  1565. X+             }
  1566. X          }
  1567. X  
  1568. X          /* update the weight */
  1569. X***************
  1570. X*** 732,746 ****
  1571. X                  (void)close_drawbridge(u.ux, u.uy);
  1572. X              else
  1573. X  #endif
  1574. X!             if (OBJ_AT(u.ux, u.uy)) {
  1575. X!             register struct obj *otmp,*otmp2;
  1576. X  
  1577. X!             /* changed by GAN to hit all objects there */
  1578. X!             for(otmp = fobj; otmp ; otmp = otmp2) {
  1579. X!                 otmp2 = otmp->nobj;
  1580. X                  /* save pointer as bhito may destroy otmp */
  1581. X!                 if(otmp->ox == u.ux && otmp->oy == u.uy)
  1582. X!                         (void) bhito(otmp, obj);
  1583. X              }
  1584. X              }
  1585. X          }
  1586. X--- 762,778 ----
  1587. X                  (void)close_drawbridge(u.ux, u.uy);
  1588. X              else
  1589. X  #endif
  1590. X!             {
  1591. X!             register struct obj *otmp, *otmp2;
  1592. X  
  1593. X!             if(levl[u.ux][u.uy].gmask)
  1594. X!                 (void) bhitgold(g_at(u.ux, u.uy), obj);
  1595. X!             for(otmp = level.objects[u.ux][u.uy];
  1596. X!                             otmp; otmp = otmp2) {
  1597. X!                 /* changed by GAN to hit all objects there */
  1598. X!                 otmp2 = otmp->nexthere;
  1599. X                  /* save pointer as bhito may destroy otmp */
  1600. X!                 (void) bhito(otmp, obj);
  1601. X              }
  1602. X              }
  1603. X          }
  1604. X***************
  1605. X*** 842,852 ****
  1606. X                          room->typ == SDOOR) {
  1607. X                          room->typ = DOOR;
  1608. X                          room->doormask = D_NODOOR;
  1609. X!                         if(in_shop(zx,zy)) {
  1610. X!                         shopdoor = TRUE;
  1611. X!                         dlx = zx;
  1612. X!                         dly = zy;
  1613. X!                         }
  1614. X                          digdepth -= 2;
  1615. X                      } else {
  1616. X                          room->typ = CORR;
  1617. X--- 874,881 ----
  1618. X                          room->typ == SDOOR) {
  1619. X                          room->typ = DOOR;
  1620. X                          room->doormask = D_NODOOR;
  1621. X!                         mnewsym(zx, zy);
  1622. X!                         if (cansee(zx,zy)) prl(zx, zy);
  1623. X                          digdepth -= 2;
  1624. X                      } else {
  1625. X                          room->typ = CORR;
  1626. X***************
  1627. X*** 857,862 ****
  1628. X--- 886,893 ----
  1629. X                  else if(room->typ == DOOR &&
  1630. X                      (room->doormask & (D_LOCKED | D_CLOSED))) {
  1631. X                      room->doormask = D_NODOOR;
  1632. X+                     mnewsym(zx, zy);
  1633. X+                     if (cansee(zx,zy)) prl(zx, zy);
  1634. X                      if(in_shop(zx,zy)) {
  1635. X                      shopdoor = TRUE;
  1636. X                      dlx = zx;
  1637. X***************
  1638. X*** 870,876 ****
  1639. X              }
  1640. X              mnewsym(zx,zy);    /* not always necessary */
  1641. X              Tmp_at2(-1,-1);    /* closing call */
  1642. X!             if(shopdoor && !in_shop(u.ux, u.uy))
  1643. X                  pay_for_door(dlx, dly, "destroy");
  1644. X              break;
  1645. X              }
  1646. X--- 901,908 ----
  1647. X              }
  1648. X              mnewsym(zx,zy);    /* not always necessary */
  1649. X              Tmp_at2(-1,-1);    /* closing call */
  1650. X!             if(!Blind) prl(u.ux+u.dx, u.uy+u.dy);
  1651. X!             if(shopdoor)
  1652. X                  pay_for_door(dlx, dly, "destroy");
  1653. X              break;
  1654. X              }
  1655. X***************
  1656. X*** 907,915 ****
  1657. X  
  1658. X  void
  1659. X  hit(str,mtmp,force)
  1660. X! register char *str;
  1661. X  register struct monst *mtmp;
  1662. X! register char *force;        /* usually either "." or "!" */
  1663. X  {
  1664. X      if(!cansee(mtmp->mx,mtmp->my) || !flags.verbose) pline("The %s hits it.", str);
  1665. X      else pline("The %s hits %s%s", str, mon_nam(mtmp), force);
  1666. X--- 939,947 ----
  1667. X  
  1668. X  void
  1669. X  hit(str,mtmp,force)
  1670. X! register const char *str;
  1671. X  register struct monst *mtmp;
  1672. X! register const char *force;        /* usually either "." or "!" */
  1673. X  {
  1674. X      if(!cansee(mtmp->mx,mtmp->my) || !flags.verbose) pline("The %s hits it.", str);
  1675. X      else pline("The %s hits %s%s", str, mon_nam(mtmp), force);
  1676. X***************
  1677. X*** 917,923 ****
  1678. X  
  1679. X  void
  1680. X  miss(str,mtmp)
  1681. X! register char *str;
  1682. X  register struct monst *mtmp;
  1683. X  {
  1684. X      pline("The %s misses %s.", str,
  1685. X--- 949,955 ----
  1686. X  
  1687. X  void
  1688. X  miss(str,mtmp)
  1689. X! register const char *str;
  1690. X  register struct monst *mtmp;
  1691. X  {
  1692. X      pline("The %s misses %s.", str,
  1693. X***************
  1694. X*** 941,947 ****
  1695. X  {
  1696. X      register struct monst *mtmp;
  1697. X      register struct obj *otmp;
  1698. X!     register int typ;
  1699. X      boolean shopdoor = FALSE;
  1700. X      xchar dlx, dly;
  1701. X  
  1702. X--- 973,979 ----
  1703. X  {
  1704. X      register struct monst *mtmp;
  1705. X      register struct obj *otmp;
  1706. X!     register uchar typ;
  1707. X      boolean shopdoor = FALSE;
  1708. X      xchar dlx, dly;
  1709. X  
  1710. X***************
  1711. X*** 995,1011 ****
  1712. X              range -= 3;
  1713. X          }
  1714. X          /* modified by GAN to hit all objects */
  1715. X!         if(fhito && OBJ_AT(bhitpos.x, bhitpos.y)){
  1716. X              int hitanything = 0;
  1717. X!             otmp = fobj;
  1718. X!             /* Fix for polymorph bug, Tim Wright */
  1719. X!             while(otmp) { /* was a "for" loop.  */
  1720. X!             register struct obj *next_obj;
  1721. X  
  1722. X!             next_obj = otmp->nobj;
  1723. X!             if(otmp->ox == bhitpos.x && otmp->oy == bhitpos.y)
  1724. X!                 hitanything += (*fhito)(otmp, obj);
  1725. X!             otmp = next_obj;
  1726. X              }
  1727. X              if(hitanything)    range--;
  1728. X          }
  1729. X--- 1027,1043 ----
  1730. X              range -= 3;
  1731. X          }
  1732. X          /* modified by GAN to hit all objects */
  1733. X!         if(fhito){
  1734. X              int hitanything = 0;
  1735. X!             register struct obj *next_obj;
  1736. X  
  1737. X!             if((fhito == bhito) && levl[bhitpos.x][bhitpos.y].gmask)
  1738. X!             hitanything += bhitgold(g_at(bhitpos.x,bhitpos.y),obj);
  1739. X!             for(otmp = level.objects[bhitpos.x][bhitpos.y];
  1740. X!                             otmp; otmp = next_obj) {
  1741. X!             /* Fix for polymorph bug, Tim Wright */
  1742. X!             next_obj = otmp->nexthere;
  1743. X!             hitanything += (*fhito)(otmp, obj);
  1744. X              }
  1745. X              if(hitanything)    range--;
  1746. X          }
  1747. X***************
  1748. X*** 1049,1055 ****
  1749. X      if(sym)
  1750. X         tmp_at(-1, is_pool(bhitpos.x,bhitpos.y) ? -1 : 0);
  1751. X  
  1752. X!     if(shopdoor && !in_shop(u.ux, u.uy))
  1753. X          pay_for_door(dlx, dly, "destroy");
  1754. X  
  1755. X      return (struct monst *)0;
  1756. X--- 1081,1087 ----
  1757. X      if(sym)
  1758. X         tmp_at(-1, is_pool(bhitpos.x,bhitpos.y) ? -1 : 0);
  1759. X  
  1760. X!     if(shopdoor)
  1761. X          pay_for_door(dlx, dly, "destroy");
  1762. X  
  1763. X      return (struct monst *)0;
  1764. X***************
  1765. X*** 1216,1237 ****
  1766. X      register struct obj *obj, *obj2;
  1767. X      register int scrquan, i, cnt = 0;
  1768. X  
  1769. X!     if(OBJ_AT(x, y))
  1770. X!     for(obj = fobj; obj; obj = obj2) {
  1771. X!         obj2 = obj->nobj;
  1772. X          /* Bug fix - KAA */
  1773. X-         if(obj->ox == x && obj->oy == y &&
  1774. X  #ifdef SPELLS
  1775. X!            (obj->olet == SCROLL_SYM || obj->olet == SPBOOK_SYM)) {
  1776. X  #else
  1777. X!            obj->olet == SCROLL_SYM) {
  1778. X  #endif
  1779. X          scrquan = obj->quan;
  1780. X          for(i = 1; i <= scrquan ; i++)
  1781. X              if(!rn2(3))  {
  1782. X              cnt++;
  1783. X-             if(in_shop(u.ux, u.uy))
  1784. X-                 addtobill(obj, FALSE);
  1785. X              useupf(obj);
  1786. X              }
  1787. X          }
  1788. X--- 1248,1265 ----
  1789. X      register struct obj *obj, *obj2;
  1790. X      register int scrquan, i, cnt = 0;
  1791. X  
  1792. X!     for(obj = level.objects[x][y]; obj; obj = obj2) {
  1793. X!         obj2 = obj->nexthere;
  1794. X          /* Bug fix - KAA */
  1795. X  #ifdef SPELLS
  1796. X!         if((obj->olet == SCROLL_SYM || obj->olet == SPBOOK_SYM)) {
  1797. X  #else
  1798. X!         if(obj->olet == SCROLL_SYM) {
  1799. X  #endif
  1800. X          scrquan = obj->quan;
  1801. X          for(i = 1; i <= scrquan ; i++)
  1802. X              if(!rn2(3))  {
  1803. X              cnt++;
  1804. X              useupf(obj);
  1805. X              }
  1806. X          }
  1807. X***************
  1808. X*** 1252,1258 ****
  1809. X  register int dx,dy;
  1810. X  {
  1811. X      int abstype = abs(type) % 10;
  1812. X!     register char *fltxt = fl[abs(type)];
  1813. X      struct rm *lev;
  1814. X      xchar range, olx, oly;
  1815. X      struct monst *mon;
  1816. X--- 1280,1286 ----
  1817. X  register int dx,dy;
  1818. X  {
  1819. X      int abstype = abs(type) % 10;
  1820. X!     register const char *fltxt = fl[abs(type)];
  1821. X      struct rm *lev;
  1822. X      xchar range, olx, oly;
  1823. X      struct monst *mon;
  1824. X***************
  1825. X*** 1307,1313 ****
  1826. X              Tmp_at2(-2,(int) dirlet(dx,dy));
  1827. X              continue;
  1828. X          }
  1829. X!         if(is_pool(sx,sy) && abstype == 1 /* fire */) {
  1830. X  #ifdef STRONGHOLD
  1831. X              if(lev->typ != POOL) {    /* MOAT or DRAWBRIDGE_UP */
  1832. X                  if(cansee(sx,sy))
  1833. X--- 1335,1348 ----
  1834. X              Tmp_at2(-2,(int) dirlet(dx,dy));
  1835. X              continue;
  1836. X          }
  1837. X!         if(abstype == 1 /* fire */ &&
  1838. X!            (is_pool(sx,sy) || (lev->typ == ROOM && lev->icedpool))) {
  1839. X!             if(lev->typ == ROOM) {
  1840. X!             lev->typ = (lev->icedpool == ICED_POOL ? POOL : MOAT);
  1841. X!             lev->icedpool = 0;
  1842. X!             pline("The ice crackles and melts.");
  1843. X!             mnewsym(sx,sy);
  1844. X!             } else {
  1845. X  #ifdef STRONGHOLD
  1846. X              if(lev->typ != POOL) {    /* MOAT or DRAWBRIDGE_UP */
  1847. X                  if(cansee(sx,sy))
  1848. X***************
  1849. X*** 1329,1345 ****
  1850. X  #ifdef STRONGHOLD
  1851. X              }
  1852. X  #endif
  1853. X          }
  1854. X!         if(is_pool(sx,sy) && abstype == 3 /* cold */) {
  1855. X              boolean moat = (lev->typ != POOL);
  1856. X  
  1857. X              range -= 3;
  1858. X  #ifdef STRONGHOLD
  1859. X!             if(lev->typ == DRAWBRIDGE_UP)
  1860. X!                 lev->drawbridgemask |= DB_FLOOR;
  1861. X!             else
  1862. X  #endif
  1863. X                  lev->typ = ROOM;
  1864. X              mnewsym(sx,sy);
  1865. X              if(cansee(sx,sy)) {
  1866. X                  if(moat)
  1867. X--- 1364,1385 ----
  1868. X  #ifdef STRONGHOLD
  1869. X              }
  1870. X  #endif
  1871. X+             }
  1872. X          }
  1873. X!         if(abstype == 3 /* cold */ && is_pool(sx,sy)) {
  1874. X              boolean moat = (lev->typ != POOL);
  1875. X  
  1876. X              range -= 3;
  1877. X  #ifdef STRONGHOLD
  1878. X!             if(lev->typ == DRAWBRIDGE_UP) {
  1879. X!                 lev->drawbridgemask |= DB_ICE;
  1880. X!             } else {
  1881. X  #endif
  1882. X                  lev->typ = ROOM;
  1883. X+                 lev->icedpool = (moat ? ICED_MOAT : ICED_POOL);
  1884. X+ #ifdef STRONGHOLD
  1885. X+             }
  1886. X+ #endif
  1887. X              mnewsym(sx,sy);
  1888. X              if(cansee(sx,sy)) {
  1889. X                  if(moat)
  1890. X***************
  1891. X*** 1353,1360 ****
  1892. X              switch(abstype) {
  1893. X              case 1:
  1894. X                 lev->doormask = D_NODOOR;
  1895. X!                if(cansee(sx,sy))
  1896. X                  pline("The door is consumed in flames!");
  1897. X                 else You("smell smoke.");
  1898. X                 if(type >= 0 && in_shop(sx, sy)) {
  1899. X                  shopdoor = TRUE;
  1900. X--- 1393,1403 ----
  1901. X              switch(abstype) {
  1902. X              case 1:
  1903. X                 lev->doormask = D_NODOOR;
  1904. X!                mnewsym(sx,sy);
  1905. X!                if(cansee(sx,sy)) {
  1906. X                  pline("The door is consumed in flames!");
  1907. X+                 prl(sx,sy);
  1908. X+                }
  1909. X                 else You("smell smoke.");
  1910. X                 if(type >= 0 && in_shop(sx, sy)) {
  1911. X                  shopdoor = TRUE;
  1912. X***************
  1913. X*** 1364,1371 ****
  1914. X                 break;
  1915. X              case 3:
  1916. X                 lev->doormask = D_NODOOR;
  1917. X!                if(cansee(sx,sy))
  1918. X                  pline("The door freezes and shatters!");
  1919. X                 else You("feel cold.");
  1920. X                 if(type >= 0 && in_shop(sx, sy)) {
  1921. X                  shopdoor = TRUE;
  1922. X--- 1407,1417 ----
  1923. X                 break;
  1924. X              case 3:
  1925. X                 lev->doormask = D_NODOOR;
  1926. X!                mnewsym(sx,sy);
  1927. X!                if(cansee(sx,sy)) {
  1928. X                  pline("The door freezes and shatters!");
  1929. X+                 prl(sx,sy);
  1930. X+                }
  1931. X                 else You("feel cold.");
  1932. X                 if(type >= 0 && in_shop(sx, sy)) {
  1933. X                  shopdoor = TRUE;
  1934. X***************
  1935. X*** 1375,1382 ****
  1936. X                 break;
  1937. X              case 4:
  1938. X                 lev->doormask = D_NODOOR;
  1939. X!                if(cansee(sx,sy))
  1940. X                  pline("The door disintegrates!");
  1941. X                 else if(flags.soundok)
  1942. X                  You("hear a crashing sound.");
  1943. X                 if(type >= 0 && in_shop(sx, sy)) {
  1944. X--- 1421,1431 ----
  1945. X                 break;
  1946. X              case 4:
  1947. X                 lev->doormask = D_NODOOR;
  1948. X!                mnewsym(sx,sy);
  1949. X!                if(cansee(sx,sy)) {
  1950. X                  pline("The door disintegrates!");
  1951. X+                 prl(sx,sy);
  1952. X+                }
  1953. X                 else if(flags.soundok)
  1954. X                  You("hear a crashing sound.");
  1955. X                 if(type >= 0 && in_shop(sx, sy)) {
  1956. X***************
  1957. X*** 1387,1394 ****
  1958. X                 break;
  1959. X              case 5:
  1960. X                 lev->doormask = D_BROKEN;
  1961. X!                if(cansee(sx,sy))
  1962. X                  pline("The door splinters!");
  1963. X                 else if(flags.soundok)
  1964. X                  You("hear a crackling sound.");
  1965. X                 if(type >= 0 && in_shop(sx, sy)) {
  1966. X--- 1436,1446 ----
  1967. X                 break;
  1968. X              case 5:
  1969. X                 lev->doormask = D_BROKEN;
  1970. X!                mnewsym(sx,sy);
  1971. X!                if(cansee(sx,sy)) {
  1972. X                  pline("The door splinters!");
  1973. X+                 prl(sx,sy);
  1974. X+                }
  1975. X                 else if(flags.soundok)
  1976. X                  You("hear a crackling sound.");
  1977. X                 if(type >= 0 && in_shop(sx, sy)) {
  1978. X***************
  1979. X*** 1590,1596 ****
  1980. X              stop_occupation();
  1981. X          }
  1982. X          if(!ZAP_POS(lev->typ)) {
  1983. X!             int bounce = 0, rmn;
  1984. X              if(cansee(sx,sy)) pline("The %s bounces!", fltxt);
  1985. X              range--;
  1986. X              if(!dx || !dy || !rn2(20)){
  1987. X--- 1642,1649 ----
  1988. X              stop_occupation();
  1989. X          }
  1990. X          if(!ZAP_POS(lev->typ)) {
  1991. X!             int bounce = 0;
  1992. X!             uchar rmn;
  1993. X              if(cansee(sx,sy)) pline("The %s bounces!", fltxt);
  1994. X              range--;
  1995. X              if(!dx || !dy || !rn2(20)){
  1996. X***************
  1997. X*** 1627,1632 ****
  1998. X--- 1680,1706 ----
  1999. X                         abstype == 3 ? "shatter" :
  2000. X                         abstype == 4 ? "disintegrate" :
  2001. X                         "destroy");
  2002. X+ }
  2003. X+ 
  2004. X+ void
  2005. X+ rlocgold(gold)
  2006. X+ register struct gold *gold;
  2007. X+ {
  2008. X+     register int tx, ty, otx, oty;
  2009. X+     long val = gold->amount;
  2010. X+ 
  2011. X+     otx = gold->gx;
  2012. X+     oty = gold->gy;
  2013. X+     do {
  2014. X+         tx = rn1(COLNO-3,2);
  2015. X+         ty = rn2(ROWNO);
  2016. X+     } while(!goodpos(tx,ty,(struct permonst *)0));
  2017. X+     freegold(g_at(otx,oty));
  2018. X+     mkgold(val, tx, ty);
  2019. X+     if(cansee(otx,oty))
  2020. X+         newsym(otx,oty);
  2021. X+     if(cansee(tx,ty))
  2022. X+         newsym(tx,ty);
  2023. X  }
  2024. X  
  2025. X  void
  2026. END_OF_FILE
  2027. if test 52555 -ne `wc -c <'patches06l'`; then
  2028.     echo shar: \"'patches06l'\" unpacked with wrong size!
  2029. fi
  2030. # end of 'patches06l'
  2031. fi
  2032. echo shar: End of archive 12 \(of 15\).
  2033. cp /dev/null ark12isdone
  2034. MISSING=""
  2035. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ; do
  2036.     if test ! -f ark${I}isdone ; then
  2037.     MISSING="${MISSING} ${I}"
  2038.     fi
  2039. done
  2040. if test "${MISSING}" = "" ; then
  2041.     echo You have unpacked all 15 archives.
  2042.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2043. else
  2044.     echo You still need to unpack the following archives:
  2045.     echo "        " ${MISSING}
  2046. fi
  2047. ##  End of shell archive.
  2048. exit 0
  2049.