home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / games / volume16 / nethck31 / patch1f < prev    next >
Encoding:
Text File  |  1993-03-04  |  58.1 KB  |  2,119 lines

  1. Subject:  v17i047:  nethack31 - display oriented dungeons & dragons (Ver. 3.1), Patch1f/31
  2. Newsgroups: comp.sources.games
  3. Approved: billr@saab.CNA.TEK.COM
  4.  
  5. Submitted-by: izchak@linc.cis.upenn.edu (Izchak Miller)
  6. Posting-number: Volume 17, Issue 47
  7. Archive-name: nethack31/Patch1f
  8. Patch-To: nethack31: Volume 16, Issue 1-116
  9. Environment: Amiga, Atari, Mac, MS-DOS, Windows-NT, OS2, Unix, VMS, X11
  10.  
  11.  
  12.  
  13. #! /bin/sh
  14. # This is a shell archive.  Remove anything before this line, then unpack
  15. # it by saving it into a file and typing "sh file".  To overwrite existing
  16. # files, type "sh file -c".  You can also feed this as standard input via
  17. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  18. # will see the following message at the end:
  19. #        "End of archive 6 (of 31)."
  20. # Contents:  patches01e
  21. # Wrapped by billr@saab on Fri Mar  5 10:50:42 1993
  22. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  23. if test -f 'patches01e' -a "${1}" != "-c" ; then 
  24.   echo shar: Renaming existing file \"'patches01e'\" to \"'patches01e.orig'\"
  25.   mv -f 'patches01e' 'patches01e.orig'
  26. fi
  27. echo shar: Extracting \"'patches01e'\" \(55585 characters\)
  28. sed "s/^X//" >'patches01e' <<'END_OF_FILE'
  29. X*** /tmp/da08301    Thu Feb 25 10:23:40 1993
  30. X--- src/mhitu.c    Wed Feb 24 14:47:25 1993
  31. X***************
  32. X*** 1,4 ****
  33. X! /*    SCCS Id: @(#)mhitu.c    3.1    92/12/10    */
  34. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  35. X  /* NetHack may be freely redistributed.  See license for details. */
  36. X  
  37. X--- 1,4 ----
  38. X! /*    SCCS Id: @(#)mhitu.c    3.1    93/02/09    */
  39. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  40. X  /* NetHack may be freely redistributed.  See license for details. */
  41. X  
  42. X***************
  43. X*** 5,11 ****
  44. X  #include "hack.h"
  45. X  #include "artifact.h"
  46. X  
  47. X! STATIC_VAR struct obj NEARDATA *otmp;
  48. X  
  49. X  #ifdef POLYSELF
  50. X  STATIC_DCL void FDECL(urustm, (struct monst *, struct obj *));
  51. X--- 5,11 ----
  52. X  #include "hack.h"
  53. X  #include "artifact.h"
  54. X  
  55. X! STATIC_VAR NEARDATA struct obj *otmp;
  56. X  
  57. X  #ifdef POLYSELF
  58. X  STATIC_DCL void FDECL(urustm, (struct monst *, struct obj *));
  59. X***************
  60. X*** 24,30 ****
  61. X  STATIC_DCL int FDECL(hitmu, (struct monst *,struct attack *));
  62. X  STATIC_DCL int FDECL(gulpmu, (struct monst *,struct attack *));
  63. X  STATIC_DCL int FDECL(explmu, (struct monst *,struct attack *,BOOLEAN_P));
  64. X- STATIC_DCL int FDECL(gazemu, (struct monst *,struct attack *));
  65. X  STATIC_DCL void FDECL(missmu,(struct monst *,BOOLEAN_P,struct attack *));
  66. X  STATIC_DCL void FDECL(mswings,(struct monst *,struct obj *));
  67. X  STATIC_DCL void FDECL(wildmiss,(struct monst *));
  68. X--- 24,29 ----
  69. X***************
  70. X*** 107,122 ****
  71. X  register struct monst *mtmp;
  72. X  register struct obj *otemp;
  73. X  {
  74. X!     if (!flags.verbose || Blind || !mon_visible(mtmp) ||
  75. X!         otemp->oclass != WEAPON_CLASS) return;
  76. X      pline("%s %s %s %s.", Monnam(mtmp),
  77. X!           ((otemp->otyp >= SPEAR &&
  78. X!             otemp->otyp <= LANCE) ||
  79. X!            (otemp->otyp >= PARTISAN &&
  80. X!             otemp->otyp <= SPETUM) ||
  81. X             otemp->otyp == TRIDENT) ? "thrusts" : "swings",
  82. X!           !humanoid(mtmp->data) ? "its" : mtmp->female ? "her" : "his",
  83. X!           xname(otemp));
  84. X  }
  85. X  
  86. X  #endif /* OVL1 */
  87. X--- 106,118 ----
  88. X  register struct monst *mtmp;
  89. X  register struct obj *otemp;
  90. X  {
  91. X!     if (!flags.verbose || Blind || !mon_visible(mtmp))
  92. X!         return;
  93. X      pline("%s %s %s %s.", Monnam(mtmp),
  94. X!           ((otemp->otyp >= SPEAR && otemp->otyp <= LANCE) ||
  95. X!            (otemp->otyp >= PARTISAN && otemp->otyp <= SPETUM) ||
  96. X             otemp->otyp == TRIDENT) ? "thrusts" : "swings",
  97. X!           his[pronoun_gender(mtmp)], xname(otemp));
  98. X  }
  99. X  
  100. X  #endif /* OVL1 */
  101. X***************
  102. X*** 311,317 ****
  103. X                          Monnam(mtmp), uasmon->mname);
  104. X              killed(mtmp);
  105. X              newsym(u.ux,u.uy);
  106. X!             return(0);
  107. X              }
  108. X              if (u.usym != S_PIERCER)
  109. X              return(0);    /* trappers don't attack */
  110. X--- 307,317 ----
  111. X                          Monnam(mtmp), uasmon->mname);
  112. X              killed(mtmp);
  113. X              newsym(u.ux,u.uy);
  114. X! #ifdef MUSE
  115. X!             if (mtmp->mhp > 0) return(0);
  116. X!             else
  117. X! #endif
  118. X!                 return(1);
  119. X              }
  120. X              if (u.usym != S_PIERCER)
  121. X              return(0);    /* trappers don't attack */
  122. X***************
  123. X*** 405,412 ****
  124. X  
  125. X          if(!rn2(10) && !mtmp->mcan) {
  126. X          if(youseeit) {
  127. X!             pline("%s summons help!",youseeit ?
  128. X!                 Monnam(mtmp) : "It");
  129. X          } else
  130. X              You("feel hemmed in.");
  131. X          /* Technically wrong; we really should check if you can see the
  132. X--- 405,411 ----
  133. X  
  134. X          if(!rn2(10) && !mtmp->mcan) {
  135. X          if(youseeit) {
  136. X!             pline("%s summons help!", Monnam(mtmp));
  137. X          } else
  138. X              You("feel hemmed in.");
  139. X          /* Technically wrong; we really should check if you can see the
  140. X***************
  141. X*** 501,507 ****
  142. X                  }
  143. X                  stoned = TRUE;
  144. X                  killed(mtmp);
  145. X!                 sum[i] = 2;
  146. X              }
  147. X              break;
  148. X  
  149. X--- 500,511 ----
  150. X                  }
  151. X                  stoned = TRUE;
  152. X                  killed(mtmp);
  153. X! #ifdef MUSE
  154. X!                 if (mtmp->mhp > 0)
  155. X!                 sum[i] = 0;
  156. X!                 else
  157. X! #endif
  158. X!                 sum[i] = 2;
  159. X              }
  160. X              break;
  161. X  
  162. X***************
  163. X*** 564,569 ****
  164. X--- 568,575 ----
  165. X                  if (foundyou) {
  166. X                  set_uasmon();
  167. X  #ifdef MUSE
  168. X+                 remove_cadavers(&mtmp->minvent);
  169. X+                 possibly_unwield(mtmp);
  170. X                  otmp = MON_WEP(mtmp);
  171. X  #else
  172. X                  otmp = select_hwep(mtmp);
  173. X***************
  174. X*** 648,654 ****
  175. X              continue;
  176. X          break;
  177. X          case 1:
  178. X!         if (uarmc) break;
  179. X          /* Note the difference between break and continue;
  180. X           * break means it was hit and didn't rust; continue
  181. X           * means it wasn't a target and though it didn't rust
  182. X--- 654,664 ----
  183. X              continue;
  184. X          break;
  185. X          case 1:
  186. X!         if (uarmc) {
  187. X!             if (!rusting)
  188. X!             (void)rust_dmg(uarmc, "cloak", hurt, TRUE);
  189. X!             break;
  190. X!         }
  191. X          /* Note the difference between break and continue;
  192. X           * break means it was hit and didn't rust; continue
  193. X           * means it wasn't a target and though it didn't rust
  194. X***************
  195. X*** 764,771 ****
  196. X  #endif
  197. X                                  ) {
  198. X              if(!u.ustuck && rn2(2)) {
  199. X!             u.ustuck = mtmp;
  200. X!             pline("%s grabs you!", Monnam(mtmp));
  201. X              } else if(u.ustuck == mtmp) {
  202. X                  exercise(A_STR, FALSE);
  203. X              You("are being %s.",
  204. X--- 774,794 ----
  205. X  #endif
  206. X                                  ) {
  207. X              if(!u.ustuck && rn2(2)) {
  208. X!             register struct obj *obj = (uarmc ? uarmc : uarm);
  209. X! 
  210. X!             /* if your cloak/armor is greased, monster slips off */
  211. X!             if (obj && obj->greased) {
  212. X!                 dmg = 0;
  213. X!                 pline("%s grabs you, but cannot hold onto your greased %s!",
  214. X!                   Monnam(mtmp), xname(obj));
  215. X!                 if (!rn2(2)) {
  216. X!                 pline("The grease wears off.");
  217. X!                 obj->greased = 0;
  218. X!                 }
  219. X!             } else {
  220. X!                 u.ustuck = mtmp;
  221. X!                 pline("%s grabs you!", Monnam(mtmp));
  222. X!             }
  223. X              } else if(u.ustuck == mtmp) {
  224. X                  exercise(A_STR, FALSE);
  225. X              You("are being %s.",
  226. X***************
  227. X*** 774,779 ****
  228. X--- 797,812 ----
  229. X              }
  230. X          } else {              /* hand to hand weapon */
  231. X              if(mattk->aatyp == AT_WEAP && otmp) {
  232. X+ #ifdef MUSE
  233. X+             if (otmp->otyp == CORPSE
  234. X+                 && otmp->corpsenm == PM_COCKATRICE) {
  235. X+                 dmg = 1;
  236. X+                 pline("%s hits you with the cockatrice corpse.",
  237. X+                 Monnam(mtmp));
  238. X+                 if (!Stoned)
  239. X+                     goto do_stone;
  240. X+             }
  241. X+ #endif
  242. X              dmg += dmgval(otmp, uasmon);
  243. X              if (dmg <= 0) dmg = 1;
  244. X              if (!(otmp->oartifact &&
  245. X***************
  246. X*** 780,785 ****
  247. X--- 813,819 ----
  248. X                  artifact_hit(mtmp, &youmonst, otmp, &dmg,dieroll)))
  249. X                   hitmsg(mtmp, mattk);
  250. X  #ifdef POLYSELF
  251. X+             if (!dmg) break;
  252. X              if (u.mh > 1 && u.mh > ((u.uac>0) ? dmg : dmg+u.uac) &&
  253. X                      (u.umonnum==PM_BLACK_PUDDING
  254. X                      || u.umonnum==PM_BROWN_PUDDING)) {
  255. X***************
  256. X*** 962,967 ****
  257. X--- 996,1004 ----
  258. X              } else {
  259. X              if (flags.soundok)
  260. X                  You("hear %s hissing!", s_suffix(mon_nam(mtmp)));
  261. X+ #ifdef MUSE
  262. X+ do_stone:
  263. X+ #endif
  264. X              if((!rn2(10) ||
  265. X                  (flags.moonphase == NEW_MOON && !have_lizard()))
  266. X  #ifdef POLYSELF
  267. X***************
  268. X*** 987,1000 ****
  269. X                              ) u.ustuck = mtmp;
  270. X          break;
  271. X          case AD_WRAP:
  272. X!         if(ctmp
  273. X  #ifdef POLYSELF
  274. X              && !sticks(uasmon)
  275. X  #endif
  276. X                        ) {
  277. X              if(!u.ustuck && !rn2(10)) {
  278. X!             pline("%s swings itself around you!", Monnam(mtmp));
  279. X!             u.ustuck = mtmp;
  280. X              } else if(u.ustuck == mtmp) {
  281. X              if (is_pool(mtmp->mx,mtmp->my)
  282. X  #ifdef POLYSELF
  283. X--- 1024,1051 ----
  284. X                              ) u.ustuck = mtmp;
  285. X          break;
  286. X          case AD_WRAP:
  287. X!         if((!mtmp->mcan || (u.ustuck == mtmp))
  288. X  #ifdef POLYSELF
  289. X              && !sticks(uasmon)
  290. X  #endif
  291. X                        ) {
  292. X              if(!u.ustuck && !rn2(10)) {
  293. X!             register struct obj *obj = (uarmc ? uarmc : uarm);
  294. X! 
  295. X!             /* if your cloak/armor is greased, monster slips off */
  296. X!             if (obj && obj->greased) {
  297. X!                 dmg = 0;
  298. X!                 pline("%s slips off of your greased %s!",
  299. X!                   Monnam(mtmp), xname(obj));
  300. X!                 if (!rn2(2)) {
  301. X!                 pline("The grease wears off.");
  302. X!                 obj->greased = 0;
  303. X!                 }
  304. X!             } else {
  305. X!                 pline("%s swings itself around you!",
  306. X!                   Monnam(mtmp));
  307. X!                 u.ustuck = mtmp;
  308. X!             }
  309. X              } else if(u.ustuck == mtmp) {
  310. X              if (is_pool(mtmp->mx,mtmp->my)
  311. X  #ifdef POLYSELF
  312. X***************
  313. X*** 1002,1008 ****
  314. X--- 1053,1069 ----
  315. X  #endif
  316. X                  && !Magical_breathing
  317. X                 ) {
  318. X+                 boolean moat = (levl[u.ux][u.uy].typ != POOL) &&
  319. X+                 (levl[u.ux][u.uy].typ != WATER) &&
  320. X+                 !Is_medusa_level(&u.uz) &&
  321. X+                 !Is_waterlevel(&u.uz);
  322. X+ 
  323. X                  pline("%s drowns you....", Monnam(mtmp));
  324. X+                 killer_format = KILLED_BY_AN;
  325. X+                 Sprintf(buf, "%s by %s",
  326. X+                     moat ? "moat" : "pool of water",
  327. X+                     a_monnam(mtmp));
  328. X+                 killer = buf;
  329. X                  done(DROWNING);
  330. X              } else if(mattk->aatyp == AT_HUGS)
  331. X                  You("are being crushed.");
  332. X***************
  333. X*** 1087,1094 ****
  334. X          case AD_SAMU:
  335. X          hitmsg(mtmp, mattk);
  336. X          /* when the Wiz hits, 1/20 steals the amulet */
  337. X!         if (!u.uhave.amulet) break;
  338. X!         if (!rn2(20)) stealamulet(mtmp);
  339. X          break;
  340. X  
  341. X          case AD_TLPT:
  342. X--- 1148,1160 ----
  343. X          case AD_SAMU:
  344. X          hitmsg(mtmp, mattk);
  345. X          /* when the Wiz hits, 1/20 steals the amulet */
  346. X!         if ( u.uhave.amulet ||
  347. X!              u.uhave.bell || u.uhave.book || u.uhave.menorah
  348. X! #ifdef MULDGN
  349. X!              || u.uhave.questart /* carrying the Quest Artifact */
  350. X! #endif
  351. X!            )
  352. X!             if (!rn2(20)) stealamulet(mtmp);
  353. X          break;
  354. X  
  355. X          case AD_TLPT:
  356. X***************
  357. X*** 1149,1155 ****
  358. X                  exercise(A_STR, TRUE);
  359. X                  exercise(A_CON, TRUE);
  360. X              flags.botl = 1;
  361. X!             if(!rn2(50)) rloc(mtmp);
  362. X              dmg = 0;
  363. X          } else
  364. X              if(pl_character[0] == 'H') {
  365. X--- 1215,1226 ----
  366. X                  exercise(A_STR, TRUE);
  367. X                  exercise(A_CON, TRUE);
  368. X              flags.botl = 1;
  369. X!             if (mtmp->mhp == 0)
  370. X!                 return 2; /* mongone() was called above */
  371. X!             if(!rn2(50)) {
  372. X!                 rloc(mtmp);
  373. X!                 return 3;
  374. X!             }
  375. X              dmg = 0;
  376. X          } else
  377. X              if(pl_character[0] == 'H') {
  378. X***************
  379. X*** 1279,1287 ****
  380. X      }
  381. X  
  382. X  #ifdef POLYSELF
  383. X!     res = passiveum(olduasmon, mtmp, mattk);
  384. X!     stop_occupation();
  385. X!     return res;
  386. X  #else
  387. X      stop_occupation();
  388. X      return 1;
  389. X--- 1350,1361 ----
  390. X      }
  391. X  
  392. X  #ifdef POLYSELF
  393. X!     if (dmg) {
  394. X!         res = passiveum(olduasmon, mtmp, mattk);
  395. X!         stop_occupation();
  396. X!         return res;
  397. X!     } else
  398. X!         return 1;
  399. X  #else
  400. X      stop_occupation();
  401. X      return 1;
  402. X***************
  403. X*** 1325,1331 ****
  404. X          }
  405. X  #ifdef WALKIES
  406. X          if((i = number_leashed()) > 0) {
  407. X!             pline("The leash%s snap%s loose...",
  408. X                      (i > 1) ? "es" : "",
  409. X                      (i > 1) ? "" : "s");
  410. X              unleash_all();
  411. X--- 1399,1405 ----
  412. X          }
  413. X  #ifdef WALKIES
  414. X          if((i = number_leashed()) > 0) {
  415. X!             pline("The leash%s snap%s loose.",
  416. X                      (i > 1) ? "es" : "",
  417. X                      (i > 1) ? "" : "s");
  418. X              unleash_all();
  419. X***************
  420. X*** 1336,1342 ****
  421. X              pline("%s turns to stone!", Monnam(mtmp));
  422. X              stoned = 1;
  423. X              xkilled(mtmp, 0);
  424. X!             return 2;
  425. X          }
  426. X  #endif
  427. X          display_nhwindow(WIN_MESSAGE, FALSE);
  428. X--- 1410,1420 ----
  429. X              pline("%s turns to stone!", Monnam(mtmp));
  430. X              stoned = 1;
  431. X              xkilled(mtmp, 0);
  432. X! # ifdef MUSE
  433. X!             if (mtmp->mhp > 0) return 0;
  434. X!             else
  435. X! # endif
  436. X!                 return 2;
  437. X          }
  438. X  #endif
  439. X          display_nhwindow(WIN_MESSAGE, FALSE);
  440. X***************
  441. X*** 1356,1364 ****
  442. X          switch(mattk->adtyp) {
  443. X  
  444. X          case AD_DGST:
  445. X!             if(!u.uswldtim) {    /* a3 *//*no cf unsigned <=0*/
  446. X              pline("%s totally digests you!", Monnam(mtmp));
  447. X              tmp = u.uhp;
  448. X              } else {
  449. X              pline("%s digests you!", Monnam(mtmp));
  450. X                  exercise(A_STR, FALSE);
  451. X--- 1434,1443 ----
  452. X          switch(mattk->adtyp) {
  453. X  
  454. X          case AD_DGST:
  455. X!             if(u.uswldtim <= 1) {    /* a3 *//*no cf unsigned <=0*/
  456. X              pline("%s totally digests you!", Monnam(mtmp));
  457. X              tmp = u.uhp;
  458. X+             if (Half_physical_damage) tmp *= 2; /* sorry */
  459. X              } else {
  460. X              pline("%s digests you!", Monnam(mtmp));
  461. X                  exercise(A_STR, FALSE);
  462. X***************
  463. X*** 1437,1443 ****
  464. X          }
  465. X      }
  466. X  
  467. X!     if(Half_physical_damage) tmp = (tmp+1) / 2;
  468. X  
  469. X      mdamageu(mtmp, tmp);
  470. X      if(tmp) stop_occupation();
  471. X--- 1516,1522 ----
  472. X          }
  473. X      }
  474. X  
  475. X!     if (Half_physical_damage) tmp = (tmp+1) / 2;
  476. X  
  477. X      mdamageu(mtmp, tmp);
  478. X      if(tmp) stop_occupation();
  479. X***************
  480. X*** 1452,1458 ****
  481. X          if (u.umonnum == PM_COCKATRICE) {
  482. X          pline("%s very hurriedly %s you!", Monnam(mtmp), 
  483. X                 is_animal(mtmp->data)? "regurgitates" : "expels");
  484. X-         u.uswldtim = 0;
  485. X          } else {
  486. X  #endif
  487. X          You("get %s!", 
  488. X--- 1531,1536 ----
  489. X***************
  490. X*** 1490,1499 ****
  491. X          not_affected |= Cold_resistance;
  492. X  
  493. X          if (!not_affected) {
  494. X-             if (flags.verbose) You("get blasted!");
  495. X              if (ACURR(A_DEX) > rnd(20)) {
  496. X!             You("duck the blast...");
  497. X              tmp = (tmp+1) / 2;
  498. X              }
  499. X              if (Half_physical_damage) tmp = (tmp+1) / 2;
  500. X              mdamageu(mtmp, tmp);
  501. X--- 1568,1578 ----
  502. X          not_affected |= Cold_resistance;
  503. X  
  504. X          if (!not_affected) {
  505. X              if (ACURR(A_DEX) > rnd(20)) {
  506. X!             You("duck some of the blast.");
  507. X              tmp = (tmp+1) / 2;
  508. X+             } else {
  509. X+                 if (flags.verbose) You("get blasted!");
  510. X              }
  511. X              if (Half_physical_damage) tmp = (tmp+1) / 2;
  512. X              mdamageu(mtmp, tmp);
  513. X***************
  514. X*** 1511,1516 ****
  515. X--- 1590,1596 ----
  516. X              You("are blinded by a blast of light!");
  517. X              make_blinded((long)tmp, FALSE);
  518. X              } else
  519. X+             if (flags.verbose)
  520. X              You("get the impression it was not terribly bright.");
  521. X          }
  522. X          break;
  523. X***************
  524. X*** 1526,1535 ****
  525. X      }
  526. X      }
  527. X      mondead(mtmp);
  528. X      return(2);    /* it dies */
  529. X  }
  530. X  
  531. X! STATIC_OVL int
  532. X  gazemu(mtmp, mattk)    /* monster gazes at you */
  533. X      register struct monst *mtmp;
  534. X      register struct attack  *mattk;
  535. X--- 1606,1618 ----
  536. X      }
  537. X      }
  538. X      mondead(mtmp);
  539. X+ #ifdef MUSE
  540. X+     if (mtmp->mhp > 0) return(0);
  541. X+ #endif
  542. X      return(2);    /* it dies */
  543. X  }
  544. X  
  545. X! int
  546. X  gazemu(mtmp, mattk)    /* monster gazes at you */
  547. X      register struct monst *mtmp;
  548. X      register struct attack  *mattk;
  549. X***************
  550. X*** 1627,1635 ****
  551. X  register struct monst *mon;
  552. X  register struct obj *obj;
  553. X  {
  554. X!     boolean vis = cansee(mon->mx, mon->my);
  555. X  
  556. X      if (!mon || !obj) return; /* just in case */
  557. X      if (u.umonnum == PM_RUST_MONSTER && 
  558. X          is_rustprone(obj) && obj->oeroded < MAX_ERODE) {
  559. X          if (obj->greased || obj->oerodeproof || (obj->blessed && rn2(3))) {
  560. X--- 1710,1719 ----
  561. X  register struct monst *mon;
  562. X  register struct obj *obj;
  563. X  {
  564. X!     boolean vis;
  565. X  
  566. X      if (!mon || !obj) return; /* just in case */
  567. X+     vis = cansee(mon->mx, mon->my);
  568. X      if (u.umonnum == PM_RUST_MONSTER && 
  569. X          is_rustprone(obj) && obj->oeroded < MAX_ERODE) {
  570. X          if (obj->greased || obj->oerodeproof || (obj->blessed && rn2(3))) {
  571. X***************
  572. X*** 1716,1729 ****
  573. X  
  574. X      if (mon->mcan || mon->mspec_used) {
  575. X            pline("%s acts as though %s has got a %sheadache.",
  576. X!               Monnam(mon), Blind ? "it" : fem ? "she" : "he",
  577. X!             mon->mcan ? "severe " : "");
  578. X          return 0;
  579. X      }
  580. X  
  581. X      if (unconscious()) {
  582. X          pline("%s seems dismayed at your lack of response.",
  583. X!             Monnam(mon));
  584. X          return 0;
  585. X      }
  586. X  
  587. X--- 1800,1813 ----
  588. X  
  589. X      if (mon->mcan || mon->mspec_used) {
  590. X            pline("%s acts as though %s has got a %sheadache.",
  591. X!               Monnam(mon), he[pronoun_gender(mon)],
  592. X!               mon->mcan ? "severe " : "");
  593. X          return 0;
  594. X      }
  595. X  
  596. X      if (unconscious()) {
  597. X          pline("%s seems dismayed at your lack of response.",
  598. X!               Monnam(mon));
  599. X          return 0;
  600. X      }
  601. X  
  602. X***************
  603. X*** 2024,2030 ****
  604. X              mattk->aatyp != AT_GAZE && mattk->aatyp != AT_EXPL &&
  605. X              mattk->aatyp != AT_MAGC &&
  606. X  #ifdef MUSE
  607. X!             (!which_armor(mtmp, W_ARMG))) {
  608. X  #else
  609. X              (!is_mercenary(mdat) ||
  610. X                        !m_carrying(mtmp, LEATHER_GLOVES))) {
  611. X--- 2108,2114 ----
  612. X              mattk->aatyp != AT_GAZE && mattk->aatyp != AT_EXPL &&
  613. X              mattk->aatyp != AT_MAGC &&
  614. X  #ifdef MUSE
  615. X!             (!(mtmp->misc_worn_check & W_ARMG))) {
  616. X  #else
  617. X              (!is_mercenary(mdat) ||
  618. X                        !m_carrying(mtmp, LEATHER_GLOVES))) {
  619. X***************
  620. X*** 2036,2041 ****
  621. X--- 2120,2128 ----
  622. X              pline("%s turns to stone!", Monnam(mtmp));
  623. X              stoned = 1;
  624. X              xkilled(mtmp, 0);
  625. X+ #ifdef MUSE
  626. X+             if (mtmp->mhp > 0) return 1;
  627. X+ #endif
  628. X              return 2;
  629. X          }
  630. X          return 1;
  631. X***************
  632. X*** 2125,2130 ****
  633. X--- 2212,2220 ----
  634. X      if((mtmp->mhp -= tmp) <= 0) {
  635. X          pline("%s dies!", Monnam(mtmp));
  636. X          xkilled(mtmp,0);
  637. X+ #ifdef MUSE
  638. X+         if (mtmp->mhp > 0) return 1;
  639. X+ #endif
  640. X          return 2;
  641. X      }
  642. X      return 1;
  643. X*** /tmp/da08309    Thu Feb 25 10:23:43 1993
  644. X--- src/minion.c    Thu Feb 18 10:55:31 1993
  645. X***************
  646. X*** 8,32 ****
  647. X  
  648. X  void
  649. X  msummon(ptr)        /* ptr summons a monster */
  650. X!     register struct permonst *ptr;
  651. X  {
  652. X!     register int dtype = 0, cnt = 0;
  653. X  
  654. X!     if(is_dprince(ptr) || (ptr == &mons[PM_WIZARD_OF_YENDOR])) {
  655. X  
  656. X!         dtype = (!rn2(20)) ? dprince() : (!rn2(4)) ? dlord() : ndemon();
  657. X          cnt = (!rn2(4) && !is_dprince(&mons[dtype])) ? 2 : 1;
  658. X  
  659. X!     } else if(is_dlord(ptr)) {
  660. X  
  661. X!         dtype = (!rn2(50)) ? dprince() : (!rn2(20)) ? dlord() : ndemon();
  662. X          cnt = (!rn2(4) && is_ndemon(&mons[dtype])) ? 2 : 1;
  663. X  
  664. X!     } else if(is_ndemon(ptr)) {
  665. X  
  666. X!         dtype = (!rn2(20)) ? dlord() : (!rn2(6)) ? ndemon() : monsndx(ptr);
  667. X          cnt = 1;
  668. X!     } else if(is_lminion(ptr)) {
  669. X  
  670. X          dtype = (is_lord(ptr) && !rn2(20)) ? llord() :
  671. X               (is_lord(ptr) || !rn2(6)) ? lminion() : monsndx(ptr);
  672. X--- 8,35 ----
  673. X  
  674. X  void
  675. X  msummon(ptr)        /* ptr summons a monster */
  676. X! register struct permonst *ptr;
  677. X  {
  678. X!     register int dtype = 0, cnt = 0, atyp = sgn(ptr->maligntyp);
  679. X  
  680. X!     if (is_dprince(ptr) || (ptr == &mons[PM_WIZARD_OF_YENDOR])) {
  681. X  
  682. X!         dtype = (!rn2(20)) ? dprince(atyp) :
  683. X!                  (!rn2(4)) ? dlord(atyp) : ndemon(atyp);
  684. X          cnt = (!rn2(4) && !is_dprince(&mons[dtype])) ? 2 : 1;
  685. X  
  686. X!     } else if (is_dlord(ptr)) {
  687. X  
  688. X!         dtype = (!rn2(50)) ? dprince(atyp) :
  689. X!                  (!rn2(20)) ? dlord(atyp) : ndemon(atyp);
  690. X          cnt = (!rn2(4) && is_ndemon(&mons[dtype])) ? 2 : 1;
  691. X  
  692. X!     } else if (is_ndemon(ptr)) {
  693. X  
  694. X!         dtype = (!rn2(20)) ? dlord(atyp) :
  695. X!                  (!rn2(6)) ? ndemon(atyp) : monsndx(ptr);
  696. X          cnt = 1;
  697. X!     } else if (is_lminion(ptr)) {
  698. X  
  699. X          dtype = (is_lord(ptr) && !rn2(20)) ? llord() :
  700. X               (is_lord(ptr) || !rn2(6)) ? lminion() : monsndx(ptr);
  701. X***************
  702. X*** 34,43 ****
  703. X  
  704. X      }
  705. X  
  706. X!     if(!dtype) return;
  707. X  
  708. X!     while(cnt > 0) {
  709. X  
  710. X          (void)makemon(&mons[dtype], u.ux, u.uy);
  711. X          cnt--;
  712. X      }
  713. X--- 37,55 ----
  714. X  
  715. X      }
  716. X  
  717. X!     if (!dtype) return;
  718. X  
  719. X!     /*
  720. X!      * If this daemon is unique and being re-summoned (the only way we
  721. X!      * could get this far with an extinct dtype), try another.
  722. X!      */
  723. X!     if (mons[dtype].geno & (G_EXTINCT | G_GENOD)) {
  724. X!         dtype = ndemon(atyp);
  725. X!         if (!dtype) return;
  726. X!     }
  727. X  
  728. X+     while (cnt > 0) {
  729. X+ 
  730. X          (void)makemon(&mons[dtype], u.ux, u.uy);
  731. X          cnt--;
  732. X      }
  733. X***************
  734. X*** 46,80 ****
  735. X  
  736. X  void
  737. X  summon_minion(alignment, talk)
  738. X!     aligntyp alignment;
  739. X!     boolean talk;
  740. X  {
  741. X      register struct monst *mon;
  742. X      int mnum;
  743. X  
  744. X!     switch(alignment) {
  745. X!     case A_LAWFUL: {
  746. X!     mnum = lminion();
  747. X!     break;
  748. X      }
  749. X!     case A_NEUTRAL: {
  750. X!     mnum = PM_AIR_ELEMENTAL + rn2(4);
  751. X!     break;
  752. X!     }
  753. X!     case A_CHAOTIC:
  754. X!     mnum = ndemon();
  755. X!     break;
  756. X!     default:
  757. X!     impossible("unaligned player?");
  758. X!     mnum = ndemon();
  759. X!     break;
  760. X!     }
  761. X!     if(mons[mnum].pxlth == 0) {
  762. X      struct permonst *pm = &mons[mnum];
  763. X      pm->pxlth = sizeof(struct emin);
  764. X      mon = makemon(pm, u.ux, u.uy);
  765. X      pm->pxlth = 0;
  766. X!     if(mon) {
  767. X          mon->isminion = TRUE;
  768. X          EMIN(mon)->min_align = alignment;
  769. X      }
  770. X--- 58,91 ----
  771. X  
  772. X  void
  773. X  summon_minion(alignment, talk)
  774. X! aligntyp alignment;
  775. X! boolean talk;
  776. X  {
  777. X      register struct monst *mon;
  778. X      int mnum;
  779. X  
  780. X!     switch ((int)alignment) {
  781. X!     case A_LAWFUL:
  782. X!         mnum = lminion();
  783. X!         break;
  784. X!     case A_NEUTRAL:
  785. X!         mnum = PM_AIR_ELEMENTAL + rn2(4);
  786. X!         break;
  787. X!     case A_CHAOTIC:
  788. X!     case A_NONE:
  789. X!         mnum = ndemon(alignment);
  790. X!         break;
  791. X!     default:
  792. X!         impossible("unaligned player?");
  793. X!         mnum = ndemon(A_NONE);
  794. X!         break;
  795. X      }
  796. X!     if (mons[mnum].pxlth == 0) {
  797. X      struct permonst *pm = &mons[mnum];
  798. X      pm->pxlth = sizeof(struct emin);
  799. X      mon = makemon(pm, u.ux, u.uy);
  800. X      pm->pxlth = 0;
  801. X!     if (mon) {
  802. X          mon->isminion = TRUE;
  803. X          EMIN(mon)->min_align = alignment;
  804. X      }
  805. X***************
  806. X*** 86,96 ****
  807. X      }
  808. X      } else
  809. X      mon = makemon(&mons[mnum], u.ux, u.uy);
  810. X!     if(mon) {
  811. X!     if(talk) {
  812. X          pline("The voice of %s booms:", align_gname(alignment));
  813. X          verbalize("Thou shalt pay for thy indiscretion!");
  814. X!         if(!Blind)
  815. X          pline("%s appears before you.", Amonnam(mon));
  816. X      }
  817. X      mon->mpeaceful = FALSE;
  818. X--- 97,107 ----
  819. X      }
  820. X      } else
  821. X      mon = makemon(&mons[mnum], u.ux, u.uy);
  822. X!     if (mon) {
  823. X!     if (talk) {
  824. X          pline("The voice of %s booms:", align_gname(alignment));
  825. X          verbalize("Thou shalt pay for thy indiscretion!");
  826. X!         if (!Blind)
  827. X          pline("%s appears before you.", Amonnam(mon));
  828. X      }
  829. X      mon->mpeaceful = FALSE;
  830. X***************
  831. X*** 106,112 ****
  832. X  {
  833. X      long    demand, offer;
  834. X  
  835. X!     if(uwep && uwep->oartifact == ART_EXCALIBUR) {
  836. X          pline("%s looks very angry.", Amonnam(mtmp));
  837. X          mtmp->mpeaceful = mtmp->mtame = 0;
  838. X          newsym(mtmp->mx, mtmp->my);
  839. X--- 117,123 ----
  840. X  {
  841. X      long    demand, offer;
  842. X  
  843. X!     if (uwep && uwep->oartifact == ART_EXCALIBUR) {
  844. X          pline("%s looks very angry.", Amonnam(mtmp));
  845. X          mtmp->mpeaceful = mtmp->mtame = 0;
  846. X          newsym(mtmp->mx, mtmp->my);
  847. X***************
  848. X*** 114,125 ****
  849. X      }
  850. X  
  851. X      /* Slight advantage given. */
  852. X!     if(is_dprince(mtmp->data) && mtmp->minvis) {
  853. X          mtmp->minvis = 0;
  854. X          if (!Blind) pline("%s appears before you.", Amonnam(mtmp));
  855. X          newsym(mtmp->mx,mtmp->my);
  856. X      }
  857. X!     if(u.usym == S_DEMON) {    /* Won't blackmail their own. */
  858. X  
  859. X          pline("%s says, \"Good hunting, %s.\" and vanishes.",
  860. X            Amonnam(mtmp), flags.female ? "Sister" : "Brother");
  861. X--- 125,136 ----
  862. X      }
  863. X  
  864. X      /* Slight advantage given. */
  865. X!     if (is_dprince(mtmp->data) && mtmp->minvis) {
  866. X          mtmp->minvis = 0;
  867. X          if (!Blind) pline("%s appears before you.", Amonnam(mtmp));
  868. X          newsym(mtmp->mx,mtmp->my);
  869. X      }
  870. X!     if (u.usym == S_DEMON) {    /* Won't blackmail their own. */
  871. X  
  872. X          pline("%s says, \"Good hunting, %s.\" and vanishes.",
  873. X            Amonnam(mtmp), flags.female ? "Sister" : "Brother");
  874. X***************
  875. X*** 126,144 ****
  876. X          rloc(mtmp);
  877. X          return(1);
  878. X      }
  879. X!     demand = (u.ugold * (rnd(80) + 20 * Athome)) / 100;
  880. X!     if(!demand)          /* you have no gold */
  881. X          return mtmp->mpeaceful = 0;
  882. X      else {
  883. X- 
  884. X          pline("%s demands %ld zorkmid%s for safe passage.",
  885. X            Amonnam(mtmp), demand, plur(demand));
  886. X  
  887. X!         if((offer = bribe(mtmp)) >= demand) {
  888. X          pline("%s vanishes, laughing about cowardly mortals.",
  889. X                Amonnam(mtmp));
  890. X          } else {
  891. X!         if((long)rnd(40) > (demand - offer)) {
  892. X              pline("%s scowls at you menacingly, then vanishes.",
  893. X                Amonnam(mtmp));
  894. X          } else {
  895. X--- 137,155 ----
  896. X          rloc(mtmp);
  897. X          return(1);
  898. X      }
  899. X!     demand = (u.ugold * (rnd(80) + 20 * Athome)) /
  900. X!          100 * (1 + (sgn(u.ualign.type) == sgn(mtmp->data->maligntyp)));
  901. X!     if (!demand)          /* you have no gold */
  902. X          return mtmp->mpeaceful = 0;
  903. X      else {
  904. X          pline("%s demands %ld zorkmid%s for safe passage.",
  905. X            Amonnam(mtmp), demand, plur(demand));
  906. X  
  907. X!         if ((offer = bribe(mtmp)) >= demand) {
  908. X          pline("%s vanishes, laughing about cowardly mortals.",
  909. X                Amonnam(mtmp));
  910. X          } else {
  911. X!         if ((long)rnd(40) > (demand - offer)) {
  912. X              pline("%s scowls at you menacingly, then vanishes.",
  913. X                Amonnam(mtmp));
  914. X          } else {
  915. X***************
  916. X*** 161,174 ****
  917. X      getlin("How much will you offer?", buf);
  918. X      (void) sscanf(buf, "%ld", &offer);
  919. X  
  920. X! /*Michael Paddon -- fix for negative offer to monster*/    /*JAR880815 - */
  921. X!      if(offer < 0L) {
  922. X!          You("try to shortchange %s, but fumble.", 
  923. X               mon_nam(mtmp));
  924. X           offer = 0L;
  925. X!      } else if(offer == 0L) {
  926. X          You("refuse.");
  927. X!      } else if(offer >= u.ugold) {
  928. X          You("give %s all your gold.", mon_nam(mtmp));
  929. X          offer = u.ugold;
  930. X      } else You("give %s %ld zorkmid%s.", mon_nam(mtmp), offer,
  931. X--- 172,186 ----
  932. X      getlin("How much will you offer?", buf);
  933. X      (void) sscanf(buf, "%ld", &offer);
  934. X  
  935. X!     /*Michael Paddon -- fix for negative offer to monster*/
  936. X!     /*JAR880815 - */
  937. X!      if (offer < 0L) {
  938. X!          You("try to shortchange %s, but fumble.",
  939. X               mon_nam(mtmp));
  940. X           offer = 0L;
  941. X!      } else if (offer == 0L) {
  942. X          You("refuse.");
  943. X!      } else if (offer >= u.ugold) {
  944. X          You("give %s all your gold.", mon_nam(mtmp));
  945. X          offer = u.ugold;
  946. X      } else You("give %s %ld zorkmid%s.", mon_nam(mtmp), offer,
  947. X***************
  948. X*** 181,208 ****
  949. X  }
  950. X  
  951. X  int
  952. X! dprince() {
  953. X!     int    tryct, pm;
  954. X  
  955. X!     for(tryct = 0; tryct < 20; tryct++) {
  956. X          pm = rn1(PM_DEMOGORGON + 1 - PM_ORCUS, PM_ORCUS);
  957. X!         if(!(mons[pm].geno & (G_GENOD | G_EXTINCT)))
  958. X          return(pm);
  959. X      }
  960. X!     return(dlord());    /* approximate */
  961. X  }
  962. X  
  963. X  int
  964. X! dlord()
  965. X  {
  966. X!     int    tryct, pm;
  967. X  
  968. X!     for(tryct = 0; tryct < 20; tryct++) {
  969. X          pm = rn1(PM_YEENOGHU + 1 - PM_JUIBLEX, PM_JUIBLEX);
  970. X!         if(!(mons[pm].geno & (G_GENOD | G_EXTINCT)))
  971. X          return(pm);
  972. X      }
  973. X!     return(ndemon());    /* approximate */
  974. X  }
  975. X  
  976. X  /* create lawful (good) lord */
  977. X--- 193,225 ----
  978. X  }
  979. X  
  980. X  int
  981. X! dprince(atyp)
  982. X! aligntyp atyp;
  983. X! {
  984. X!     int tryct, pm;
  985. X  
  986. X!     for (tryct = 0; tryct < 20; tryct++) {
  987. X          pm = rn1(PM_DEMOGORGON + 1 - PM_ORCUS, PM_ORCUS);
  988. X!         if (!(mons[pm].geno & (G_GENOD | G_EXTINCT)) &&
  989. X!             (atyp == A_NONE || sgn(mons[pm].maligntyp) == sgn(atyp)))
  990. X          return(pm);
  991. X      }
  992. X!     return(dlord(atyp));    /* approximate */
  993. X  }
  994. X  
  995. X  int
  996. X! dlord(atyp)
  997. X! aligntyp atyp;
  998. X  {
  999. X!     int tryct, pm;
  1000. X  
  1001. X!     for (tryct = 0; tryct < 20; tryct++) {
  1002. X          pm = rn1(PM_YEENOGHU + 1 - PM_JUIBLEX, PM_JUIBLEX);
  1003. X!         if (!(mons[pm].geno & (G_GENOD | G_EXTINCT)) &&
  1004. X!             (atyp == A_NONE || sgn(mons[pm].maligntyp) == sgn(atyp)))
  1005. X          return(pm);
  1006. X      }
  1007. X!     return(ndemon(atyp));    /* approximate */
  1008. X  }
  1009. X  
  1010. X  /* create lawful (good) lord */
  1011. X***************
  1012. X*** 209,215 ****
  1013. X  int
  1014. X  llord()
  1015. X  {
  1016. X!     if(!(mons[PM_ARCHON].geno & (G_GENOD | G_EXTINCT)))
  1017. X          return(PM_ARCHON);
  1018. X  
  1019. X      return(lminion());    /* approximate */
  1020. X--- 226,232 ----
  1021. X  int
  1022. X  llord()
  1023. X  {
  1024. X!     if (!(mons[PM_ARCHON].geno & (G_GENOD | G_EXTINCT)))
  1025. X          return(PM_ARCHON);
  1026. X  
  1027. X      return(lminion());    /* approximate */
  1028. X***************
  1029. X*** 221,235 ****
  1030. X      int    tryct;
  1031. X      struct    permonst *ptr;
  1032. X  
  1033. X!     for(tryct = 0; tryct < 20; tryct++)
  1034. X!         if((ptr = mkclass(S_ANGEL,0)) && !is_lord(ptr))
  1035. X          return(monsndx(ptr));
  1036. X  
  1037. X      return(0);
  1038. X  }
  1039. X  
  1040. X  int
  1041. X! ndemon()
  1042. X  {
  1043. X      int    tryct;
  1044. X      struct    permonst *ptr;
  1045. X--- 238,255 ----
  1046. X      int    tryct;
  1047. X      struct    permonst *ptr;
  1048. X  
  1049. X!     for (tryct = 0; tryct < 20; tryct++) {
  1050. X!         ptr = mkclass(S_ANGEL,0);
  1051. X!         if (ptr && !is_lord(ptr))
  1052. X          return(monsndx(ptr));
  1053. X+     }
  1054. X  
  1055. X      return(0);
  1056. X  }
  1057. X  
  1058. X  int
  1059. X! ndemon(atyp)
  1060. X! aligntyp atyp;
  1061. X  {
  1062. X      int    tryct;
  1063. X      struct    permonst *ptr;
  1064. X***************
  1065. X*** 236,242 ****
  1066. X  
  1067. X      for (tryct = 0; tryct < 20; tryct++) {
  1068. X          ptr = mkclass(S_DEMON, 0);
  1069. X!         if (is_ndemon(ptr))
  1070. X          return(monsndx(ptr));
  1071. X      }
  1072. X  
  1073. X--- 256,263 ----
  1074. X  
  1075. X      for (tryct = 0; tryct < 20; tryct++) {
  1076. X          ptr = mkclass(S_DEMON, 0);
  1077. X!         if (is_ndemon(ptr) &&
  1078. X!             (atyp == A_NONE || sgn(ptr->maligntyp) == sgn(atyp)))
  1079. X          return(monsndx(ptr));
  1080. X      }
  1081. X  
  1082. X*** /tmp/da08317    Thu Feb 25 10:23:45 1993
  1083. X--- src/mklev.c    Mon Feb 22 17:02:31 1993
  1084. X***************
  1085. X*** 1,4 ****
  1086. X! /*    SCCS Id: @(#)mklev.c    3.1    92/10/10    */
  1087. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1088. X  /* NetHack may be freely redistributed.  See license for details. */
  1089. X  
  1090. X--- 1,4 ----
  1091. X! /*    SCCS Id: @(#)mklev.c    3.1    93/02/21    */
  1092. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1093. X  /* NetHack may be freely redistributed.  See license for details. */
  1094. X  
  1095. X***************
  1096. X*** 437,455 ****
  1097. X      }
  1098. X      *xx = dd.x;
  1099. X      *yy = dd.y;
  1100. X!     return(isok(*xx,*yy+*dy) && levl[*xx][(*yy)+(*dy)].typ == STONE);
  1101. X  }
  1102. X  
  1103. X! /* there should be one of these per trap */
  1104. X! const char *trap_engravings[TRAPNUM] = {
  1105. X!                 "", "", "", "", "", "", "",
  1106. X!                 "", "", "", "", "", "",
  1107. X!                 "ad ae?ar um", "?la? ?as ?er?", "ad ae?ar um",
  1108. X!                 "", "", "", ""
  1109. X  #ifdef POLYSELF
  1110. X!                 ,""
  1111. X  #endif
  1112. X!                 };
  1113. X  
  1114. X  static void
  1115. X  makeniche(trap_type)
  1116. X--- 437,458 ----
  1117. X      }
  1118. X      *xx = dd.x;
  1119. X      *yy = dd.y;
  1120. X!     return((isok(*xx,*yy+*dy) && levl[*xx][*yy+*dy].typ == STONE)
  1121. X!         && (isok(*xx,*yy-*dy) && !IS_POOL(levl[*xx][*yy-*dy].typ)
  1122. X!                   && !IS_FURNITURE(levl[*xx][*yy-*dy].typ)));
  1123. X  }
  1124. X  
  1125. X! /* there should be one of these per trap, in the same order as trap.h */
  1126. X! static NEARDATA const char *trap_engravings[TRAPNUM] = {
  1127. X!                 NULL, NULL, NULL, NULL, NULL, NULL,
  1128. X!                 NULL, NULL, NULL, NULL, NULL, NULL,
  1129. X!             /* 12..14: trapdoor, teleport, level-teleport */
  1130. X!                 "?la? ?as ?er?", "ad ae?ar um", "ad ae?ar um",
  1131. X!                 NULL, NULL, NULL, NULL, NULL,
  1132. X  #ifdef POLYSELF
  1133. X!                 NULL,
  1134. X  #endif
  1135. X! };
  1136. X  
  1137. X  static void
  1138. X  makeniche(trap_type)
  1139. X***************
  1140. X*** 477,484 ****
  1141. X              trap_type = ROCKTRAP;
  1142. X              ttmp = maketrap(xx, yy+dy, trap_type);
  1143. X              ttmp->once = 1;
  1144. X!             if (*trap_engravings[trap_type])
  1145. X!             make_engr_at(xx, yy-dy, trap_engravings[trap_type], 0L, DUST);
  1146. X          }
  1147. X          dosdoor(xx, yy, aroom, SDOOR);
  1148. X          } else {
  1149. X--- 480,488 ----
  1150. X              trap_type = ROCKTRAP;
  1151. X              ttmp = maketrap(xx, yy+dy, trap_type);
  1152. X              ttmp->once = 1;
  1153. X!             if (trap_engravings[trap_type])
  1154. X!             make_engr_at(xx, yy-dy,
  1155. X!                      trap_engravings[trap_type], 0L, DUST);
  1156. X          }
  1157. X          dosdoor(xx, yy, aroom, SDOOR);
  1158. X          } else {
  1159. X***************
  1160. X*** 571,576 ****
  1161. X--- 575,581 ----
  1162. X      nroom = 0;
  1163. X      rooms[0].hx = -1;
  1164. X      nsubroom = 0;
  1165. X+     subrooms[0].hx = -1;
  1166. X      doorindex = 0;
  1167. X      init_rect();
  1168. X      init_vault();
  1169. X***************
  1170. X*** 769,775 ****
  1171. X                       somex(croom), somey(croom), TRUE);
  1172. X  
  1173. X          /* maybe make some graffiti */
  1174. X!         if(!rn2(27 + 3 * depth(&u.uz))) {
  1175. X              const char *mesg = random_engraving();
  1176. X              if (mesg) {
  1177. X              do {
  1178. X--- 774,780 ----
  1179. X                       somex(croom), somey(croom), TRUE);
  1180. X  
  1181. X          /* maybe make some graffiti */
  1182. X!         if(!rn2(27 + 3 * abs(depth(&u.uz)))) {
  1183. X              const char *mesg = random_engraving();
  1184. X              if (mesg) {
  1185. X              do {
  1186. X***************
  1187. X*** 808,813 ****
  1188. X--- 813,820 ----
  1189. X      makelevel();
  1190. X      bound_digging();
  1191. X      in_mklev = FALSE;
  1192. X+     /* has_morgue gets cleared once morgue entered; graveyard stays set */
  1193. X+     level.flags.graveyard = level.flags.has_morgue;
  1194. X      if(!level.flags.is_maze_lev) {
  1195. X          for (croom = &rooms[0]; croom != &rooms[nroom]; croom++)
  1196. X  #ifdef SPECIALIZATION
  1197. X***************
  1198. X*** 1341,1347 ****
  1199. X      extern int n_dgns;        /* from dungeon.c */
  1200. X      d_level *source;
  1201. X      branch *br;
  1202. X!     xchar u_depth;
  1203. X  
  1204. X      br = dungeon_branch("Fort Ludios");
  1205. X      if (on_level(&knox_level, &br->end1)) {
  1206. X--- 1348,1354 ----
  1207. X      extern int n_dgns;        /* from dungeon.c */
  1208. X      d_level *source;
  1209. X      branch *br;
  1210. X!     schar u_depth;
  1211. X  
  1212. X      br = dungeon_branch("Fort Ludios");
  1213. X      if (on_level(&knox_level, &br->end1)) {
  1214. X*** /tmp/da08341    Thu Feb 25 10:23:52 1993
  1215. X--- src/mkobj.c    Wed Feb 17 09:26:55 1993
  1216. X***************
  1217. X*** 1,4 ****
  1218. X! /*    SCCS Id: @(#)mkobj.c    3.1    93/01/17    */
  1219. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1220. X  /* NetHack may be freely redistributed.  See license for details. */
  1221. X  
  1222. X--- 1,4 ----
  1223. X! /*    SCCS Id: @(#)mkobj.c    3.1    93/02/10    */
  1224. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1225. X  /* NetHack may be freely redistributed.  See license for details. */
  1226. X  
  1227. X***************
  1228. X*** 66,72 ****
  1229. X  { 4, AMULET_CLASS}
  1230. X  };
  1231. X  
  1232. X! static int NEARDATA mksx=0, NEARDATA mksy=0;
  1233. X  
  1234. X  struct obj *
  1235. X  mkobj_at(let,x,y, artif)
  1236. X--- 66,72 ----
  1237. X  { 4, AMULET_CLASS}
  1238. X  };
  1239. X  
  1240. X! static NEARDATA int mksx=0, mksy=0;
  1241. X  
  1242. X  struct obj *
  1243. X  mkobj_at(let,x,y, artif)
  1244. X***************
  1245. X*** 598,604 ****
  1246. X      if (obj->otyp == CORPSE && obj->corpsenm > -1)
  1247. X          return (int)obj->quan * mons[obj->corpsenm].cwt;
  1248. X      else if (obj->otyp == GOLD_PIECE)
  1249. X!         return (int)((obj->quan + 500L) / 1000L);
  1250. X      return(wt ? wt*(int)obj->quan : ((int)obj->quan + 1)>>1);
  1251. X  }
  1252. X  
  1253. X--- 598,604 ----
  1254. X      if (obj->otyp == CORPSE && obj->corpsenm > -1)
  1255. X          return (int)obj->quan * mons[obj->corpsenm].cwt;
  1256. X      else if (obj->otyp == GOLD_PIECE)
  1257. X!         return (int)((obj->quan + 50L) / 100L);
  1258. X      return(wt ? wt*(int)obj->quan : ((int)obj->quan + 1)>>1);
  1259. X  }
  1260. X  
  1261. X***************
  1262. X*** 676,682 ****
  1263. X          otmp = oname(otmp, nm, FALSE);
  1264. X          fobj = otmp;
  1265. X          level.objects[x][y] = otmp;
  1266. X-         if (is_pool(x,y)) water_damage(otmp,TRUE);
  1267. X      }
  1268. X      return(otmp);
  1269. X  }
  1270. X--- 676,681 ----
  1271. X***************
  1272. X*** 689,697 ****
  1273. X  
  1274. X      if (objects[otyp].oc_oprop == FIRE_RES) return FALSE;
  1275. X  
  1276. X!     return((objects[otyp].oc_material == WOOD ||
  1277. X!             objects[otyp].oc_material == 0));
  1278. X! 
  1279. X  }
  1280. X  
  1281. X  #endif /* OVLB */
  1282. X--- 688,695 ----
  1283. X  
  1284. X      if (objects[otyp].oc_oprop == FIRE_RES) return FALSE;
  1285. X  
  1286. X!     return((objects[otyp].oc_material <= WOOD &&
  1287. X!             objects[otyp].oc_material != LIQUID));
  1288. X  }
  1289. X  
  1290. X  #endif /* OVLB */
  1291. X***************
  1292. X*** 719,725 ****
  1293. X      otmp->nexthere = otmp2;
  1294. X      level.objects[x][y] = otmp;
  1295. X      }
  1296. X-     if (is_pool(x,y)) water_damage(otmp,TRUE);
  1297. X  
  1298. X      /* set the new object's location */
  1299. X      otmp->ox = x;
  1300. X--- 717,722 ----
  1301. X*** /tmp/da08349    Thu Feb 25 10:23:56 1993
  1302. X--- src/mkroom.c    Thu Feb  4 10:41:22 1993
  1303. X***************
  1304. X*** 371,378 ****
  1305. X      register int i = rn2(100), hd = rn2(level_difficulty());
  1306. X  
  1307. X      if(hd > 10 && i < 10)
  1308. X!         return((Inhell || In_endgame(&u.uz)) ? 
  1309. X!                             mkclass(S_DEMON,0) : &mons[ndemon()]);
  1310. X      if(hd > 8 && i > 85)
  1311. X          return(mkclass(S_VAMPIRE,0));
  1312. X  
  1313. X--- 371,378 ----
  1314. X      register int i = rn2(100), hd = rn2(level_difficulty());
  1315. X  
  1316. X      if(hd > 10 && i < 10)
  1317. X!         return((Inhell || In_endgame(&u.uz)) ? mkclass(S_DEMON,0) :
  1318. X!                                &mons[ndemon(A_NONE)]);
  1319. X      if(hd > 8 && i > 85)
  1320. X          return(mkclass(S_VAMPIRE,0));
  1321. X  
  1322. X*** /tmp/da08357    Thu Feb 25 10:23:58 1993
  1323. X--- src/mon.c    Wed Feb 24 16:22:21 1993
  1324. X***************
  1325. X*** 1,4 ****
  1326. X! /*    SCCS Id: @(#)mon.c    3.1    93/01/19    */
  1327. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1328. X  /* NetHack may be freely redistributed.  See license for details. */
  1329. X  
  1330. X--- 1,4 ----
  1331. X! /*    SCCS Id: @(#)mon.c    3.1    93/02/21    */
  1332. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1333. X  /* NetHack may be freely redistributed.  See license for details. */
  1334. X  
  1335. X***************
  1336. X*** 230,236 ****
  1337. X  {
  1338. X      boolean inpool, infountain;
  1339. X  
  1340. X!     inpool = is_pool(mtmp->mx,mtmp->my);
  1341. X      infountain = IS_FOUNTAIN(levl[mtmp->mx][mtmp->my].typ);
  1342. X  
  1343. X      /* Gremlin multiplying won't go on forever since the hit points
  1344. X--- 230,237 ----
  1345. X  {
  1346. X      boolean inpool, infountain;
  1347. X  
  1348. X!     inpool = is_pool(mtmp->mx,mtmp->my) &&
  1349. X!          !is_flyer(mtmp->data) && !is_floater(mtmp->data);
  1350. X      infountain = IS_FOUNTAIN(levl[mtmp->mx][mtmp->my].typ);
  1351. X  
  1352. X      /* Gremlin multiplying won't go on forever since the hit points
  1353. X***************
  1354. X*** 246,260 ****
  1355. X          pline("%s multiplies.", Monnam(mtmp));
  1356. X          dryup(mtmp->mx,mtmp->my);
  1357. X      }
  1358. X      return (0);
  1359. X      }
  1360. X      if (inpool) {
  1361. X!     /* most monsters drown in pools */
  1362. X!     if (!is_flyer(mtmp->data) && !is_clinger(mtmp->data)
  1363. X          && !is_swimmer(mtmp->data) && !magic_breathing(mtmp->data)) {
  1364. X          if (cansee(mtmp->mx,mtmp->my))
  1365. X          pline("%s drowns.", Monnam(mtmp));
  1366. X          mondead(mtmp);
  1367. X          return (1);
  1368. X      }
  1369. X      } else {
  1370. X--- 247,272 ----
  1371. X          pline("%s multiplies.", Monnam(mtmp));
  1372. X          dryup(mtmp->mx,mtmp->my);
  1373. X      }
  1374. X+     if (inpool) water_damage(mtmp->minvent, FALSE, FALSE);
  1375. X      return (0);
  1376. X      }
  1377. X      if (inpool) {
  1378. X!     /* Most monsters drown in pools.  flooreffects() will take care of
  1379. X!      * water damage to dead monsters' inventory, but survivors need to
  1380. X!      * be handled here.  Swimmers are able to protect their stuff...
  1381. X!      */
  1382. X!     if (!is_clinger(mtmp->data)
  1383. X          && !is_swimmer(mtmp->data) && !magic_breathing(mtmp->data)) {
  1384. X          if (cansee(mtmp->mx,mtmp->my))
  1385. X          pline("%s drowns.", Monnam(mtmp));
  1386. X          mondead(mtmp);
  1387. X+ #ifdef MUSE
  1388. X+         if (mtmp->mhp > 0) {
  1389. X+         rloc(mtmp);
  1390. X+         water_damage(mtmp->minvent, FALSE, FALSE);
  1391. X+         return 0;
  1392. X+         }
  1393. X+ #endif
  1394. X          return (1);
  1395. X      }
  1396. X      } else {
  1397. X***************
  1398. X*** 494,503 ****
  1399. X  #ifdef MUSE
  1400. X          !str ? searches_for_item(mtmp,otmp) :
  1401. X  #endif
  1402. X!           (index(str, otmp->oclass)
  1403. X!            && (otmp->otyp != CORPSE || mtmp->data->mlet == S_NYMPH))) {
  1404. X!         if (!touch_artifact(otmp,mtmp)) return;
  1405. X!         if (!can_carry(mtmp,otmp)) return;
  1406. X          if (cansee(mtmp->mx,mtmp->my) && flags.verbose)
  1407. X              pline("%s picks up %s.", Monnam(mtmp), doname(otmp));
  1408. X          freeobj(otmp);
  1409. X--- 506,520 ----
  1410. X  #ifdef MUSE
  1411. X          !str ? searches_for_item(mtmp,otmp) :
  1412. X  #endif
  1413. X!           !!(index(str, otmp->oclass))) {
  1414. X!         if (otmp->otyp == CORPSE && mtmp->data->mlet != S_NYMPH
  1415. X! #ifdef MUSE
  1416. X!     && (otmp->corpsenm != PM_COCKATRICE || !(mtmp->misc_worn_check & W_ARMG))
  1417. X! #endif
  1418. X!                                     )
  1419. X!             continue;
  1420. X!         if (!touch_artifact(otmp,mtmp)) continue;
  1421. X!         if (!can_carry(mtmp,otmp)) continue;
  1422. X          if (cansee(mtmp->mx,mtmp->my) && flags.verbose)
  1423. X              pline("%s picks up %s.", Monnam(mtmp), doname(otmp));
  1424. X          freeobj(otmp);
  1425. X***************
  1426. X*** 565,570 ****
  1427. X--- 582,590 ----
  1428. X      register int newload = otmp->owt;
  1429. X  
  1430. X      if (otmp->otyp == CORPSE && otmp->corpsenm == PM_COCKATRICE
  1431. X+ #ifdef MUSE
  1432. X+             && !(mtmp->misc_worn_check & W_ARMG)
  1433. X+ #endif
  1434. X                          && !resists_ston(mtmp->data))
  1435. X          return(FALSE);
  1436. X      if (mtmp->isshk) return(TRUE); /* no limit */
  1437. X***************
  1438. X*** 624,631 ****
  1439. X      for(nx = max(1,x-1); nx <= maxx; nx++)
  1440. X        for(ny = max(0,y-1); ny <= maxy; ny++) {
  1441. X          if(nx == x && ny == y) continue;
  1442. X!         if(IS_ROCK(ntyp = levl[nx][ny].typ) && !(flag & ALLOW_WALL) &&
  1443. X!         !((flag & ALLOW_DIG) && may_dig(nx,ny))) continue;
  1444. X          if(IS_DOOR(ntyp) && !amorphous(mon->data) &&
  1445. X             ((levl[nx][ny].doormask & D_CLOSED && !(flag & OPENDOOR)) ||
  1446. X          (levl[nx][ny].doormask & D_LOCKED && !(flag & UNLOCKDOOR))
  1447. X--- 644,652 ----
  1448. X      for(nx = max(1,x-1); nx <= maxx; nx++)
  1449. X        for(ny = max(0,y-1); ny <= maxy; ny++) {
  1450. X          if(nx == x && ny == y) continue;
  1451. X!         if(IS_ROCK(ntyp = levl[nx][ny].typ) &&
  1452. X!            !((flag & ALLOW_WALL) && may_passwall(nx,ny)) &&
  1453. X!            !((flag & ALLOW_DIG) && may_dig(nx,ny))) continue;
  1454. X          if(IS_DOOR(ntyp) && !amorphous(mon->data) &&
  1455. X             ((levl[nx][ny].doormask & D_CLOSED && !(flag & OPENDOOR)) ||
  1456. X          (levl[nx][ny].doormask & D_LOCKED && !(flag & UNLOCKDOOR))
  1457. X***************
  1458. X*** 837,842 ****
  1459. X--- 858,903 ----
  1460. X      if(mtmp->wormno) wormgone(mtmp);
  1461. X  }
  1462. X  
  1463. X+ #ifdef MUSE
  1464. X+ static void FDECL(lifesaved_monster, (struct monst *));
  1465. X+ 
  1466. X+ static void
  1467. X+ lifesaved_monster(mtmp)
  1468. X+ struct monst *mtmp;
  1469. X+ {
  1470. X+     struct obj *lifesave;
  1471. X+ 
  1472. X+     if ((lifesave = which_armor(mtmp, W_AMUL))
  1473. X+             && lifesave->otyp == AMULET_OF_LIFE_SAVING) {
  1474. X+         pline("But wait...");
  1475. X+         if (canseemon(mtmp)) {
  1476. X+             pline("%s's medallion begins to glow!",
  1477. X+                 Monnam(mtmp));
  1478. X+             makeknown(AMULET_OF_LIFE_SAVING);
  1479. X+             pline("%s looks much better!", Monnam(mtmp));
  1480. X+             pline("The medallion crumbles to dust!");
  1481. X+         } else
  1482. X+             pline("Maybe not...");
  1483. X+         m_useup(mtmp, lifesave);
  1484. X+         if (mtmp->mhpmax <= 0) mtmp->mhpmax = 10;
  1485. X+         mtmp->mhp = mtmp->mhpmax;
  1486. X+         mtmp->mcanmove = 1;
  1487. X+         mtmp->mfrozen = 0;
  1488. X+         if (mtmp->mtame && !mtmp->isminion) {
  1489. X+             struct edog *edog = EDOG(mtmp);
  1490. X+             if (edog->hungrytime < moves+500)
  1491. X+                 edog->hungrytime = moves+500;
  1492. X+         }
  1493. X+         if (mtmp->data->geno & G_GENOD)
  1494. X+             pline("Unfortunately %s is still genocided...",
  1495. X+                 mon_nam(mtmp));
  1496. X+         else
  1497. X+             return;
  1498. X+     }
  1499. X+     mtmp->mhp = 0;
  1500. X+ }
  1501. X+ #endif
  1502. X+ 
  1503. X  void
  1504. X  mondead(mtmp)
  1505. X  register struct monst *mtmp;
  1506. X***************
  1507. X*** 848,853 ****
  1508. X--- 909,918 ----
  1509. X           * the m_detach or there will be relmon problems later */
  1510. X          if(!grddead(mtmp)) return;
  1511. X      }
  1512. X+ #ifdef MUSE
  1513. X+     lifesaved_monster(mtmp);
  1514. X+     if (mtmp->mhp > 0) return;
  1515. X+ #endif
  1516. X  
  1517. X      /* restore chameleon, lycanthropes to true form at death */
  1518. X      if(mtmp->cham) mtmp->data = &mons[PM_CHAMELEON];
  1519. X***************
  1520. X*** 948,953 ****
  1521. X--- 1013,1027 ----
  1522. X      struct obj *otmp, *contents;
  1523. X      xchar x = mdef->mx, y = mdef->my;
  1524. X  
  1525. X+ #ifdef MUSE
  1526. X+     /* we have to make the statue before calling mondead, to be able to
  1527. X+      * put inventory in it, and we have to check for lifesaving before
  1528. X+      * making the statue....
  1529. X+      */
  1530. X+     lifesaved_monster(mdef);
  1531. X+     if (mdef->mhp > 0) return;
  1532. X+ #endif
  1533. X+ 
  1534. X      if((int)mdef->data->msize > MZ_TINY ||
  1535. X         !rn2(2 + ((mdef->data->geno & G_FREQ) > 2))) {
  1536. X          otmp = mk_named_object(STATUE, mdef->data, x, y,
  1537. X***************
  1538. X*** 971,980 ****
  1539. X      } else
  1540. X          otmp = mksobj_at(ROCK, x, y, TRUE);
  1541. X  
  1542. X-     mondead(mdef);
  1543. X- 
  1544. X      stackobj(otmp);
  1545. X      if (cansee(x, y)) newsym(x,y);
  1546. X  }
  1547. X  
  1548. X  /* another monster has killed the monster mdef */
  1549. X--- 1045,1053 ----
  1550. X      } else
  1551. X          otmp = mksobj_at(ROCK, x, y, TRUE);
  1552. X  
  1553. X      stackobj(otmp);
  1554. X      if (cansee(x, y)) newsym(x,y);
  1555. X+     mondead(mdef);
  1556. X  }
  1557. X  
  1558. X  /* another monster has killed the monster mdef */
  1559. X***************
  1560. X*** 1066,1071 ****
  1561. X--- 1139,1148 ----
  1562. X      if(stoned) monstone(mtmp);
  1563. X      else mondead(mtmp);
  1564. X  
  1565. X+ #ifdef MUSE
  1566. X+     if (mtmp->mhp > 0) return; /* monster lifesaved */
  1567. X+ #endif
  1568. X+ 
  1569. X      mdat = mtmp->data; /* note: mondead can change mtmp->data */
  1570. X  
  1571. X      if (stoned) {
  1572. X***************
  1573. X*** 1077,1083 ****
  1574. X  #ifdef REINCARNATION
  1575. X           || Is_rogue_level(&u.uz)
  1576. X  #endif
  1577. X!        || (mdat == &mons[PM_WRAITH] && Is_valley(&u.uz) && rn2(5)))
  1578. X          goto cleanup;
  1579. X  
  1580. X  #ifdef MAIL
  1581. X--- 1154,1161 ----
  1582. X  #ifdef REINCARNATION
  1583. X           || Is_rogue_level(&u.uz)
  1584. X  #endif
  1585. X!        || (level.flags.graveyard && is_undead(mdat) &&
  1586. X!             rn2(mdat == &mons[PM_WRAITH] ? 5 : 2)))
  1587. X          goto cleanup;
  1588. X  
  1589. X  #ifdef MAIL
  1590. X***************
  1591. X*** 1136,1142 ****
  1592. X      if(redisp) newsym(x,y);
  1593. X  cleanup:
  1594. X      /* punish bad behaviour */
  1595. X!     if(is_human(mdat) && !always_hostile(mdat) &&
  1596. X         (monsndx(mdat) < PM_ARCHEOLOGIST || monsndx(mdat) > PM_WIZARD) &&
  1597. X         u.ualign.type != A_CHAOTIC) {
  1598. X          HTelepat &= ~INTRINSIC;
  1599. X--- 1214,1220 ----
  1600. X      if(redisp) newsym(x,y);
  1601. X  cleanup:
  1602. X      /* punish bad behaviour */
  1603. X!     if(is_human(mdat) && (!always_hostile(mdat) && mtmp->malign <= 0) &&
  1604. X         (monsndx(mdat) < PM_ARCHEOLOGIST || monsndx(mdat) > PM_WIZARD) &&
  1605. X         u.ualign.type != A_CHAOTIC) {
  1606. X          HTelepat &= ~INTRINSIC;
  1607. X***************
  1608. X*** 1321,1328 ****
  1609. X--- 1399,1421 ----
  1610. X      if(mtmp->data->msound == MS_SHRIEK) {
  1611. X      if(flags.soundok)
  1612. X          pline("%s shrieks.", Monnam(mtmp));
  1613. X+     if (!rn2(10)) {
  1614. X+         if (!rn2(13))
  1615. X+         (void) makemon(&mons[PM_PURPLE_WORM], 0, 0);
  1616. X+         else
  1617. X+         (void) makemon((struct permonst *)0, 0, 0);
  1618. X+ 
  1619. X+     }
  1620. X      aggravate();
  1621. X      }
  1622. X+     if(mtmp->data == &mons[PM_MEDUSA] && !mtmp->mcan) {
  1623. X+     register int i;
  1624. X+     for(i = 0; i < NATTK; i++)
  1625. X+          if(mtmp->data->mattk[i].aatyp == AT_GAZE) {
  1626. X+          (void) gazemu(mtmp, &mtmp->data->mattk[i]);
  1627. X+          break;
  1628. X+          }
  1629. X+     }
  1630. X  }
  1631. X  
  1632. X  #endif /* OVLB */
  1633. X***************
  1634. X*** 1552,1557 ****
  1635. X--- 1645,1654 ----
  1636. X      newsym(mtmp->mx,mtmp->my);
  1637. X  #ifdef MUSE
  1638. X      mon_break_armor(mtmp);
  1639. X+     /* Unfortunately, by now we forgot who did the polymorph, so we don't
  1640. X+      * have any way to give the player credit if this was a polymorph wand.
  1641. X+      */
  1642. X+     mselftouch(mtmp, "No longer petrify-resistant, ", FALSE);
  1643. X      possibly_unwield(mtmp);
  1644. X  #endif
  1645. X      return(1);
  1646. X*** /tmp/da08365    Thu Feb 25 10:24:01 1993
  1647. X--- src/mondata.c    Thu Feb 11 14:36:36 1993
  1648. X***************
  1649. X*** 274,282 ****
  1650. X  /* returns 3 values (0=male, 1=female, 2=none) */
  1651. X  int
  1652. X  gender(mtmp)
  1653. X!     register struct monst *mtmp;
  1654. X  {
  1655. X      if (is_neuter(mtmp->data)) return 2;
  1656. X      return mtmp->female;
  1657. X  }
  1658. X  
  1659. X--- 274,291 ----
  1660. X  /* returns 3 values (0=male, 1=female, 2=none) */
  1661. X  int
  1662. X  gender(mtmp)
  1663. X! register struct monst *mtmp;
  1664. X  {
  1665. X      if (is_neuter(mtmp->data)) return 2;
  1666. X+     return mtmp->female;
  1667. X+ }
  1668. X+ 
  1669. X+ /* like gender(), but lower animals and such are still "it" */
  1670. X+ int
  1671. X+ pronoun_gender(mtmp)
  1672. X+ register struct monst *mtmp;
  1673. X+ {
  1674. X+     if (Blind || !humanoid(mtmp->data)) return 2;
  1675. X      return mtmp->female;
  1676. X  }
  1677. X  
  1678. X*** /tmp/da08373    Thu Feb 25 10:24:03 1993
  1679. X--- src/monmove.c    Thu Feb 18 10:59:32 1993
  1680. X***************
  1681. X*** 1,4 ****
  1682. X! /*    SCCS Id: @(#)monmove.c    3.1    92/12/06    */
  1683. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1684. X  /* NetHack may be freely redistributed.  See license for details. */
  1685. X  
  1686. X--- 1,4 ----
  1687. X! /*    SCCS Id: @(#)monmove.c    3.1    93/02/17    */
  1688. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1689. X  /* NetHack may be freely redistributed.  See license for details. */
  1690. X  
  1691. X***************
  1692. X*** 10,22 ****
  1693. X  
  1694. X  static int FDECL(disturb,(struct monst *));
  1695. X  static void FDECL(distfleeck,(struct monst *,int *,int *,int *));
  1696. X  
  1697. X  #endif /* OVL0 */
  1698. X- #ifdef OVL1
  1699. X- 
  1700. X- STATIC_OVL boolean FDECL(mdig_tunnel,(struct monst *));
  1701. X- 
  1702. X- #endif /* OVL1 */
  1703. X  #ifdef OVLB
  1704. X  
  1705. X  boolean /* TRUE : mtmp died */
  1706. X--- 10,19 ----
  1707. X  
  1708. X  static int FDECL(disturb,(struct monst *));
  1709. X  static void FDECL(distfleeck,(struct monst *,int *,int *,int *));
  1710. X+ STATIC_DCL boolean FDECL(mdig_tunnel,(struct monst *));
  1711. X+ static void FDECL(watch_on_duty,(struct monst *));
  1712. X  
  1713. X  #endif /* OVL0 */
  1714. X  #ifdef OVLB
  1715. X  
  1716. X  boolean /* TRUE : mtmp died */
  1717. X***************
  1718. X*** 33,46 ****
  1719. X      mtmp->mhp -= rnd(15);
  1720. X      if(mtmp->mhp <= 0) {
  1721. X          mondied(mtmp);
  1722. X!         return(TRUE);
  1723. X      }
  1724. X      return(FALSE);
  1725. X  }
  1726. X  
  1727. X  #endif /* OVLB */
  1728. X! #ifdef OVL1
  1729. X  
  1730. X  /* Return TRUE if monster died, FALSE otherwise. */
  1731. X  STATIC_OVL boolean
  1732. X  mdig_tunnel(mtmp)
  1733. X--- 30,77 ----
  1734. X      mtmp->mhp -= rnd(15);
  1735. X      if(mtmp->mhp <= 0) {
  1736. X          mondied(mtmp);
  1737. X! #ifdef MUSE
  1738. X!         if (mtmp->mhp > 0) /* lifesaved */
  1739. X!             return(FALSE);
  1740. X!         else
  1741. X! #endif
  1742. X!             return(TRUE);
  1743. X      }
  1744. X      return(FALSE);
  1745. X  }
  1746. X  
  1747. X  #endif /* OVLB */
  1748. X! #ifdef OVL0
  1749. X  
  1750. X+ static void
  1751. X+ watch_on_duty(mtmp)
  1752. X+ register struct monst *mtmp;
  1753. X+ {
  1754. X+     register s_level *slev = Is_special(&u.uz);
  1755. X+     int    x, y;
  1756. X+ 
  1757. X+     if(slev && slev->flags.town && mtmp->mpeaceful &&
  1758. X+        m_canseeu(mtmp) && !rn2(3)) {
  1759. X+ 
  1760. X+         if(picking_lock(&x, &y) && IS_DOOR(levl[x][y].typ) &&
  1761. X+            (levl[x][y].doormask & D_LOCKED)) {
  1762. X+ 
  1763. X+         if(couldsee(mtmp->mx, mtmp->my)) {
  1764. X+ 
  1765. X+           pline("%s yells:", Amonnam(mtmp));
  1766. X+           if(levl[x][y].looted & D_WARNED) {
  1767. X+             verbalize("Halt, thief!  You're under arrest!");
  1768. X+             angry_guards(!(flags.soundok));
  1769. X+           } else {
  1770. X+             verbalize("Hey, stop picking that lock!");
  1771. X+             levl[x][y].looted |=  D_WARNED;
  1772. X+           }
  1773. X+           stop_occupation();
  1774. X+         }
  1775. X+         }
  1776. X+     }
  1777. X+ }
  1778. X+ 
  1779. X  /* Return TRUE if monster died, FALSE otherwise. */
  1780. X  STATIC_OVL boolean
  1781. X  mdig_tunnel(mtmp)
  1782. X***************
  1783. X*** 65,71 ****
  1784. X          }
  1785. X          } else {
  1786. X          if(!rn2(3) && flags.verbose)    /* not too often.. */
  1787. X!             You("feel an unexpected draft of air.");
  1788. X          here->doormask = D_BROKEN;
  1789. X          }
  1790. X          newsym(mtmp->mx,mtmp->my);
  1791. X--- 96,102 ----
  1792. X          }
  1793. X          } else {
  1794. X          if(!rn2(3) && flags.verbose)    /* not too often.. */
  1795. X!             You("feel an unexpected draft.");
  1796. X          here->doormask = D_BROKEN;
  1797. X          }
  1798. X          newsym(mtmp->mx,mtmp->my);
  1799. X***************
  1800. X*** 84,90 ****
  1801. X  
  1802. X      if(IS_WALL(here->typ)) {
  1803. X          if(flags.soundok && flags.verbose && !rn2(5))
  1804. X!         You("hear the sound of crashing rock.");
  1805. X          if (*in_rooms(mtmp->mx, mtmp->my, SHOPBASE))
  1806. X              add_damage(mtmp->mx, mtmp->my, 0L);
  1807. X          if (level.flags.is_maze_lev) {
  1808. X--- 115,121 ----
  1809. X  
  1810. X      if(IS_WALL(here->typ)) {
  1811. X          if(flags.soundok && flags.verbose && !rn2(5))
  1812. X!         You("hear crashing rock.");
  1813. X          if (*in_rooms(mtmp->mx, mtmp->my, SHOPBASE))
  1814. X              add_damage(mtmp->mx, mtmp->my, 0L);
  1815. X          if (level.flags.is_maze_lev) {
  1816. X***************
  1817. X*** 108,113 ****
  1818. X--- 139,147 ----
  1819. X      return FALSE ;
  1820. X  }
  1821. X  
  1822. X+ #endif /* OVL0 */
  1823. X+ #ifdef OVL1
  1824. X+ 
  1825. X  int
  1826. X  dochugw(mtmp)
  1827. X      register struct monst *mtmp;
  1828. X***************
  1829. X*** 302,323 ****
  1830. X      wipe_engr_at(mtmp->mx, mtmp->my, 1);
  1831. X  
  1832. X      /* confused monsters get unconfused with small probability */
  1833. X!     if(mtmp->mconf && !rn2(50)) mtmp->mconf = 0;
  1834. X  
  1835. X      /* stunned monsters get un-stunned with larger probability */
  1836. X!     if(mtmp->mstun && !rn2(10)) mtmp->mstun = 0;
  1837. X  
  1838. X      /* some monsters teleport */
  1839. X!     if(mtmp->mflee && !rn2(40) && can_teleport(mdat) && !mtmp->iswiz) {
  1840. X          rloc(mtmp);
  1841. X          return(0);
  1842. X      }
  1843. X!     if(mdat->msound == MS_SHRIEK && !um_dist(mtmp->mx, mtmp->my, 1))
  1844. X          m_respond(mtmp);
  1845. X!     if(mdat->mmove < rnd(6)) return(0);
  1846. X  
  1847. X      /* fleeing monsters might regain courage */
  1848. X!     if(mtmp->mflee && !mtmp->mfleetim
  1849. X         && mtmp->mhp == mtmp->mhpmax && !rn2(25)) mtmp->mflee = 0;
  1850. X  
  1851. X      set_apparxy(mtmp);
  1852. X--- 336,359 ----
  1853. X      wipe_engr_at(mtmp->mx, mtmp->my, 1);
  1854. X  
  1855. X      /* confused monsters get unconfused with small probability */
  1856. X!     if (mtmp->mconf && !rn2(50)) mtmp->mconf = 0;
  1857. X  
  1858. X      /* stunned monsters get un-stunned with larger probability */
  1859. X!     if (mtmp->mstun && !rn2(10)) mtmp->mstun = 0;
  1860. X  
  1861. X      /* some monsters teleport */
  1862. X!     if (mtmp->mflee && !rn2(40) && can_teleport(mdat) && !mtmp->iswiz) {
  1863. X          rloc(mtmp);
  1864. X          return(0);
  1865. X      }
  1866. X!     if (mdat->msound == MS_SHRIEK && !um_dist(mtmp->mx, mtmp->my, 1))
  1867. X          m_respond(mtmp);
  1868. X!     if (mdat == &mons[PM_MEDUSA] && cansee(mtmp->mx, mtmp->my))
  1869. X!         m_respond(mtmp);
  1870. X!     if (mdat->mmove < rnd(6)) return(0);
  1871. X  
  1872. X      /* fleeing monsters might regain courage */
  1873. X!     if (mtmp->mflee && !mtmp->mfleetim
  1874. X         && mtmp->mhp == mtmp->mhpmax && !rn2(25)) mtmp->mflee = 0;
  1875. X  
  1876. X      set_apparxy(mtmp);
  1877. X***************
  1878. X*** 347,353 ****
  1879. X      if(nearby && mdat->msound == MS_BRIBE &&
  1880. X         mtmp->mpeaceful && !mtmp->mtame) {
  1881. X          if (mtmp->mux != u.ux || mtmp->muy != u.uy) {
  1882. X!             pline("%s whispers something to thin air.",
  1883. X                  cansee(mtmp->mux, mtmp->muy) ? Monnam(mtmp) : "It");
  1884. X  #ifdef POLYSELF
  1885. X              if (is_demon(uasmon)) rloc(mtmp);
  1886. X--- 383,389 ----
  1887. X      if(nearby && mdat->msound == MS_BRIBE &&
  1888. X         mtmp->mpeaceful && !mtmp->mtame) {
  1889. X          if (mtmp->mux != u.ux || mtmp->muy != u.uy) {
  1890. X!             pline("%s whispers at thin air.",
  1891. X                  cansee(mtmp->mux, mtmp->muy) ? Monnam(mtmp) : "It");
  1892. X  #ifdef POLYSELF
  1893. X              if (is_demon(uasmon)) rloc(mtmp);
  1894. X***************
  1895. X*** 356,362 ****
  1896. X  #endif
  1897. X                  mtmp->minvis = 0;
  1898. X                  /* Why?  For the same reason in real demon talk */
  1899. X!                 pline("%s gets angry.", Amonnam(mtmp));
  1900. X                  mtmp->mpeaceful = 0;
  1901. X                  /* since no way is an image going to pay it off */
  1902. X  #ifdef POLYSELF
  1903. X--- 392,398 ----
  1904. X  #endif
  1905. X                  mtmp->minvis = 0;
  1906. X                  /* Why?  For the same reason in real demon talk */
  1907. X!                 pline("%s gets angry!", Amonnam(mtmp));
  1908. X                  mtmp->mpeaceful = 0;
  1909. X                  /* since no way is an image going to pay it off */
  1910. X  #ifdef POLYSELF
  1911. X***************
  1912. X*** 365,371 ****
  1913. X          } else if(demon_talk(mtmp)) return(1);    /* you paid it off */
  1914. X      }
  1915. X  
  1916. X!     if (mdat == &mons[PM_MIND_FLAYER] && !rn2(20)) {
  1917. X          struct monst *m2, *nmon = (struct monst *)0;
  1918. X  
  1919. X          if (canseemon(mtmp))
  1920. X--- 401,411 ----
  1921. X          } else if(demon_talk(mtmp)) return(1);    /* you paid it off */
  1922. X      }
  1923. X  
  1924. X!     /* the watch will look around and see if you are up to no good :-) */
  1925. X!     if (mdat == &mons[PM_WATCHMAN] || mdat == &mons[PM_WATCH_CAPTAIN]) 
  1926. X!         watch_on_duty(mtmp);
  1927. X! 
  1928. X!     else if (mdat == &mons[PM_MIND_FLAYER] && !rn2(20)) {
  1929. X          struct monst *m2, *nmon = (struct monst *)0;
  1930. X  
  1931. X          if (canseemon(mtmp))
  1932. X***************
  1933. X*** 374,389 ****
  1934. X              You("sense a faint wave of psychic energy.");
  1935. X              goto toofar;
  1936. X          }
  1937. X!         You("sense a wave of psychic energy pouring over you!");
  1938. X          if (mtmp->mpeaceful &&
  1939. X              (!Conflict || resist(mtmp, RING_CLASS, 0, 0)))
  1940. X!             pline("It seems quite soothing.");
  1941. X          else {
  1942. X              register boolean m_sen = sensemon(mtmp);
  1943. X  
  1944. X              if (m_sen || (Telepat && rn2(2)) || !rn2(10)) {
  1945. X                  int dmg;
  1946. X!                 pline("It locks in on your %s!",
  1947. X                      m_sen ? "telepathy" :
  1948. X                      Telepat ? "latent telepathy" : "mind");
  1949. X                  dmg = rnd(15);
  1950. X--- 414,429 ----
  1951. X              You("sense a faint wave of psychic energy.");
  1952. X              goto toofar;
  1953. X          }
  1954. X!         pline("A wave of psychic energy pours over you!");
  1955. X          if (mtmp->mpeaceful &&
  1956. X              (!Conflict || resist(mtmp, RING_CLASS, 0, 0)))
  1957. X!             pline("It feels quite soothing.");
  1958. X          else {
  1959. X              register boolean m_sen = sensemon(mtmp);
  1960. X  
  1961. X              if (m_sen || (Telepat && rn2(2)) || !rn2(10)) {
  1962. X                  int dmg;
  1963. X!                 pline("It locks on to your %s!",
  1964. X                      m_sen ? "telepathy" :
  1965. X                      Telepat ? "latent telepathy" : "mind");
  1966. X                  dmg = rnd(15);
  1967. X***************
  1968. X*** 399,405 ****
  1969. X              if ((telepathic(m2->data) &&
  1970. X                  (rn2(2) || m2->mblinded)) || !rn2(10)) {
  1971. X                  if (cansee(m2->mx, m2->my))
  1972. X!                     pline("It locks in on %s.", mon_nam(m2));
  1973. X                  m2->mhp -= rnd(15);
  1974. X                  if (m2->mhp <= 0)
  1975. X                      monkilled(m2, "", AD_DRIN);
  1976. X--- 439,445 ----
  1977. X              if ((telepathic(m2->data) &&
  1978. X                  (rn2(2) || m2->mblinded)) || !rn2(10)) {
  1979. X                  if (cansee(m2->mx, m2->my))
  1980. X!                     pline("It locks on to %s.", mon_nam(m2));
  1981. X                  m2->mhp -= rnd(15);
  1982. X                  if (m2->mhp <= 0)
  1983. X                      monkilled(m2, "", AD_DRIN);
  1984. X***************
  1985. X*** 484,494 ****
  1986. X      return(tmp == 2);
  1987. X  }
  1988. X  
  1989. X! static const char NEARDATA practical[] = { WEAPON_CLASS, ARMOR_CLASS, GEM_CLASS, FOOD_CLASS, 0 };
  1990. X! static const char NEARDATA magical[] = {
  1991. X      AMULET_CLASS, POTION_CLASS, SCROLL_CLASS, WAND_CLASS, RING_CLASS,
  1992. X      SPBOOK_CLASS, 0 };
  1993. X! static const char NEARDATA indigestion[] = { BALL_CLASS, ROCK_CLASS, 0 };
  1994. X  
  1995. X  #ifdef POLYSELF
  1996. X  boolean
  1997. X--- 524,534 ----
  1998. X      return(tmp == 2);
  1999. X  }
  2000. X  
  2001. X! static NEARDATA const char practical[] = { WEAPON_CLASS, ARMOR_CLASS, GEM_CLASS, FOOD_CLASS, 0 };
  2002. X! static NEARDATA const char magical[] = {
  2003. X      AMULET_CLASS, POTION_CLASS, SCROLL_CLASS, WAND_CLASS, RING_CLASS,
  2004. X      SPBOOK_CLASS, 0 };
  2005. X! static NEARDATA const char indigestion[] = { BALL_CLASS, ROCK_CLASS, 0 };
  2006. X  
  2007. X  #ifdef POLYSELF
  2008. X  boolean
  2009. X***************
  2010. X*** 710,718 ****
  2011. X          for(otmp = fobj; otmp; otmp = otmp->nobj) {
  2012. X          xx = otmp->ox;
  2013. X          yy = otmp->oy;
  2014. X          if(xx >= lmx && xx <= oomx && yy >= lmy && yy <= oomy) {
  2015. X              if(((likegold && otmp->otyp == GOLD_PIECE) ||
  2016. X!                (likeobjs && index(practical, otmp->oclass)) ||
  2017. X                 (likemagic && index(magical, otmp->oclass)) ||
  2018. X  #ifdef MUSE
  2019. X                 (uses_items && searches_for_item(mtmp, otmp)) ||
  2020. X--- 750,764 ----
  2021. X          for(otmp = fobj; otmp; otmp = otmp->nobj) {
  2022. X          xx = otmp->ox;
  2023. X          yy = otmp->oy;
  2024. X+         /* Nymphs take everything.  Most other creatures should not
  2025. X+          * pick up corpses except as a special case like in
  2026. X+          * searches_for_item().  We need to do this check in
  2027. X+          * mpickstuff() as well.
  2028. X+          */
  2029. X          if(xx >= lmx && xx <= oomx && yy >= lmy && yy <= oomy) {
  2030. X              if(((likegold && otmp->otyp == GOLD_PIECE) ||
  2031. X!                (likeobjs && index(practical, otmp->oclass) &&
  2032. X!             (otmp->otyp != CORPSE || ptr->mlet == S_NYMPH)) ||
  2033. X                 (likemagic && index(magical, otmp->oclass)) ||
  2034. X  #ifdef MUSE
  2035. X                 (uses_items && searches_for_item(mtmp, otmp)) ||
  2036. X***************
  2037. X*** 918,926 ****
  2038. X              } else {
  2039. X              if (flags.verbose) {
  2040. X                  if (canseeit)
  2041. X!                   You("see a door being unlocked and opened.");
  2042. X                  else if (flags.soundok)
  2043. X!                    You("hear a door being unlocked and opened.");
  2044. X                  }
  2045. X                  here->doormask = D_ISOPEN;
  2046. X              /* newsym(mtmp->mx, mtmp->my); */
  2047. X--- 964,972 ----
  2048. X              } else {
  2049. X              if (flags.verbose) {
  2050. X                  if (canseeit)
  2051. X!                    You("see a door unlock and open.");
  2052. X                  else if (flags.soundok)
  2053. X!                    You("hear a door unlock and open.");
  2054. X                  }
  2055. X                  here->doormask = D_ISOPEN;
  2056. X              /* newsym(mtmp->mx, mtmp->my); */
  2057. X***************
  2058. X*** 935,943 ****
  2059. X              } else {
  2060. X                  if (flags.verbose) {
  2061. X                  if (canseeit)
  2062. X!                      You("see a door being opened.");
  2063. X                  else if (flags.soundok)
  2064. X!                      You("hear the sound of a door opening.");
  2065. X                  }
  2066. X                  here->doormask = D_ISOPEN;
  2067. X              /* newsym(mtmp->mx, mtmp->my); */  /* done below */
  2068. X--- 981,989 ----
  2069. X              } else {
  2070. X                  if (flags.verbose) {
  2071. X                  if (canseeit)
  2072. X!                      You("see a door open.");
  2073. X                  else if (flags.soundok)
  2074. X!                      You("hear a door open.");
  2075. X                  }
  2076. X                  here->doormask = D_ISOPEN;
  2077. X              /* newsym(mtmp->mx, mtmp->my); */  /* done below */
  2078. X***************
  2079. X*** 955,961 ****
  2080. X                  if (canseeit)
  2081. X                      You("see a door crash open.");
  2082. X                  else if (flags.soundok)
  2083. X!                     You("hear the sound of a door crashing open.");
  2084. X                  }
  2085. X                  if (here->doormask & D_LOCKED && !rn2(2))
  2086. X                      here->doormask = D_NODOOR;
  2087. X--- 1001,1007 ----
  2088. X                  if (canseeit)
  2089. X                      You("see a door crash open.");
  2090. X                  else if (flags.soundok)
  2091. X!                     You("hear a door crash open.");
  2092. X                  }
  2093. X                  if (here->doormask & D_LOCKED && !rn2(2))
  2094. X                      here->doormask = D_NODOOR;
  2095. X
  2096. END_OF_FILE
  2097. if test 55585 -ne `wc -c <'patches01e'`; then
  2098.     echo shar: \"'patches01e'\" unpacked with wrong size!
  2099. fi
  2100. # end of 'patches01e'
  2101. echo shar: End of archive 6 \(of 31\).
  2102. cp /dev/null ark6isdone
  2103. MISSING=""
  2104. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ; do
  2105.     if test ! -f ark${I}isdone ; then
  2106.     MISSING="${MISSING} ${I}"
  2107.     fi
  2108. done
  2109. if test "${MISSING}" = "" ; then
  2110.     echo You have unpacked all 31 archives.
  2111.     echo "Now execute 'patchit.sh'"
  2112.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2113. else
  2114.     echo You still need to unpack the following archives:
  2115.     echo "        " ${MISSING}
  2116. fi
  2117. ##  End of shell archive.
  2118. exit 0
  2119.