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

  1. Subject:  v17i050:  nethack31 - display oriented dungeons & dragons (Ver. 3.1), Patch1i/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 50
  7. Archive-name: nethack31/Patch1i
  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 9 (of 31)."
  20. # Contents:  patches01c sys/winnt/winnt.c
  21. # Wrapped by billr@saab on Fri Mar  5 10:50:43 1993
  22. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  23. if test -f 'patches01c' -a "${1}" != "-c" ; then 
  24.   echo shar: Renaming existing file \"'patches01c'\" to \"'patches01c.orig'\"
  25.   mv -f 'patches01c' 'patches01c.orig'
  26. fi
  27. echo shar: Extracting \"'patches01c'\" \(53866 characters\)
  28. sed "s/^X//" >'patches01c' <<'END_OF_FILE'
  29. X*** /tmp/da08125    Thu Feb 25 10:22:44 1993
  30. X--- src/dog.c    Tue Feb 23 17:25:10 1993
  31. X***************
  32. X*** 184,189 ****
  33. X--- 184,197 ----
  34. X              if(nmv > (long)mtmp->mspec_used) mtmp->mspec_used = 0;
  35. X              else mtmp->mspec_used -= nmv;
  36. X  
  37. X+             /* reduce tameness for every 150 moves you are away */
  38. X+             if (mtmp->mtame > nmv/150) mtmp->mtame -= nmv/150;
  39. X+             else mtmp->mtame = 0;
  40. X+ 
  41. X+             /* let monster move a bit on the new level */
  42. X+             /* see placement code below */
  43. X+             mtmp->mx = min(nmv, 8);
  44. X+ 
  45. X              if(!regenerates(mtmp->data)) nmv /= 20;
  46. X              if((long)mtmp->mhp + nmv >= (long)mtmp->mhpmax)
  47. X                  mtmp->mhp = mtmp->mhpmax;
  48. X***************
  49. X*** 202,222 ****
  50. X              } else if (mtmp->isshk && mtmp->mpeaceful)
  51. X              home_shk(mtmp, TRUE);
  52. X              else switch(mtmp->my) {
  53. X!             xchar *xlocale, *ylocale;
  54. X  
  55. X!             case 1: xlocale = &xupstair; ylocale = &yupstair;
  56. X                  goto common;
  57. X!             case 2: xlocale = &xdnstair; ylocale = &ydnstair;
  58. X                  goto common;
  59. X!             case 3: xlocale = &xupladder; ylocale = &yupladder;
  60. X                  goto common;
  61. X!             case 4: xlocale = &xdnladder; ylocale = &ydnladder;
  62. X                  goto common;
  63. X!             case 5: xlocale = &sstairs.sx; ylocale = &sstairs.sy;
  64. X                  goto common;
  65. X  common:
  66. X!                 if (*xlocale && *ylocale) {
  67. X!                 (void) mnearto(mtmp, *xlocale, *ylocale, FALSE);
  68. X                      break;
  69. X                  } /* else fall through */
  70. X              default: 
  71. X--- 210,254 ----
  72. X              } else if (mtmp->isshk && mtmp->mpeaceful)
  73. X              home_shk(mtmp, TRUE);
  74. X              else switch(mtmp->my) {
  75. X!             xchar xlocale, ylocale;
  76. X  
  77. X!             case 1: xlocale = xupstair; ylocale = yupstair;
  78. X                  goto common;
  79. X!             case 2: xlocale = xdnstair; ylocale = ydnstair;
  80. X                  goto common;
  81. X!             case 3: xlocale = xupladder; ylocale = yupladder;
  82. X                  goto common;
  83. X!             case 4: xlocale = xdnladder; ylocale = ydnladder;
  84. X                  goto common;
  85. X!             case 5: xlocale = sstairs.sx; ylocale = sstairs.sy;
  86. X                  goto common;
  87. X  common:
  88. X!                 if (xlocale) {
  89. X!                     if(mtmp->mx) {
  90. X!                     /* monster moved a bit */
  91. X!                     /* pick a nearby location */
  92. X!                     /* mnearto() deals w/stone, et al */
  93. X!                     int i, j;
  94. X!                     char *rmlist = in_rooms(xlocale,
  95. X!                                 ylocale, 0);
  96. X! 
  97. X!                     if (rmlist) {
  98. X!                         xlocale = somex(
  99. X!                         &rooms[*rmlist - ROOMOFFSET]);
  100. X!                         ylocale = somey(
  101. X!                         &rooms[*rmlist - ROOMOFFSET]);
  102. X!                     } else {
  103. X!                         i = max(1, xlocale - mtmp->mx);
  104. X!                         j = min(COLNO-1, xlocale+mtmp->mx);
  105. X!                         xlocale = rn1(j-i,i);
  106. X! 
  107. X!                         i = max(0, ylocale - mtmp->mx);
  108. X!                         j = min(ROWNO-1, ylocale+mtmp->mx);
  109. X!                         ylocale = rn1(j-i,i);
  110. X!                     }
  111. X!                     }
  112. X!                     (void) mnearto(mtmp,
  113. X!                            xlocale, ylocale, FALSE);
  114. X                      break;
  115. X                  } /* else fall through */
  116. X              default: 
  117. X***************
  118. X*** 336,346 ****
  119. X      migrating_mons = mtmp;
  120. X  #ifdef WALKIES
  121. X      if (mtmp->mleashed)  {
  122. X-         pline("The leash comes off!");
  123. X          m_unleash(mtmp);
  124. X      }
  125. X  #endif
  126. X-     mtmp->mtame = 0;
  127. X      newsym(mtmp->mx,mtmp->my);
  128. X      /* make sure to reset mtmp->[mx,my] to 0 when releasing, */
  129. X      /* so rloc() on next level doesn't affect MON_AT() state */
  130. X--- 368,378 ----
  131. X      migrating_mons = mtmp;
  132. X  #ifdef WALKIES
  133. X      if (mtmp->mleashed)  {
  134. X          m_unleash(mtmp);
  135. X+         mtmp->mtame--;
  136. X+         pline("The leash comes off!");
  137. X      }
  138. X  #endif
  139. X      newsym(mtmp->mx,mtmp->my);
  140. X      /* make sure to reset mtmp->[mx,my] to 0 when releasing, */
  141. X      /* so rloc() on next level doesn't affect MON_AT() state */
  142. X***************
  143. X*** 455,461 ****
  144. X          )
  145. X          return((struct monst *)0);
  146. X  
  147. X!     /* worst case, at least he'll be peaceful. */
  148. X      mtmp->mpeaceful = 1;
  149. X      set_malign(mtmp);
  150. X      if(flags.moonphase == FULL_MOON && night() && rn2(6) && obj
  151. X--- 487,493 ----
  152. X          )
  153. X          return((struct monst *)0);
  154. X  
  155. X!     /* worst case, at least it'll be peaceful. */
  156. X      mtmp->mpeaceful = 1;
  157. X      set_malign(mtmp);
  158. X      if(flags.moonphase == FULL_MOON && night() && rn2(6) && obj
  159. X***************
  160. X*** 462,470 ****
  161. X                          && mtmp->data->mlet == S_DOG)
  162. X          return((struct monst *)0);
  163. X  
  164. X!     /* If we cannot tame him, at least he's no longer afraid. */
  165. X      mtmp->mflee = 0;
  166. X      mtmp->mfleetim = 0;
  167. X      if(mtmp->mtame || !mtmp->mcanmove ||
  168. X         /* monsters with conflicting structures cannot be tamed */
  169. X         mtmp->isshk || mtmp->isgd || mtmp->ispriest || mtmp->isminion ||
  170. X--- 494,506 ----
  171. X                          && mtmp->data->mlet == S_DOG)
  172. X          return((struct monst *)0);
  173. X  
  174. X!     /* If we cannot tame it, at least it's no longer afraid. */
  175. X      mtmp->mflee = 0;
  176. X      mtmp->mfleetim = 0;
  177. X+     /* feeding it treats makes it tamer */
  178. X+     if (mtmp->mtame && mtmp->mtame < 20 && 
  179. X+         obj && dogfood(mtmp, obj) > ACCFOOD)
  180. X+         mtmp->mtame++;
  181. X      if(mtmp->mtame || !mtmp->mcanmove ||
  182. X         /* monsters with conflicting structures cannot be tamed */
  183. X         mtmp->isshk || mtmp->isgd || mtmp->ispriest || mtmp->isminion ||
  184. X***************
  185. X*** 480,490 ****
  186. X      if(obj) {
  187. X          if(dogfood(mtmp, obj) >= MANFOOD) return((struct monst *)0);
  188. X          if(cansee(mtmp->mx,mtmp->my))
  189. X!             pline("%s devours the %s.", Monnam(mtmp), xname(obj));
  190. X          obfree(obj, (struct obj *)0);
  191. X      }
  192. X      if (u.uswallow && mtmp == u.ustuck)
  193. X          expels(mtmp, mtmp->data, TRUE);
  194. X      mtmp2 = newmonst(sizeof(struct edog) + mtmp->mnamelth);
  195. X      *mtmp2 = *mtmp;
  196. X      mtmp2->mxlth = sizeof(struct edog);
  197. X--- 516,532 ----
  198. X      if(obj) {
  199. X          if(dogfood(mtmp, obj) >= MANFOOD) return((struct monst *)0);
  200. X          if(cansee(mtmp->mx,mtmp->my))
  201. X!             pline("%s devours %s.", Monnam(mtmp), the(xname(obj)));
  202. X          obfree(obj, (struct obj *)0);
  203. X      }
  204. X      if (u.uswallow && mtmp == u.ustuck)
  205. X          expels(mtmp, mtmp->data, TRUE);
  206. X+     else if (mtmp == u.ustuck
  207. X+ #ifdef POLYSELF
  208. X+          && !(u.mtimedone && sticks(uasmon))
  209. X+ #endif
  210. X+          )
  211. X+         unstuck(mtmp);
  212. X      mtmp2 = newmonst(sizeof(struct edog) + mtmp->mnamelth);
  213. X      *mtmp2 = *mtmp;
  214. X      mtmp2->mxlth = sizeof(struct edog);
  215. X***************
  216. X*** 493,498 ****
  217. X--- 535,556 ----
  218. X      replmon(mtmp,mtmp2);
  219. X      newsym(mtmp2->mx, mtmp2->my);
  220. X      return(mtmp2);
  221. X+ }
  222. X+ 
  223. X+ void
  224. X+ abuse_dog(mtmp)
  225. X+ struct monst *mtmp;
  226. X+ {
  227. X+     if (!mtmp->mtame) return;
  228. X+ 
  229. X+     if (Aggravate_monster || Conflict) mtmp->mtame /=2;
  230. X+     else mtmp->mtame--;
  231. X+ 
  232. X+ #ifdef SOUNDS
  233. X+     if (mtmp->mtame && rn2(mtmp->mtame)) yelp(mtmp);
  234. X+     else growl(mtmp);    /* give them a moment's worry */
  235. X+ #endif
  236. X+     if (!mtmp->mtame) newsym(mtmp->mx, mtmp->my);
  237. X  }
  238. X  
  239. X  #endif /* OVLB */
  240. X*** /tmp/da08133    Thu Feb 25 10:22:46 1993
  241. X--- src/dogmove.c    Fri Feb 19 13:51:09 1993
  242. X***************
  243. X*** 1,4 ****
  244. X! /*    SCCS Id: @(#)dogmove.c    3.1    92/11/26    */
  245. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  246. X  /* NetHack may be freely redistributed.  See license for details. */
  247. X  
  248. X--- 1,4 ----
  249. X! /*    SCCS Id: @(#)dogmove.c    3.1    93/02/09    */
  250. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  251. X  /* NetHack may be freely redistributed.  See license for details. */
  252. X  
  253. X***************
  254. X*** 31,37 ****
  255. X  }
  256. X  #endif
  257. X  
  258. X! static const char NEARDATA nofetch[] = { BALL_CLASS, CHAIN_CLASS, ROCK_CLASS, 0 };
  259. X  
  260. X  #endif /* OVL0 */
  261. X  
  262. X--- 31,37 ----
  263. X  }
  264. X  #endif
  265. X  
  266. X! static NEARDATA const char nofetch[] = { BALL_CLASS, CHAIN_CLASS, ROCK_CLASS, 0 };
  267. X  
  268. X  #endif /* OVL0 */
  269. X  
  270. X***************
  271. X*** 479,485 ****
  272. X               && (perceives(mtmp->data) || !mtmp2->minvis)) ||
  273. X              (mtmp2->data==&mons[PM_GELATINOUS_CUBE] && rn2(10)) ||
  274. X              (max_passive_dmg(mtmp2, mtmp) >= mtmp->mhp) ||
  275. X!             (mtmp->mhp*4 < mtmp->mhpmax &&
  276. X               mtmp2->mpeaceful && !Conflict) ||
  277. X                 (mtmp2->data->mlet == S_COCKATRICE &&
  278. X                  !resists_ston(mtmp->data)))
  279. X--- 479,491 ----
  280. X               && (perceives(mtmp->data) || !mtmp2->minvis)) ||
  281. X              (mtmp2->data==&mons[PM_GELATINOUS_CUBE] && rn2(10)) ||
  282. X              (max_passive_dmg(mtmp2, mtmp) >= mtmp->mhp) ||
  283. X!             ((mtmp->mhp*4 < mtmp->mhpmax ||
  284. X! #ifdef MULDGN
  285. X!               mtmp2->data->msound == MS_GUARDIAN ||
  286. X!               mtmp2->data->msound == MS_LEADER
  287. X! #endif
  288. X! 
  289. X!               ) &&
  290. X               mtmp2->mpeaceful && !Conflict) ||
  291. X                 (mtmp2->data->mlet == S_COCKATRICE &&
  292. X                  !resists_ston(mtmp->data)))
  293. X***************
  294. X*** 493,499 ****
  295. X              if (stat & MM_AGR_DIED) return 2;
  296. X  
  297. X              if ((stat & MM_HIT) && !(stat & MM_DEF_DIED) &&
  298. X!             rn2(4) && mtmp2->mlstmv != monstermoves) {
  299. X              stat = mattackm(mtmp2, mtmp);    /* return attack */
  300. X              if (stat & MM_DEF_DIED) return 2;
  301. X              }
  302. X--- 499,506 ----
  303. X              if (stat & MM_AGR_DIED) return 2;
  304. X  
  305. X              if ((stat & MM_HIT) && !(stat & MM_DEF_DIED) &&
  306. X!             rn2(4) && mtmp2->mlstmv != monstermoves &&
  307. X!             !onscary(mtmp->mx, mtmp->my, mtmp2)) {
  308. X              stat = mattackm(mtmp2, mtmp);    /* return attack */
  309. X              if (stat & MM_DEF_DIED) return 2;
  310. X              }
  311. X***************
  312. X*** 536,542 ****
  313. X  
  314. X          /* dog eschews cursed objects, but likes dog food */
  315. X          for (obj = level.objects[nx][ny]; obj; obj = obj->nexthere) {
  316. X!             if (obj->cursed && !mtmp->mleashed && uncursedcnt)
  317. X              goto nxti;
  318. X              if (obj->cursed) cursemsg = TRUE;
  319. X              if (has_edog && (otyp = dogfood(mtmp, obj)) < MANFOOD &&
  320. X--- 543,550 ----
  321. X  
  322. X          /* dog eschews cursed objects, but likes dog food */
  323. X          for (obj = level.objects[nx][ny]; obj; obj = obj->nexthere) {
  324. X!             if (obj->cursed && !mtmp->mleashed && uncursedcnt &&
  325. X!             has_edog)
  326. X              goto nxti;
  327. X              if (obj->cursed) cursemsg = TRUE;
  328. X              if (has_edog && (otyp = dogfood(mtmp, obj)) < MANFOOD &&
  329. X***************
  330. X*** 575,584 ****
  331. X  #ifdef WALKIES
  332. X              if (mtmp->mleashed) { /* play it safe */
  333. X                  pline("%s breaks loose of %s leash!",
  334. X!                     Monnam(mtmp),
  335. X!                     humanoid(mtmp->data)
  336. X!                         ? (mtmp->female ? "her" : "his")
  337. X!                         : "its");
  338. X                  m_unleash(mtmp);
  339. X              }
  340. X  #endif
  341. X--- 583,589 ----
  342. X  #ifdef WALKIES
  343. X              if (mtmp->mleashed) { /* play it safe */
  344. X                  pline("%s breaks loose of %s leash!",
  345. X!                       Monnam(mtmp), his[pronoun_gender(mtmp)]);
  346. X                  m_unleash(mtmp);
  347. X              }
  348. X  #endif
  349. X*** /tmp/da08141    Thu Feb 25 22:59:32 1993
  350. X--- src/dokick.c    Thu Feb 25 20:46:57 1993
  351. X***************
  352. X*** 1,4 ****
  353. X! /*    SCCS Id: @(#)dokick.c    3.1    92/10/06    */
  354. X  /* Copyright (c) Izchak Miller, Mike Stephenson, Steve Linhart, 1989. */
  355. X  /* NetHack may be freely redistributed.  See license for details. */
  356. X  
  357. X--- 1,4 ----
  358. X! /*    SCCS Id: @(#)dokick.c    3.1    93/02/18    */
  359. X  /* Copyright (c) Izchak Miller, Mike Stephenson, Steve Linhart, 1989. */
  360. X  /* NetHack may be freely redistributed.  See license for details. */
  361. X  
  362. X***************
  363. X*** 13,19 ****
  364. X               || is_bigfoot(uasmon))
  365. X  #endif
  366. X  
  367. X! static struct rm NEARDATA *maploc;
  368. X  
  369. X  extern boolean notonhead;    /* for long worms */
  370. X  
  371. X--- 13,19 ----
  372. X               || is_bigfoot(uasmon))
  373. X  #endif
  374. X  
  375. X! static NEARDATA struct rm *maploc;
  376. X  
  377. X  extern boolean notonhead;    /* for long worms */
  378. X  
  379. X***************
  380. X*** 25,31 ****
  381. X  static const char *FDECL(gate_str, (XCHAR_P));
  382. X  static void FDECL(drop_to, (coord *, XCHAR_P));
  383. X  
  384. X! static struct obj NEARDATA *kickobj;
  385. X  
  386. X  #define IS_SHOP(x)    (rooms[x].rtype >= SHOPBASE)
  387. X  
  388. X--- 25,31 ----
  389. X  static const char *FDECL(gate_str, (XCHAR_P));
  390. X  static void FDECL(drop_to, (coord *, XCHAR_P));
  391. X  
  392. X! static NEARDATA struct obj *kickobj;
  393. X  
  394. X  #define IS_SHOP(x)    (rooms[x].rtype >= SHOPBASE)
  395. X  
  396. X***************
  397. X*** 48,59 ****
  398. X  
  399. X      /* squeeze some guilt feelings... */
  400. X      if(mon->mtame) {
  401. X! #ifdef SOUNDS
  402. X!         if (rn2(10)) yelp(mon);
  403. X!         else growl(mon); /* give them a moment's worry */
  404. X! #endif
  405. X!         mon->mtame--;
  406. X!         if(!mon->mtame) newsym(mon->mx, mon->my);
  407. X          mon->mflee = mon->mtame ? 1 : 0;
  408. X  #ifdef HISX
  409. X          mon->mfleetim = mon->mfleetim + (dmg ? rnd(dmg) : 1);
  410. X--- 48,54 ----
  411. X  
  412. X      /* squeeze some guilt feelings... */
  413. X      if(mon->mtame) {
  414. X!         abuse_dog(mon);
  415. X          mon->mflee = mon->mtame ? 1 : 0;
  416. X  #ifdef HISX
  417. X          mon->mfleetim = mon->mfleetim + (dmg ? rnd(dmg) : 1);
  418. X***************
  419. X*** 70,76 ****
  420. X          killed(mon);
  421. X          return;
  422. X      }
  423. X!     if(martial() && !bigmonst(mon->data) && !rn2(3) && mon->mcanmove) {
  424. X          /* see if the monster has a place to move into */
  425. X          mdx = mon->mx + u.dx;
  426. X          mdy = mon->my + u.dy;
  427. X--- 65,72 ----
  428. X          killed(mon);
  429. X          return;
  430. X      }
  431. X!     if(martial() && !bigmonst(mon->data) && !rn2(3) && mon->mcanmove
  432. X!        && mon != u.ustuck) {
  433. X          /* see if the monster has a place to move into */
  434. X          mdx = mon->mx + u.dx;
  435. X          mdy = mon->my + u.dy;
  436. X***************
  437. X*** 77,82 ****
  438. X--- 73,79 ----
  439. X          if(goodpos(mdx, mdy, mon, mon->data)) {
  440. X              pline("%s reels from the blow.", Monnam(mon));
  441. X              remove_monster(mon->mx, mon->my);
  442. X+             newsym(mon->mx, mon->my);
  443. X              place_monster(mon, mdx, mdy);
  444. X              newsym(mon->mx, mon->my);
  445. X              set_apparxy(mon);
  446. X***************
  447. X*** 231,238 ****
  448. X                  robbed -= gold->quan;
  449. X                  if (robbed < 0) robbed = 0;
  450. X                  pline("The amount %scovers %s recent losses.",
  451. X!                     !robbed ? "" : "partially ",
  452. X!                     mtmp->female ? "her" : "his");
  453. X                  ESHK(mtmp)->robbed = robbed;
  454. X                  if(!robbed)
  455. X                      make_happy_shk(mtmp, FALSE);
  456. X--- 228,235 ----
  457. X                  robbed -= gold->quan;
  458. X                  if (robbed < 0) robbed = 0;
  459. X                  pline("The amount %scovers %s recent losses.",
  460. X!                       !robbed ? "" : "partially ",
  461. X!                       his[mtmp->female]);
  462. X                  ESHK(mtmp)->robbed = robbed;
  463. X                  if(!robbed)
  464. X                      make_happy_shk(mtmp, FALSE);
  465. X***************
  466. X*** 250,282 ****
  467. X                  verbalize("Thank you for your contribution.");
  468. X              else verbalize("Thanks, scum!");
  469. X          }
  470. X!         else if(is_mercenary(mtmp->data)) {
  471. X!             if(rn2(3)) {
  472. X!             if(mtmp->data == &mons[PM_SOLDIER]) {
  473. X!                if(gold->quan > 100 + (u.ugold + (u.ulevel*rn2(5)))
  474. X!                         /ACURR(A_CHA))
  475. X!                 mtmp->mpeaceful = 1;
  476. X!                 }
  477. X!             if(mtmp->data == &mons[PM_SERGEANT]) {
  478. X!                if(gold->quan > 250 + (u.ugold + (u.ulevel*rn2(5)))
  479. X!                         /ACURR(A_CHA))
  480. X!                 mtmp->mpeaceful = 1;
  481. X!                 }
  482. X!             if(mtmp->data == &mons[PM_LIEUTENANT]) {
  483. X!                if(gold->quan > 500 + (u.ugold + (u.ulevel*rn2(5)))
  484. X!                         /ACURR(A_CHA))
  485. X!                 mtmp->mpeaceful = 1;
  486. X!                 }
  487. X!             if(mtmp->data == &mons[PM_CAPTAIN]) {
  488. X!                if(gold->quan > 750 + (u.ugold + (u.ulevel*rn2(5)))
  489. X!                         /ACURR(A_CHA))
  490. X!                 mtmp->mpeaceful = 1;
  491. X!                 }
  492. X               }
  493. X!              if(mtmp->mpeaceful)
  494. X                  verbalize("That should do.  Now beat it!");
  495. X               else verbalize("That's not enough, coward!");
  496. X!              }
  497. X  
  498. X          dealloc_obj(gold);
  499. X          return(1);
  500. X--- 247,277 ----
  501. X                  verbalize("Thank you for your contribution.");
  502. X              else verbalize("Thanks, scum!");
  503. X          }
  504. X! #ifdef ARMY
  505. X!         else if (is_mercenary(mtmp->data)) {
  506. X!             long goldreqd = 0L;
  507. X! 
  508. X!             if (rn2(3)) {
  509. X!             if (mtmp->data == &mons[PM_SOLDIER])
  510. X!                goldreqd = 100L;
  511. X!             else if (mtmp->data == &mons[PM_SERGEANT])
  512. X!                goldreqd = 250L;
  513. X!             else if (mtmp->data == &mons[PM_LIEUTENANT])
  514. X!                goldreqd = 500L;
  515. X!             else if (mtmp->data == &mons[PM_CAPTAIN])
  516. X!                goldreqd = 750L;
  517. X! 
  518. X!             if (goldreqd) {
  519. X!                if (gold->quan > goldreqd +
  520. X!                 (u.ugold + u.ulevel*rn2(5))/ACURR(A_CHA))
  521. X!                 mtmp->mpeaceful = TRUE;
  522. X!             }
  523. X               }
  524. X!              if (mtmp->mpeaceful)
  525. X                  verbalize("That should do.  Now beat it!");
  526. X               else verbalize("That's not enough, coward!");
  527. X!          }
  528. X! #endif
  529. X  
  530. X          dealloc_obj(gold);
  531. X          return(1);
  532. X***************
  533. X*** 512,518 ****
  534. X  static char *
  535. X  kickstr()
  536. X  {
  537. X!     static char NEARDATA buf[BUFSZ];
  538. X  
  539. X      if (kickobj) Sprintf(buf, "kicking %s", doname(kickobj));
  540. X      else {
  541. X--- 507,513 ----
  542. X  static char *
  543. X  kickstr()
  544. X  {
  545. X!     static NEARDATA char buf[BUFSZ];
  546. X  
  547. X      if (kickobj) Sprintf(buf, "kicking %s", doname(kickobj));
  548. X      else {
  549. X***************
  550. X*** 547,552 ****
  551. X--- 542,549 ----
  552. X  {
  553. X      register int x, y;
  554. X      register int avrg_attrib = (ACURRSTR+ACURR(A_DEX)+ACURR(A_CON))/3;
  555. X+     register struct monst *mtmp;
  556. X+     register s_level *slev = Is_special(&u.uz);
  557. X  
  558. X  #ifdef POLYSELF
  559. X      if(nolimbs(uasmon)) {
  560. X***************
  561. X*** 616,629 ****
  562. X      /* non-doors, doors.               */
  563. X  
  564. X      if(MON_AT(x, y)) {
  565. X          kick_monster(x, y);
  566. X          if((Is_airlevel(&u.uz) || Levitation) && flags.move) {
  567. X              int range;
  568. X-             struct monst *mon;
  569. X  
  570. X!             mon = m_at(x,y);
  571. X!             range = (3*(int)mon->data->cwt) /
  572. X!             ((int)uasmon->cwt + (weight_cap() + inv_weight()));
  573. X              if(range < 1) range = 1;
  574. X              hurtle(-u.dx, -u.dy, range);
  575. X          }
  576. X--- 613,627 ----
  577. X      /* non-doors, doors.               */
  578. X  
  579. X      if(MON_AT(x, y)) {
  580. X+         struct permonst *mdat = m_at(x,y)->data;
  581. X          kick_monster(x, y);
  582. X          if((Is_airlevel(&u.uz) || Levitation) && flags.move) {
  583. X              int range;
  584. X  
  585. X!             range = ((int)uasmon->cwt + (weight_cap() + inv_weight()));
  586. X!             if (range < 1) range = 1; /* divide by zero avoidance */
  587. X!             range = (3*(int)mdat->cwt) / range;
  588. X! 
  589. X              if(range < 1) range = 1;
  590. X              hurtle(-u.dx, -u.dy, range);
  591. X          }
  592. X***************
  593. X*** 811,818 ****
  594. X              exercise(A_STR, FALSE);
  595. X              set_wounded_legs(RIGHT_SIDE, 5 + rnd(5));
  596. X          }
  597. X!         if(Is_airlevel(&u.uz) || Levitation)
  598. X!             hurtle(-u.dx, -u.dy, rn2(2));
  599. X          return(0);
  600. X      }
  601. X  
  602. X--- 809,818 ----
  603. X              exercise(A_STR, FALSE);
  604. X              set_wounded_legs(RIGHT_SIDE, 5 + rnd(5));
  605. X          }
  606. X!         if ((Is_airlevel(&u.uz) || Levitation) && rn2(2)) {
  607. X!             hurtle(-u.dx, -u.dy, 1);
  608. X!             return 1;        /* you moved, so use up a turn */
  609. X!         }
  610. X          return(0);
  611. X      }
  612. X  
  613. X***************
  614. X*** 847,856 ****
  615. X--- 847,886 ----
  616. X          else
  617. X              newsym(x,y);
  618. X          unblock_point(x,y);        /* vision */
  619. X+         if(slev && slev->flags.town)
  620. X+           for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
  621. X+             if((mtmp->data == &mons[PM_WATCHMAN] ||
  622. X+             mtmp->data == &mons[PM_WATCH_CAPTAIN]) &&
  623. X+             couldsee(mtmp->mx, mtmp->my) &&
  624. X+             mtmp->mpeaceful) {
  625. X+             pline("%s yells:", Amonnam(mtmp));
  626. X+             verbalize("Halt, thief!  You're under arrest!");
  627. X+             (void) angry_guards(FALSE);
  628. X+             break;
  629. X+             }
  630. X+           }
  631. X      } else {
  632. X          if (Blind) feel_location(x,y);    /* we know we hit it */
  633. X          exercise(A_STR, TRUE);
  634. X          pline("WHAMMM!!!");
  635. X+         if(slev && slev->flags.town)
  636. X+           for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
  637. X+             if((mtmp->data == &mons[PM_WATCHMAN] ||
  638. X+           mtmp->data == &mons[PM_WATCH_CAPTAIN]) &&
  639. X+               couldsee(mtmp->mx, mtmp->my) &&
  640. X+               mtmp->mpeaceful) {
  641. X+         
  642. X+           pline("%s yells:", Amonnam(mtmp));
  643. X+           if(levl[x][y].looted & D_WARNED) {
  644. X+             verbalize("Halt, vandal!  You're under arrest!");
  645. X+             (void) angry_guards(FALSE);
  646. X+           } else {
  647. X+             verbalize("Hey, stop damaging that door!");
  648. X+             levl[x][y].looted |= D_WARNED;
  649. X+           }
  650. X+           break;
  651. X+             }
  652. X+           }
  653. X      }
  654. X      return(1);
  655. X  }
  656. X***************
  657. X*** 955,960 ****
  658. X--- 985,991 ----
  659. X          if(obj == missile) continue;
  660. X          /* number of objects in the pile */
  661. X          oct += obj->quan;
  662. X+         if(obj == uball || obj == uchain) continue;
  663. X          /* boulders can fall too, but rarely & never due to rocks */
  664. X          if((isrock && obj->otyp == BOULDER) ||
  665. X             rn2(obj->otyp == BOULDER ? 30 : 3)) continue;
  666. X*** /tmp/da08149    Thu Feb 25 10:22:52 1993
  667. X--- src/dothrow.c    Sun Feb 21 16:06:42 1993
  668. X***************
  669. X*** 6,17 ****
  670. X  
  671. X  #include "hack.h"
  672. X  
  673. X- static void FDECL(hitfloor, (struct obj *));
  674. X  static int FDECL(gem_accept, (struct monst *, struct obj *));
  675. X  static int FDECL(throw_gold, (struct obj *));
  676. X  static void FDECL(check_shop_obj, (struct obj *,XCHAR_P,XCHAR_P,BOOLEAN_P));
  677. X  
  678. X! static const char NEARDATA toss_objs[] =
  679. X      { ALLOW_COUNT, GOLD_CLASS, ALL_CLASSES, WEAPON_CLASS, 0 };
  680. X  extern boolean notonhead;    /* for long worms */
  681. X  
  682. X--- 6,16 ----
  683. X  
  684. X  #include "hack.h"
  685. X  
  686. X  static int FDECL(gem_accept, (struct monst *, struct obj *));
  687. X  static int FDECL(throw_gold, (struct obj *));
  688. X  static void FDECL(check_shop_obj, (struct obj *,XCHAR_P,XCHAR_P,BOOLEAN_P));
  689. X  
  690. X! static NEARDATA const char toss_objs[] =
  691. X      { ALLOW_COUNT, GOLD_CLASS, ALL_CLASSES, WEAPON_CLASS, 0 };
  692. X  extern boolean notonhead;    /* for long worms */
  693. X  
  694. X***************
  695. X*** 75,88 ****
  696. X      return(throwit(obj));
  697. X  }
  698. X  
  699. X! static void
  700. X  hitfloor(obj)
  701. X  register struct obj *obj;
  702. X  {
  703. X      if (IS_SOFT(levl[u.ux][u.uy].typ) || u.uinwater) {
  704. X          dropy(obj);
  705. X-         if(*u.ushops)
  706. X-             check_shop_obj(obj, obj->ox, obj->oy, FALSE);
  707. X          return;
  708. X      }
  709. X      if (IS_ALTAR(levl[u.ux][u.uy].typ)) doaltarobj(obj);
  710. X--- 74,85 ----
  711. X      return(throwit(obj));
  712. X  }
  713. X  
  714. X! void
  715. X  hitfloor(obj)
  716. X  register struct obj *obj;
  717. X  {
  718. X      if (IS_SOFT(levl[u.ux][u.uy].typ) || u.uinwater) {
  719. X          dropy(obj);
  720. X          return;
  721. X      }
  722. X      if (IS_ALTAR(levl[u.ux][u.uy].typ)) doaltarobj(obj);
  723. X***************
  724. X*** 99,106 ****
  725. X          if(ship_object(obj, u.ux, u.uy, FALSE)) 
  726. X              return;
  727. X          dropy(obj);
  728. X-         if(*u.ushops)
  729. X-             check_shop_obj(obj, obj->ox, obj->oy, FALSE);
  730. X      }
  731. X  }
  732. X  
  733. X--- 96,101 ----
  734. X***************
  735. X*** 130,136 ****
  736. X      ny = u.uy + dy;
  737. X  
  738. X      if(!isok(nx,ny)) break;
  739. X!     if(IS_ROCK(levl[nx][ny].typ) || closed_door(nx,ny)) {
  740. X          pline("Ouch!");
  741. X          losehp(rnd(2+range), IS_ROCK(levl[nx][ny].typ) ?
  742. X             "bumping to a wall" : "bumping into a door", KILLED_BY);
  743. X--- 125,132 ----
  744. X      ny = u.uy + dy;
  745. X  
  746. X      if(!isok(nx,ny)) break;
  747. X!     if(IS_ROCK(levl[nx][ny].typ) || closed_door(nx,ny) ||
  748. X!        (IS_DOOR(levl[nx][ny].typ) && (levl[nx][ny].doormask & D_ISOPEN))) {
  749. X          pline("Ouch!");
  750. X          losehp(rnd(2+range), IS_ROCK(levl[nx][ny].typ) ?
  751. X             "bumping to a wall" : "bumping into a door", KILLED_BY);
  752. X***************
  753. X*** 215,233 ****
  754. X                 Hallucination || Fumbling);
  755. X      int do_death = 0;
  756. X  
  757. X!     if (obj->cursed && (u.dx || u.dy) && !rn2(7)) {
  758. X          boolean slipok = TRUE;
  759. X          if ((obj->oclass == WEAPON_CLASS || obj->oclass == GEM_CLASS)
  760. X          && uwep && (objects[obj->otyp].w_propellor > 0) &&
  761. X          (objects[obj->otyp].w_propellor ==
  762. X                                               -objects[uwep->otyp].w_propellor))
  763. X!         pline("The %s misfires!", xname(obj));
  764. X          else {
  765. X!         /* only slip if it's meant to be thrown */
  766. X!         if((obj->otyp >= DART && obj->otyp <= JAVELIN) ||
  767. X             (obj->otyp >= DAGGER && obj->otyp <= CRYSKNIFE &&
  768. X              obj->otyp != ATHAME) || obj->otyp == WAR_HAMMER)
  769. X!             pline("The %s slips as you throw it!", xname(obj));
  770. X          else slipok = FALSE;
  771. X          }
  772. X          if (slipok) {
  773. X--- 211,230 ----
  774. X                 Hallucination || Fumbling);
  775. X      int do_death = 0;
  776. X  
  777. X!     if ((obj->cursed || obj->greased) && (u.dx || u.dy) && !rn2(7)) {
  778. X          boolean slipok = TRUE;
  779. X          if ((obj->oclass == WEAPON_CLASS || obj->oclass == GEM_CLASS)
  780. X          && uwep && (objects[obj->otyp].w_propellor > 0) &&
  781. X          (objects[obj->otyp].w_propellor ==
  782. X                                               -objects[uwep->otyp].w_propellor))
  783. X!         pline("%s misfires!", The(xname(obj)));
  784. X          else {
  785. X!         /* only slip if it's greased or meant to be thrown */
  786. X!         if(obj->greased ||
  787. X!            (obj->otyp >= DART && obj->otyp <= JAVELIN) ||
  788. X             (obj->otyp >= DAGGER && obj->otyp <= CRYSKNIFE &&
  789. X              obj->otyp != ATHAME) || obj->otyp == WAR_HAMMER)
  790. X!             pline("%s slips as you throw it!", The(xname(obj)));
  791. X          else slipok = FALSE;
  792. X          }
  793. X          if (slipok) {
  794. X***************
  795. X*** 284,291 ****
  796. X          if (!breaks(obj, TRUE)) {
  797. X              if(!ship_object(obj, u.ux, u.uy, FALSE)) {
  798. X              dropy(obj);
  799. X-             if(*u.ushops)
  800. X-                 check_shop_obj(obj, obj->ox, obj->oy, FALSE);
  801. X              }
  802. X          }
  803. X          if (do_death == STONING)
  804. X--- 281,286 ----
  805. X***************
  806. X*** 372,386 ****
  807. X  
  808. X          if (obj->oartifact == ART_MJOLLNIR && pl_character[0] == 'V') {
  809. X              /* we must be wearing Gauntlets of Power to get here */
  810. X-             int x = bhitpos.x - u.dx, y = bhitpos.y - u.dy;
  811. X  
  812. X!             tmp_at(DISP_FLASH, obj_glyph);
  813. X!             while(x != u.ux || y != u.uy) {
  814. X!             tmp_at(x, y);
  815. X!             delay_output();
  816. X!             x -= u.dx; y -= u.dy;
  817. X              }
  818. X-             tmp_at(DISP_END, 0);
  819. X  
  820. X              if(!impaired) {
  821. X              pline("%s returns to your hand!", The(xname(obj)));
  822. X--- 367,385 ----
  823. X  
  824. X          if (obj->oartifact == ART_MJOLLNIR && pl_character[0] == 'V') {
  825. X              /* we must be wearing Gauntlets of Power to get here */
  826. X  
  827. X!             /* might already be our location (bounced off a wall) */
  828. X!             if (bhitpos.x != u.ux || bhitpos.y != u.uy) {
  829. X!             int x = bhitpos.x - u.dx, y = bhitpos.y - u.dy;
  830. X! 
  831. X!             tmp_at(DISP_FLASH, obj_glyph);
  832. X!             while(x != u.ux || y != u.uy) {
  833. X!                 tmp_at(x, y);
  834. X!                 delay_output();
  835. X!                 x -= u.dx; y -= u.dy;
  836. X!             }
  837. X!             tmp_at(DISP_END, 0);
  838. X              }
  839. X  
  840. X              if(!impaired) {
  841. X              pline("%s returns to your hand!", The(xname(obj)));
  842. X***************
  843. X*** 603,613 ****
  844. X      boolean is_buddy = sgn(mon->data->maligntyp) == sgn(u.ualign.type);
  845. X      boolean is_gem = objects[obj->otyp].oc_material == GEMSTONE;
  846. X      int ret = 0;
  847. X!     static const char NEARDATA nogood[] = " is not interested in your junk.";
  848. X!     static const char NEARDATA acceptgift[] = " accepts your gift.";
  849. X!     static const char NEARDATA maybeluck[] = " hesitatingly";
  850. X!     static const char NEARDATA noluck[] = " graciously";
  851. X!     static const char NEARDATA addluck[] = " gratefully";
  852. X  
  853. X      Strcpy(buf,Monnam(mon));
  854. X  
  855. X--- 602,612 ----
  856. X      boolean is_buddy = sgn(mon->data->maligntyp) == sgn(u.ualign.type);
  857. X      boolean is_gem = objects[obj->otyp].oc_material == GEMSTONE;
  858. X      int ret = 0;
  859. X!     static NEARDATA const char nogood[] = " is not interested in your junk.";
  860. X!     static NEARDATA const char acceptgift[] = " accepts your gift.";
  861. X!     static NEARDATA const char maybeluck[] = " hesitatingly";
  862. X!     static NEARDATA const char noluck[] = " graciously";
  863. X!     static NEARDATA const char addluck[] = " gratefully";
  864. X  
  865. X      Strcpy(buf,Monnam(mon));
  866. X  
  867. X*** /tmp/da08165    Thu Feb 25 10:22:57 1993
  868. X--- src/dungeon.c    Thu Feb 18 11:17:51 1993
  869. X***************
  870. X*** 639,645 ****
  871. X  
  872. X          if (i) {    /* set depth */
  873. X          branch *br;
  874. X!         xchar from_depth;
  875. X          boolean from_up;
  876. X  
  877. X          br = add_branch(i, dungeons[i].entry_lev, &pd);
  878. X--- 639,645 ----
  879. X  
  880. X          if (i) {    /* set depth */
  881. X          branch *br;
  882. X!         schar from_depth;
  883. X          boolean from_up;
  884. X  
  885. X          br = add_branch(i, dungeons[i].entry_lev, &pd);
  886. X***************
  887. X*** 770,776 ****
  888. X          assign_level(&knox_level, &x->dlevel);
  889. X          /*
  890. X           * Kludge to allow floating Knox entrance.  We specify a floating
  891. X!          * entrance by the fact that it's entrance (end1) has a bogus dnum,
  892. X           * namely n_dgns.
  893. X           */
  894. X          for (br = branches; br; br = br->next)
  895. X--- 770,776 ----
  896. X          assign_level(&knox_level, &x->dlevel);
  897. X          /*
  898. X           * Kludge to allow floating Knox entrance.  We specify a floating
  899. X!          * entrance by the fact that its entrance (end1) has a bogus dnum,
  900. X           * namely n_dgns.
  901. X           */
  902. X          for (br = branches; br; br = br->next)
  903. X***************
  904. X*** 844,850 ****
  905. X       */
  906. X      register int i;
  907. X      d_level tmp;
  908. X!     register xchar ret = 0;
  909. X  
  910. X      for(i = 0; i < n_dgns; i++) {
  911. X          if((tmp.dlevel = dungeons[i].dunlev_ureached) == 0) continue;
  912. X--- 844,850 ----
  913. X       */
  914. X      register int i;
  915. X      d_level tmp;
  916. X!     register schar ret = 0;
  917. X  
  918. X      for(i = 0; i < n_dgns; i++) {
  919. X          if((tmp.dlevel = dungeons[i].dunlev_ureached) == 0) continue;
  920. X***************
  921. X*** 853,859 ****
  922. X          tmp.dnum = i;
  923. X          if(depth(&tmp) > ret) ret = depth(&tmp);
  924. X      }
  925. X!     return(ret);
  926. X  }
  927. X  
  928. X  /* return a bookkeeping level number for purpose of comparisons and
  929. X--- 853,859 ----
  930. X          tmp.dnum = i;
  931. X          if(depth(&tmp) > ret) ret = depth(&tmp);
  932. X      }
  933. X!     return((xchar) ret);
  934. X  }
  935. X  
  936. X  /* return a bookkeeping level number for purpose of comparisons and
  937. X***************
  938. X*** 908,914 ****
  939. X  
  940. X  /* returns the depth of a level, in floors below the surface    */
  941. X  /* (note levels in different dungeons can have the same depth).    */
  942. X! xchar
  943. X  depth(lev)
  944. X  d_level    *lev;
  945. X  {
  946. X--- 908,914 ----
  947. X  
  948. X  /* returns the depth of a level, in floors below the surface    */
  949. X  /* (note levels in different dungeons can have the same depth).    */
  950. X! schar
  951. X  depth(lev)
  952. X  d_level    *lev;
  953. X  {
  954. X***************
  955. X*** 1110,1116 ****
  956. X      xchar dgn = u.uz.dnum;
  957. X  
  958. X      if (levnum <= 0) {
  959. X!         impossible("get_level:  levnum = %d\n", levnum);
  960. X          levnum = u.uz.dlevel;
  961. X      } else if (levnum > dungeons[dgn].depth_start
  962. X                  + dungeons[dgn].num_dunlevs - 1) {
  963. X--- 1110,1116 ----
  964. X      xchar dgn = u.uz.dnum;
  965. X  
  966. X      if (levnum <= 0) {
  967. X!         /* can only currently happen in endgame */
  968. X          levnum = u.uz.dlevel;
  969. X      } else if (levnum > dungeons[dgn].depth_start
  970. X                  + dungeons[dgn].num_dunlevs - 1) {
  971. X***************
  972. X*** 1308,1319 ****
  973. X  level_difficulty()
  974. X  {
  975. X      if (In_endgame(&u.uz))
  976. X!         return(depth(&sanctum_level) + u.ulevel/2);
  977. X      else
  978. X          if (u.uhave.amulet)
  979. X              return(deepest_lev_reached(FALSE));
  980. X          else
  981. X!             return(depth(&u.uz));
  982. X  }
  983. X  
  984. X  
  985. X--- 1308,1319 ----
  986. X  level_difficulty()
  987. X  {
  988. X      if (In_endgame(&u.uz))
  989. X!         return((xchar) depth(&sanctum_level) + u.ulevel/2);
  990. X      else
  991. X          if (u.uhave.amulet)
  992. X              return(deepest_lev_reached(FALSE));
  993. X          else
  994. X!             return((xchar) depth(&u.uz));
  995. X  }
  996. X  
  997. X  
  998. X*** /tmp/da08173    Thu Feb 25 10:23:00 1993
  999. X--- src/eat.c    Tue Feb 23 11:25:49 1993
  1000. X***************
  1001. X*** 1,4 ****
  1002. X! /*    SCCS Id: @(#)eat.c    3.1    92/12/06    */
  1003. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1004. X  /* NetHack may be freely redistributed.  See license for details. */
  1005. X  
  1006. X--- 1,4 ----
  1007. X! /*    SCCS Id: @(#)eat.c    3.1    93/02/19    */
  1008. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1009. X  /* NetHack may be freely redistributed.  See license for details. */
  1010. X  
  1011. X***************
  1012. X*** 74,91 ****
  1013. X  
  1014. X  #ifndef OVLB
  1015. X  
  1016. X! STATIC_DCL const char NEARDATA comestibles[];
  1017. X  #ifdef POLYSELF
  1018. X! STATIC_OVL const char NEARDATA allobj[];
  1019. X  #endif /* POLYSELF */
  1020. X  
  1021. X  #else
  1022. X  
  1023. X! STATIC_OVL const char NEARDATA comestibles[] = { FOOD_CLASS, 0 };
  1024. X  
  1025. X  #ifdef POLYSELF
  1026. X  /* Gold must come first for getobj(). */
  1027. X! STATIC_OVL const char NEARDATA allobj[] = {
  1028. X      GOLD_CLASS, WEAPON_CLASS, ARMOR_CLASS, POTION_CLASS, SCROLL_CLASS,
  1029. X      WAND_CLASS, RING_CLASS, AMULET_CLASS, FOOD_CLASS, TOOL_CLASS,
  1030. X      GEM_CLASS, ROCK_CLASS, BALL_CLASS, CHAIN_CLASS, SPBOOK_CLASS, 0 };
  1031. X--- 74,91 ----
  1032. X  
  1033. X  #ifndef OVLB
  1034. X  
  1035. X! STATIC_DCL NEARDATA const char comestibles[];
  1036. X  #ifdef POLYSELF
  1037. X! STATIC_OVL NEARDATA const char allobj[];
  1038. X  #endif /* POLYSELF */
  1039. X  
  1040. X  #else
  1041. X  
  1042. X! STATIC_OVL NEARDATA const char comestibles[] = { FOOD_CLASS, 0 };
  1043. X  
  1044. X  #ifdef POLYSELF
  1045. X  /* Gold must come first for getobj(). */
  1046. X! STATIC_OVL NEARDATA const char allobj[] = {
  1047. X      GOLD_CLASS, WEAPON_CLASS, ARMOR_CLASS, POTION_CLASS, SCROLL_CLASS,
  1048. X      WAND_CLASS, RING_CLASS, AMULET_CLASS, FOOD_CLASS, TOOL_CLASS,
  1049. X      GEM_CLASS, ROCK_CLASS, BALL_CLASS, CHAIN_CLASS, SPBOOK_CLASS, 0 };
  1050. X***************
  1051. X*** 110,116 ****
  1052. X  #ifdef OVLB
  1053. X  
  1054. X  void
  1055. X! init_uhunger(){
  1056. X      u.uhunger = 900;
  1057. X      u.uhs = NOT_HUNGRY;
  1058. X  }
  1059. X--- 110,117 ----
  1060. X  #ifdef OVLB
  1061. X  
  1062. X  void
  1063. X! init_uhunger()
  1064. X! {
  1065. X      u.uhunger = 900;
  1066. X      u.uhs = NOT_HUNGRY;
  1067. X  }
  1068. X***************
  1069. X*** 126,137 ****
  1070. X  };
  1071. X  #define    TTSZ    SIZE(tintxts)
  1072. X  
  1073. X! static struct {
  1074. X      struct    obj *tin;
  1075. X      int    usedtime, reqtime;
  1076. X! } NEARDATA tin;
  1077. X  
  1078. X! static struct {
  1079. X      struct    obj *piece;    /* the thing being eaten, or last thing that
  1080. X                   * was partially eaten, unless that thing was
  1081. X                   * a tin, which uses the tin structure above */
  1082. X--- 127,138 ----
  1083. X  };
  1084. X  #define    TTSZ    SIZE(tintxts)
  1085. X  
  1086. X! static NEARDATA struct {
  1087. X      struct    obj *tin;
  1088. X      int    usedtime, reqtime;
  1089. X! } tin;
  1090. X  
  1091. X! static NEARDATA struct {
  1092. X      struct    obj *piece;    /* the thing being eaten, or last thing that
  1093. X                   * was partially eaten, unless that thing was
  1094. X                   * a tin, which uses the tin structure above */
  1095. X***************
  1096. X*** 142,152 ****
  1097. X      Bitfield(fullwarn,1);    /* have warned about being full */
  1098. X      Bitfield(eating,1);    /* victual currently being eaten */
  1099. X      Bitfield(doreset,1);    /* stop eating at end of turn */
  1100. X! } NEARDATA victual;
  1101. X  
  1102. X  STATIC_PTR
  1103. X  int
  1104. X! eatmdone() {        /* called after mimicing is over */
  1105. X      u.usym =
  1106. X  #ifdef POLYSELF
  1107. X          u.mtimedone ? uasmon->mlet :
  1108. X--- 143,154 ----
  1109. X      Bitfield(fullwarn,1);    /* have warned about being full */
  1110. X      Bitfield(eating,1);    /* victual currently being eaten */
  1111. X      Bitfield(doreset,1);    /* stop eating at end of turn */
  1112. X! } victual;
  1113. X  
  1114. X  STATIC_PTR
  1115. X  int
  1116. X! eatmdone()        /* called after mimicing is over */
  1117. X! {
  1118. X      u.usym =
  1119. X  #ifdef POLYSELF
  1120. X          u.mtimedone ? uasmon->mlet :
  1121. X***************
  1122. X*** 172,177 ****
  1123. X--- 174,181 ----
  1124. X      if (pl_character[0] == 'K' && u.ualign.type == A_LAWFUL)
  1125. X          u.ualign.record--;    /* gluttony is unchivalrous */
  1126. X  
  1127. X+     exercise(A_CON, FALSE);
  1128. X+ 
  1129. X      if (!rn2(20)) {
  1130. X          You("stuff yourself and then vomit voluminously.");
  1131. X          morehungry(1000);    /* you just got *very* sick! */
  1132. X***************
  1133. X*** 206,212 ****
  1134. X  }
  1135. X  
  1136. X  static void
  1137. X! recalc_wt() {    /* modify object wt. depending on time spent consuming it */
  1138. X      register struct obj *piece = victual.piece;
  1139. X  
  1140. X  #ifdef DEBUG
  1141. X--- 210,217 ----
  1142. X  }
  1143. X  
  1144. X  static void
  1145. X! recalc_wt()    /* modify object wt. depending on time spent consuming it */
  1146. X! {
  1147. X      register struct obj *piece = victual.piece;
  1148. X  
  1149. X  #ifdef DEBUG
  1150. X***************
  1151. X*** 223,230 ****
  1152. X  }
  1153. X  
  1154. X  void
  1155. X! reset_eat() {        /* called when eating interrupted by an event */
  1156. X! 
  1157. X      /* we only set a flag here - the actual reset process is done after
  1158. X       * the round is spent eating.
  1159. X       */
  1160. X--- 228,235 ----
  1161. X  }
  1162. X  
  1163. X  void
  1164. X! reset_eat()        /* called when eating interrupted by an event */
  1165. X! {
  1166. X      /* we only set a flag here - the actual reset process is done after
  1167. X       * the round is spent eating.
  1168. X       */
  1169. X***************
  1170. X*** 276,286 ****
  1171. X  
  1172. X      if (!otmp->oeaten) {
  1173. X          if(((!carried(otmp) && costly_spot(otmp->ox, otmp->oy) &&
  1174. X!          saleable(rooms[*u.ushops-ROOMOFFSET].rtype-SHOPBASE, otmp))
  1175. X           || otmp->unpaid) &&
  1176. X           (otmp->otyp == CORPSE || objects[otmp->otyp].oc_delay > 1)) {
  1177. X          /* create a dummy duplicate to put on bill */
  1178. X!         You("bite it, you bought it!");
  1179. X          bill_dummy_object(otmp);
  1180. X          }
  1181. X          otmp->oeaten = (otmp->otyp == CORPSE ?
  1182. X--- 281,291 ----
  1183. X  
  1184. X      if (!otmp->oeaten) {
  1185. X          if(((!carried(otmp) && costly_spot(otmp->ox, otmp->oy) &&
  1186. X!          !otmp->no_charge)
  1187. X           || otmp->unpaid) &&
  1188. X           (otmp->otyp == CORPSE || objects[otmp->otyp].oc_delay > 1)) {
  1189. X          /* create a dummy duplicate to put on bill */
  1190. X!         verbalize("You bite it, you bought it!");
  1191. X          bill_dummy_object(otmp);
  1192. X          }
  1193. X          otmp->oeaten = (otmp->otyp == CORPSE ?
  1194. X***************
  1195. X*** 331,337 ****
  1196. X  
  1197. X  STATIC_PTR
  1198. X  int
  1199. X! eatfood() {        /* called each move during eating process */
  1200. X      if(!carried(victual.piece) && !obj_here(victual.piece, u.ux, u.uy)) {
  1201. X          /* maybe it was stolen? */
  1202. X          do_reset_eat();
  1203. X--- 336,343 ----
  1204. X  
  1205. X  STATIC_PTR
  1206. X  int
  1207. X! eatfood()        /* called each move during eating process */
  1208. X! {
  1209. X      if(!carried(victual.piece) && !obj_here(victual.piece, u.ux, u.uy)) {
  1210. X          /* maybe it was stolen? */
  1211. X          do_reset_eat();
  1212. X***************
  1213. X*** 377,382 ****
  1214. X--- 383,393 ----
  1215. X  register int pm;
  1216. X  {
  1217. X      if ((pl_character[0]=='E') ? is_elf(&mons[pm]) : is_human(&mons[pm])) {
  1218. X+ #ifdef POLYSELF
  1219. X+         if (uasmon != &playermon) {
  1220. X+             You("have a bad feeling deep inside.");
  1221. X+         }
  1222. X+ #endif /* POLYSELF */
  1223. X          You("cannibal!  You will regret this!");
  1224. X          Aggravate_monster |= FROMOUTSIDE;
  1225. X      }
  1226. X***************
  1227. X*** 589,595 ****
  1228. X          debugpline("Trying to give fire resistance");
  1229. X  #endif
  1230. X          if(!(HFire_resistance & FROMOUTSIDE)) {
  1231. X!             You("feel a momentary chill.");
  1232. X              HFire_resistance |= FROMOUTSIDE;
  1233. X          }
  1234. X          break;
  1235. X--- 600,607 ----
  1236. X          debugpline("Trying to give fire resistance");
  1237. X  #endif
  1238. X          if(!(HFire_resistance & FROMOUTSIDE)) {
  1239. X!             You(Hallucination ? "be chillin'." :
  1240. X!                 "feel a momentary chill.");
  1241. X              HFire_resistance |= FROMOUTSIDE;
  1242. X          }
  1243. X          break;
  1244. X***************
  1245. X*** 616,622 ****
  1246. X          debugpline("Trying to give disintegration resistance");
  1247. X  #endif
  1248. X          if(!(HDisint_resistance & FROMOUTSIDE)) {
  1249. X!             You("feel very firm.");
  1250. X              HDisint_resistance |= FROMOUTSIDE;
  1251. X          }
  1252. X          break;
  1253. X--- 628,636 ----
  1254. X          debugpline("Trying to give disintegration resistance");
  1255. X  #endif
  1256. X          if(!(HDisint_resistance & FROMOUTSIDE)) {
  1257. X!             You(Hallucination ?
  1258. X!                 "feel totally together, man." :
  1259. X!                 "feel very firm.");
  1260. X              HDisint_resistance |= FROMOUTSIDE;
  1261. X          }
  1262. X          break;
  1263. X***************
  1264. X*** 625,631 ****
  1265. X          debugpline("Trying to give shock resistance");
  1266. X  #endif
  1267. X          if(!(HShock_resistance & FROMOUTSIDE)) {
  1268. X!             Your("health currently feels amplified!");
  1269. X              HShock_resistance |= FROMOUTSIDE;
  1270. X          }
  1271. X          break;
  1272. X--- 639,648 ----
  1273. X          debugpline("Trying to give shock resistance");
  1274. X  #endif
  1275. X          if(!(HShock_resistance & FROMOUTSIDE)) {
  1276. X!             if (Hallucination)
  1277. X!                 You("feel grounded in reality.");
  1278. X!             else
  1279. X!                 Your("health currently feels amplified!");
  1280. X              HShock_resistance |= FROMOUTSIDE;
  1281. X          }
  1282. X          break;
  1283. X***************
  1284. X*** 643,649 ****
  1285. X          debugpline("Trying to give teleport");
  1286. X  #endif
  1287. X          if(!(HTeleportation & FROMOUTSIDE)) {
  1288. X!             You("feel very jumpy.");
  1289. X              HTeleportation |= FROMOUTSIDE;
  1290. X          }
  1291. X          break;
  1292. X--- 660,667 ----
  1293. X          debugpline("Trying to give teleport");
  1294. X  #endif
  1295. X          if(!(HTeleportation & FROMOUTSIDE)) {
  1296. X!             You(Hallucination ? "feel diffuse." :
  1297. X!                 "feel very jumpy.");
  1298. X              HTeleportation |= FROMOUTSIDE;
  1299. X          }
  1300. X          break;
  1301. X***************
  1302. X*** 652,658 ****
  1303. X          debugpline("Trying to give teleport control");
  1304. X  #endif
  1305. X          if(!(HTeleport_control & FROMOUTSIDE)) {
  1306. X!             You("feel in control of yourself.");
  1307. X              HTeleport_control |= FROMOUTSIDE;
  1308. X          }
  1309. X          break;
  1310. X--- 670,678 ----
  1311. X          debugpline("Trying to give teleport control");
  1312. X  #endif
  1313. X          if(!(HTeleport_control & FROMOUTSIDE)) {
  1314. X!             You(Hallucination ?
  1315. X!                 "feel centered in your personal space." :
  1316. X!                 "feel in control of yourself.");
  1317. X              HTeleport_control |= FROMOUTSIDE;
  1318. X          }
  1319. X          break;
  1320. X***************
  1321. X*** 661,668 ****
  1322. X          debugpline("Trying to give telepathy");
  1323. X  #endif
  1324. X          if(!(HTelepat & FROMOUTSIDE)) {
  1325. X!             You("feel a %s mental acuity.",
  1326. X!                 Hallucination ? "normal" : "strange");
  1327. X              HTelepat |= FROMOUTSIDE;
  1328. X              /* If blind, make sure monsters show up. */
  1329. X              if (Blind) see_monsters();
  1330. X--- 681,689 ----
  1331. X          debugpline("Trying to give telepathy");
  1332. X  #endif
  1333. X          if(!(HTelepat & FROMOUTSIDE)) {
  1334. X!             You(Hallucination ?
  1335. X!                 "feel in touch with the cosmos." :
  1336. X!                 "feel a strange mental acuity.");
  1337. X              HTelepat |= FROMOUTSIDE;
  1338. X              /* If blind, make sure monsters show up. */
  1339. X              if (Blind) see_monsters();
  1340. X***************
  1341. X*** 732,744 ****
  1342. X          case PM_SMALL_MIMIC:
  1343. X          tmp += 20;
  1344. X          if(u.usym == S_HUMAN) {
  1345. X!             You("cannot resist the temptation to mimic a pile of gold.");
  1346. X              nomul(-tmp);
  1347. X              afternmv = eatmdone;
  1348. X              if (pl_character[0]=='E')
  1349. X!             nomovemsg = "You now again prefer mimicking an elf.";
  1350. X              else
  1351. X!             nomovemsg = "You now again prefer mimicking a human.";
  1352. X              u.usym = 0; /* hack! no monster sym 0; use for gold */
  1353. X              newsym(u.ux,u.uy);
  1354. X          }
  1355. X--- 753,765 ----
  1356. X          case PM_SMALL_MIMIC:
  1357. X          tmp += 20;
  1358. X          if(u.usym == S_HUMAN) {
  1359. X!             You("can't resist the temptation to mimic a pile of gold.");
  1360. X              nomul(-tmp);
  1361. X              afternmv = eatmdone;
  1362. X              if (pl_character[0]=='E')
  1363. X!             nomovemsg = "You now prefer mimicking an elf again.";
  1364. X              else
  1365. X!             nomovemsg = "You now prefer mimicking a human again.";
  1366. X              u.usym = 0; /* hack! no monster sym 0; use for gold */
  1367. X              newsym(u.ux,u.uy);
  1368. X          }
  1369. X***************
  1370. X*** 869,874 ****
  1371. X--- 890,897 ----
  1372. X          r = tin.tin->cursed ? 4 :        /* Always rotten if cursed */
  1373. X              (tin.tin->spe == -1) ? 5 :    /* "homemade" if player made */
  1374. X              rn2(TTSZ-1);        /* else take your pick */
  1375. X+         if (tin.tin->spe == -1 && !tin.tin->blessed && !rn2(7))
  1376. X+         r = 4;                /* some homemade tins go bad */
  1377. X          pline("It smells like %s.", makeplural(
  1378. X            Hallucination ? rndmonnam() : mons[tin.tin->corpsenm].mname));
  1379. X          if (yn("Eat it?") == 'n') {
  1380. X***************
  1381. X*** 876,881 ****
  1382. X--- 899,908 ----
  1383. X          if (flags.verbose) You("discard the open tin.");
  1384. X          goto use_me;
  1385. X          }
  1386. X+         /* in case stop_occupation() was called on previous meal */
  1387. X+         victual.piece = (struct obj *)0;
  1388. X+         victual.fullwarn = victual.eating = victual.doreset = FALSE;
  1389. X+ 
  1390. X          You("consume %s %s.", tintxts[r].txt,
  1391. X              mons[tin.tin->corpsenm].mname);
  1392. X          tin.tin->dknown = tin.tin->known = TRUE;
  1393. X***************
  1394. X*** 886,894 ****
  1395. X          else lesshungry(tintxts[r].nut);
  1396. X  
  1397. X          if(r == 0) {            /* Deep Fried */
  1398. X!         Glib = rnd(15);
  1399. X          pline("Eating deep fried food made your %s very slippery.",
  1400. X!             makeplural(body_part(FINGER)));
  1401. X          }
  1402. X      } else {
  1403. X          if (tin.tin->cursed)
  1404. X--- 913,922 ----
  1405. X          else lesshungry(tintxts[r].nut);
  1406. X  
  1407. X          if(r == 0) {            /* Deep Fried */
  1408. X!             /* Assume !Glib, because you can't open tins when Glib. */
  1409. X!         Glib += rnd(15);
  1410. X          pline("Eating deep fried food made your %s very slippery.",
  1411. X!               makeplural(body_part(FINGER)));
  1412. X          }
  1413. X      } else {
  1414. X          if (tin.tin->cursed)
  1415. X***************
  1416. X*** 958,964 ****
  1417. X  no_opener:
  1418. X          pline("It is not so easy to open this tin.");
  1419. X          if(Glib) {
  1420. X!             pline("The tin slips out of your hands.");
  1421. X              if(otmp->quan > 1L) {
  1422. X                  register struct obj *obj;
  1423. X                  obj = splitobj(otmp, 1L);
  1424. X--- 986,993 ----
  1425. X  no_opener:
  1426. X          pline("It is not so easy to open this tin.");
  1427. X          if(Glib) {
  1428. X!             pline("The tin slips from your %s.",
  1429. X!                   makeplural(body_part(FINGER)));
  1430. X              if(otmp->quan > 1L) {
  1431. X                  register struct obj *obj;
  1432. X                  obj = splitobj(otmp, 1L);
  1433. X***************
  1434. X*** 978,984 ****
  1435. X  }
  1436. X  
  1437. X  int
  1438. X! Hear_again() {        /* called when waking up after fainting */
  1439. X      flags.soundok = 1;
  1440. X      return 0;
  1441. X  }
  1442. X--- 1007,1014 ----
  1443. X  }
  1444. X  
  1445. X  int
  1446. X! Hear_again()        /* called when waking up after fainting */
  1447. X! {
  1448. X      flags.soundok = 1;
  1449. X      return 0;
  1450. X  }
  1451. X***************
  1452. X*** 1005,1011 ****
  1453. X          make_blinded((long)d(2,10),FALSE);
  1454. X      } else if(!rn2(3)) {
  1455. X          if(Blind)
  1456. X!           pline("The world spins and you slap against the floor.");
  1457. X          else
  1458. X            pline("The world spins and goes dark.");
  1459. X          flags.soundok = 0;
  1460. X--- 1035,1043 ----
  1461. X          make_blinded((long)d(2,10),FALSE);
  1462. X      } else if(!rn2(3)) {
  1463. X          if(Blind)
  1464. X!           pline("The world spins and you %s.",
  1465. X!             Levitation ? "collapse in place" :
  1466. X!             "slap against the floor");
  1467. X          else
  1468. X            pline("The world spins and goes dark.");
  1469. X          flags.soundok = 0;
  1470. X***************
  1471. X*** 1081,1090 ****
  1472. X      }
  1473. X      if(!tp && otmp->corpsenm != PM_LIZARD && (otmp->orotten || !rn2(7))) {
  1474. X  #ifdef POLYSELF
  1475. X!         if(rottenfood(otmp)) {
  1476. X  #else
  1477. X!         if(rottenfood()) {
  1478. X  #endif
  1479. X          otmp->orotten = TRUE;
  1480. X          (void)touchfood(otmp);
  1481. X          return(1);
  1482. X--- 1113,1123 ----
  1483. X      }
  1484. X      if(!tp && otmp->corpsenm != PM_LIZARD && (otmp->orotten || !rn2(7))) {
  1485. X  #ifdef POLYSELF
  1486. X!         if(rottenfood(otmp))
  1487. X  #else
  1488. X!         if(rottenfood())
  1489. X  #endif
  1490. X+         {
  1491. X          otmp->orotten = TRUE;
  1492. X          (void)touchfood(otmp);
  1493. X          return(1);
  1494. X***************
  1495. X*** 1183,1189 ****
  1496. X  #ifdef TUTTI_FRUTTI
  1497. X          if (otmp->otyp==SLIME_MOLD && !otmp->cursed
  1498. X              && otmp->spe == current_fruit)
  1499. X!             pline("My, that was a yummy %s!", singular(otmp, xname));
  1500. X          else
  1501. X  #endif
  1502. X  #ifdef UNIX
  1503. X--- 1216,1224 ----
  1504. X  #ifdef TUTTI_FRUTTI
  1505. X          if (otmp->otyp==SLIME_MOLD && !otmp->cursed
  1506. X              && otmp->spe == current_fruit)
  1507. X!             pline("My, that was a %s %s!",
  1508. X!               Hallucination ? "primo" : "yummy",
  1509. X!               singular(otmp, xname));
  1510. X          else
  1511. X  #endif
  1512. X  #ifdef UNIX
  1513. X***************
  1514. X*** 1200,1209 ****
  1515. X              }
  1516. X          } else
  1517. X  #endif
  1518. X!             pline("This %s is %s!", singular(otmp, xname),
  1519. X!               otmp->cursed ? (Hallucination ? "grody" : "terrible"):
  1520. X!               Hallucination ? "gnarly" :
  1521. X!             (otmp->otyp==CRAM_RATION ? "bland" : "delicious"));
  1522. X          break;
  1523. X      }
  1524. X  }
  1525. X--- 1235,1244 ----
  1526. X              }
  1527. X          } else
  1528. X  #endif
  1529. X!             pline("This %s is %s", singular(otmp, xname),
  1530. X!               otmp->cursed ? (Hallucination ? "grody!" : "terrible!") :
  1531. X!               otmp->otyp == CRAM_RATION ? "bland." :
  1532. X!               Hallucination ? "gnarly!" : "delicious!");
  1533. X          break;
  1534. X      }
  1535. X  }
  1536. X***************
  1537. X*** 1488,1497 ****
  1538. X          (otmp->orotten || !rn2(7))))) {
  1539. X  
  1540. X  #ifdef POLYSELF
  1541. X!         if(rottenfood(otmp)) {
  1542. X  #else
  1543. X!         if(rottenfood()) {
  1544. X  #endif
  1545. X              otmp->orotten = TRUE;
  1546. X              return(1);
  1547. X          }
  1548. X--- 1523,1533 ----
  1549. X          (otmp->orotten || !rn2(7))))) {
  1550. X  
  1551. X  #ifdef POLYSELF
  1552. X!         if(rottenfood(otmp))
  1553. X  #else
  1554. X!         if(rottenfood())
  1555. X  #endif
  1556. X+         {
  1557. X              otmp->orotten = TRUE;
  1558. X              return(1);
  1559. X          }
  1560. X***************
  1561. X*** 1642,1648 ****
  1562. X              victual.fullwarn = TRUE;
  1563. X              if (victual.canchoke &&
  1564. X              /* a one-gulp food will not survive a stop */
  1565. X!                 objects[victual.piece->otyp].oc_delay > 1) {
  1566. X              if(yn("Stop eating?") == 'y')
  1567. X              {
  1568. X                  reset_eat();
  1569. X--- 1678,1684 ----
  1570. X              victual.fullwarn = TRUE;
  1571. X              if (victual.canchoke &&
  1572. X              /* a one-gulp food will not survive a stop */
  1573. X!                 victual.reqtime > 1) {
  1574. X              if(yn("Stop eating?") == 'y')
  1575. X              {
  1576. X                  reset_eat();
  1577. X***************
  1578. X*** 1658,1664 ****
  1579. X  
  1580. X  STATIC_PTR
  1581. X  int
  1582. X! unfaint() {
  1583. X      (void) Hear_again();
  1584. X      if(u.uhs > FAINTING)
  1585. X          u.uhs = FAINTING;
  1586. X--- 1694,1701 ----
  1587. X  
  1588. X  STATIC_PTR
  1589. X  int
  1590. X! unfaint()
  1591. X! {
  1592. X      (void) Hear_again();
  1593. X      if(u.uhs > FAINTING)
  1594. X          u.uhs = FAINTING;
  1595. X***************
  1596. X*** 1671,1688 ****
  1597. X  #ifdef OVL0
  1598. X  
  1599. X  boolean
  1600. X! is_fainted() {
  1601. X      return(u.uhs == FAINTED);
  1602. X  }
  1603. X  
  1604. X  void
  1605. X! reset_faint() {    /* call when a faint must be prematurely terminated */
  1606. X      if(is_fainted()) nomul(0);
  1607. X  }
  1608. X  
  1609. X  #if 0
  1610. X  void
  1611. X! sync_hunger() {
  1612. X  
  1613. X      if(is_fainted()) {
  1614. X  
  1615. X--- 1708,1728 ----
  1616. X  #ifdef OVL0
  1617. X  
  1618. X  boolean
  1619. X! is_fainted()
  1620. X! {
  1621. X      return(u.uhs == FAINTED);
  1622. X  }
  1623. X  
  1624. X  void
  1625. X! reset_faint()    /* call when a faint must be prematurely terminated */
  1626. X! {
  1627. X      if(is_fainted()) nomul(0);
  1628. X  }
  1629. X  
  1630. X  #if 0
  1631. X  void
  1632. X! sync_hunger()
  1633. X! {
  1634. X  
  1635. X      if(is_fainted()) {
  1636. X  
  1637. X***************
  1638. X*** 1842,1848 ****
  1639. X  /* added nomul (MRS) - it makes sense, you're too busy being sick! */
  1640. X  /* TO DO: regurgitate swallowed monsters when poly'd */
  1641. X  void
  1642. X! vomit() {        /* A good idea from David Neves */
  1643. X      make_sick(0L,TRUE);
  1644. X      nomul(-2);
  1645. X  }
  1646. X--- 1882,1889 ----
  1647. X  /* added nomul (MRS) - it makes sense, you're too busy being sick! */
  1648. X  /* TO DO: regurgitate swallowed monsters when poly'd */
  1649. X  void
  1650. X! vomit()        /* A good idea from David Neves */
  1651. X! {
  1652. X      make_sick(0L,TRUE);
  1653. X      nomul(-2);
  1654. X  }
  1655. X*** /tmp/da08181    Thu Feb 25 10:23:03 1993
  1656. X--- src/end.c    Thu Feb 18 10:54:51 1993
  1657. X***************
  1658. X*** 1,4 ****
  1659. X! /*    SCCS Id: @(#)end.c    3.1    93/01/15    */
  1660. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1661. X  /* NetHack may be freely redistributed.  See license for details. */
  1662. X  
  1663. X--- 1,4 ----
  1664. X! /*    SCCS Id: @(#)end.c    3.1    93/02/09    */
  1665. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1666. X  /* NetHack may be freely redistributed.  See license for details. */
  1667. X  
  1668. X***************
  1669. X*** 18,24 ****
  1670. X  /*
  1671. X   * The order of these needs to match the macros in hack.h.
  1672. X   */
  1673. X! static const char NEARDATA *deaths[] = {        /* the array of death */
  1674. X      "died", "choked", "poisoned", "starvation", "drowning",
  1675. X      "burning", "crushed", "turned to stone", "genocided",
  1676. X      "panic", "trickery",
  1677. X--- 18,24 ----
  1678. X  /*
  1679. X   * The order of these needs to match the macros in hack.h.
  1680. X   */
  1681. X! static NEARDATA const char *deaths[] = {        /* the array of death */
  1682. X      "died", "choked", "poisoned", "starvation", "drowning",
  1683. X      "burning", "crushed", "turned to stone", "genocided",
  1684. X      "panic", "trickery",
  1685. X***************
  1686. X*** 25,31 ****
  1687. X      "quit", "escaped", "ascended"
  1688. X  };
  1689. X  
  1690. X! static const char NEARDATA *ends[] = {        /* "when you..." */
  1691. X      "died", "choked", "were poisoned", "starved", "drowned",
  1692. X      "burned", "were crushed", "turned to stone", "were genocided",
  1693. X      "panicked", "were tricked",
  1694. X--- 25,31 ----
  1695. X      "quit", "escaped", "ascended"
  1696. X  };
  1697. X  
  1698. X! static NEARDATA const char *ends[] = {        /* "when you..." */
  1699. X      "died", "choked", "were poisoned", "starved", "drowned",
  1700. X      "burned", "were crushed", "turned to stone", "were genocided",
  1701. X      "panicked", "were tricked",
  1702. X***************
  1703. X*** 130,135 ****
  1704. X--- 130,136 ----
  1705. X      char buf[BUFSZ];
  1706. X  
  1707. X      You("die...");
  1708. X+     mark_synch();    /* flush buffered screen output */
  1709. X      buf[0] = '\0';
  1710. X      if (type_is_pname(mtmp->data) || (mtmp->data->geno & G_UNIQ)) {
  1711. X           if (!(type_is_pname(mtmp->data) && (mtmp->data->geno & G_UNIQ)))
  1712. X***************
  1713. X*** 399,405 ****
  1714. X       * On those rare occasions you get hosed immediately, go out
  1715. X       * smiling... :-)  -3.
  1716. X       */
  1717. X!     if (moves <= 1 && how < QUIT)
  1718. X          /* You die... --More-- */
  1719. X          pline("Do not pass go.  Do not collect 200 zorkmids.");
  1720. X  
  1721. X--- 400,406 ----
  1722. X       * On those rare occasions you get hosed immediately, go out
  1723. X       * smiling... :-)  -3.
  1724. X       */
  1725. X!     if (moves <= 1 && how < PANICKED)
  1726. X          /* You die... --More-- */
  1727. X          pline("Do not pass go.  Do not collect 200 zorkmids.");
  1728. X  
  1729. X***************
  1730. X*** 446,451 ****
  1731. X--- 447,453 ----
  1732. X       * happen to bones levels */
  1733. X      taken = paybill(how != QUIT);
  1734. X      paygd();
  1735. X+     clearpriests();
  1736. X      clearlocks();
  1737. X  #ifdef AMIGA
  1738. X      clear_icon();
  1739. X***************
  1740. X*** 461,466 ****
  1741. X--- 463,486 ----
  1742. X          savebones();
  1743. X      }
  1744. X  
  1745. X+     /* calculate score */
  1746. X+     {
  1747. X+         long tmp;
  1748. X+         int deepest = deepest_lev_reached(FALSE);
  1749. X+ 
  1750. X+         u.ugold += hidden_gold();    /* accumulate gold from containers */
  1751. X+         tmp = u.ugold - u.ugold0;
  1752. X+         if (tmp < 0L)
  1753. X+         tmp = 0L;
  1754. X+         if (how < PANICKED)
  1755. X+         tmp -= tmp / 10L;
  1756. X+         u.urexp += tmp;
  1757. X+         u.urexp += 50L * (long)(deepest - 1);
  1758. X+         if (deepest > 20)
  1759. X+         u.urexp += 1000L * (long)((deepest > 30) ? 10 : deepest - 20);
  1760. X+         if (how == ASCENDED) u.urexp *= 2L;
  1761. X+     }
  1762. X+ 
  1763. X      /* clean up unneeded windows */
  1764. X      if (have_windows) {
  1765. X          destroy_nhwindow(WIN_MAP);
  1766. X***************
  1767. X*** 486,506 ****
  1768. X          putstr(endwin, 0, pbuf);
  1769. X          putstr(endwin, 0, "");
  1770. X      }
  1771. X-     {   long tmp;
  1772. X-         int deepest = deepest_lev_reached(FALSE);
  1773. X- 
  1774. X-         u.ugold += hidden_gold();    /* accumulate gold from containers */
  1775. X-         tmp = u.ugold - u.ugold0;
  1776. X-         if (tmp < 0L)
  1777. X-         tmp = 0L;
  1778. X-         if (how < PANICKED)
  1779. X-         tmp -= tmp / 10L;
  1780. X-         u.urexp += tmp;
  1781. X-         u.urexp += 50L * (long)(deepest - 1);
  1782. X-         if (deepest > 20)
  1783. X-         u.urexp += 1000L * (long)((deepest > 30) ? 10 : deepest - 20);
  1784. X-         if (how == ASCENDED) u.urexp *= 2L;
  1785. X-     }
  1786. X      if (how == ESCAPED || how == ASCENDED) {
  1787. X          register struct monst *mtmp;
  1788. X          register struct obj *otmp;
  1789. X--- 506,511 ----
  1790. X***************
  1791. X*** 672,678 ****
  1792. X          if (Is_container(box) && box->otyp != BAG_OF_TRICKS) {
  1793. X          if (box->cobj) {
  1794. X              winid tmpwin = create_nhwindow(NHW_MENU);
  1795. X!             Sprintf(buf, "Contents of the %s:", xname(box));
  1796. X              putstr(tmpwin, 0, buf); putstr(tmpwin, 0, "");
  1797. X              for (obj = box->cobj; obj; obj = obj->nobj) {
  1798. X              if (identified) {
  1799. X--- 677,683 ----
  1800. X          if (Is_container(box) && box->otyp != BAG_OF_TRICKS) {
  1801. X          if (box->cobj) {
  1802. X              winid tmpwin = create_nhwindow(NHW_MENU);
  1803. X!             Sprintf(buf, "Contents of %s:", the(xname(box)));
  1804. X              putstr(tmpwin, 0, buf); putstr(tmpwin, 0, "");
  1805. X              for (obj = box->cobj; obj; obj = obj->nobj) {
  1806. X              if (identified) {
  1807. X*** /tmp/da08189    Thu Feb 25 10:23:05 1993
  1808. X--- src/engrave.c    Fri Feb 12 10:26:02 1993
  1809. X***************
  1810. X*** 6,12 ****
  1811. X  #include "lev.h"
  1812. X  #include <ctype.h>
  1813. X  
  1814. X! STATIC_VAR struct engr NEARDATA *head_engr;
  1815. X  
  1816. X  STATIC_DCL void FDECL(del_engr, (struct engr *));
  1817. X  
  1818. X--- 6,12 ----
  1819. X  #include "lev.h"
  1820. X  #include <ctype.h>
  1821. X  
  1822. X! STATIC_VAR NEARDATA struct engr *head_engr;
  1823. X  
  1824. X  STATIC_DCL void FDECL(del_engr, (struct engr *));
  1825. X  
  1826. X***************
  1827. X*** 225,231 ****
  1828. X          return(1);*/
  1829. X  }
  1830. X  
  1831. X! static const char NEARDATA styluses[] =
  1832. X      { ALL_CLASSES, ALLOW_NONE, TOOL_CLASS, WEAPON_CLASS, WAND_CLASS,
  1833. X        GEM_CLASS, RING_CLASS, 0 };
  1834. X  
  1835. X--- 225,231 ----
  1836. X          return(1);*/
  1837. X  }
  1838. X  
  1839. X! static NEARDATA const char styluses[] =
  1840. X      { ALL_CLASSES, ALLOW_NONE, TOOL_CLASS, WEAPON_CLASS, WAND_CLASS,
  1841. X        GEM_CLASS, RING_CLASS, 0 };
  1842. X  
  1843. X***************
  1844. X*** 256,265 ****
  1845. X   * moonstone  -  6    (orthoclase)    *
  1846. X   */
  1847. X  
  1848. X! static const short NEARDATA hard_gems[] =
  1849. X      { DIAMOND, RUBY, SAPPHIRE, TOPAZ, EMERALD, AQUAMARINE, GARNET, 0 };
  1850. X  
  1851. X! static const char NEARDATA *hard_ring_names[] =
  1852. X      {"diamond", "ruby", "sapphire", "emerald", "topaz", ""};
  1853. X  
  1854. X  /* return 1 if action took 1 (or more) moves, 0 if error or aborted */
  1855. X--- 256,265 ----
  1856. X   * moonstone  -  6    (orthoclase)    *
  1857. X   */
  1858. X  
  1859. X! static NEARDATA const short hard_gems[] =
  1860. X      { DIAMOND, RUBY, SAPPHIRE, TOPAZ, EMERALD, AQUAMARINE, GARNET, 0 };
  1861. X  
  1862. X! static NEARDATA const char *hard_ring_names[] =
  1863. X      {"diamond", "ruby", "sapphire", "emerald", "topaz", ""};
  1864. X  
  1865. X  /* return 1 if action took 1 (or more) moves, 0 if error or aborted */
  1866. X***************
  1867. X*** 758,764 ****
  1868. X      /* Prompt for engraving! */
  1869. X      Sprintf(qbuf,"What do you want to %s %s here?", everb, eloc);
  1870. X      getlin(qbuf, ebuf);
  1871. X-     clear_nhwindow(WIN_MESSAGE);
  1872. X  
  1873. X      /* Mix up engraving if surface or state of mind is unsound.  */
  1874. X      /* Original kludge by stewr 870708.  modified by njm 910722. */
  1875. X--- 758,763 ----
  1876. X*** /tmp/da08205    Thu Feb 25 10:23:10 1993
  1877. X--- src/explode.c    Thu Feb 18 10:58:30 1993
  1878. X***************
  1879. X*** 1,4 ****
  1880. X! /*    SCCS Id: @(#)explode.c 3.1    90/11/06
  1881. X  /*    Copyright (C) 1990 by Ken Arromdee */
  1882. X  /* NetHack may be freely redistributed.  See license for details. */
  1883. X  
  1884. X--- 1,4 ----
  1885. X! /*    SCCS Id: @(#)explode.c 3.1    93/02/17
  1886. X  /*    Copyright (C) 1990 by Ken Arromdee */
  1887. X  /* NetHack may be freely redistributed.  See license for details. */
  1888. X  
  1889. X***************
  1890. X*** 146,152 ****
  1891. X                  pline("%s gets heartburn!",
  1892. X                        Monnam(u.ustuck));
  1893. X              else
  1894. X!                 pline("%s gets toasted slightly!",
  1895. X                        Monnam(u.ustuck));
  1896. X          } else
  1897. X          pline("%s is caught in the %s!",
  1898. X--- 146,152 ----
  1899. X                  pline("%s gets heartburn!",
  1900. X                        Monnam(u.ustuck));
  1901. X              else
  1902. X!                 pline("%s gets slightly toasted!",
  1903. X                        Monnam(u.ustuck));
  1904. X          } else
  1905. X          pline("%s is caught in the %s!",
  1906. X***************
  1907. X*** 203,210 ****
  1908. X              if (type >= 0 && olet != SCROLL_CLASS) {
  1909. X                  killer_format = NO_KILLER_PREFIX;
  1910. X                  Sprintf(buf, "caught %sself in %s own %s.",
  1911. X!                 flags.female ? "her" : "him",
  1912. X!                 flags.female ? "her" : "his", str);
  1913. X              } else {
  1914. X                  killer_format = KILLED_BY;
  1915. X                  Strcpy(buf, str);
  1916. X--- 203,209 ----
  1917. X              if (type >= 0 && olet != SCROLL_CLASS) {
  1918. X                  killer_format = NO_KILLER_PREFIX;
  1919. X                  Sprintf(buf, "caught %sself in %s own %s.",
  1920. X!                     him[flags.female], his[flags.female], str);
  1921. X              } else {
  1922. X                  killer_format = KILLED_BY;
  1923. X                  Strcpy(buf, str);
  1924. X*** /tmp/da08213    Thu Feb 25 10:23:12 1993
  1925. X--- src/extralev.c    Fri Feb 12 10:25:48 1993
  1926. X***************
  1927. X*** 18,24 ****
  1928. X  #define LEFT 4
  1929. X  #define RIGHT 8
  1930. X  
  1931. X! static struct rogueroom NEARDATA r[3][3];
  1932. X  static void FDECL(roguejoin,(int,int,int,int,int));
  1933. X  static void FDECL(roguecorr,(int,int,int));
  1934. X  static void FDECL(miniwalk,(int,int));
  1935. X--- 18,24 ----
  1936. X  #define LEFT 4
  1937. X  #define RIGHT 8
  1938. X  
  1939. X! static NEARDATA struct rogueroom r[3][3];
  1940. X  static void FDECL(roguejoin,(int,int,int,int,int));
  1941. X  static void FDECL(roguecorr,(int,int,int));
  1942. X  static void FDECL(miniwalk,(int,int));
  1943. X
  1944. END_OF_FILE
  1945. if test 53866 -ne `wc -c <'patches01c'`; then
  1946.     echo shar: \"'patches01c'\" unpacked with wrong size!
  1947. fi
  1948. # end of 'patches01c'
  1949. if test -f 'sys/winnt/winnt.c' -a "${1}" != "-c" ; then 
  1950.   echo shar: Renaming existing file \"'sys/winnt/winnt.c'\" to \"'sys/winnt/winnt.c.orig'\"
  1951.   mv -f 'sys/winnt/winnt.c' 'sys/winnt/winnt.c.orig'
  1952. fi
  1953. echo shar: Extracting \"'sys/winnt/winnt.c'\" \(2186 characters\)
  1954. sed "s/^X//" >'sys/winnt/winnt.c' <<'END_OF_FILE'
  1955. X/*    SCCS Id: @(#)winnt.c     3.1     93/01/31          */
  1956. X/* Copyright (c) NetHack PC Development Team 1990, 1991, 1992      */
  1957. X/* NetHack may be freely redistributed.  See license for details. */
  1958. X
  1959. X/*
  1960. X *  Windows NT system functions.
  1961. X *
  1962. X *  Initial Creation: Michael Allison - January 31/93
  1963. X *
  1964. X */
  1965. X
  1966. X#define NEED_VARARGS
  1967. X#include "hack.h"
  1968. X
  1969. X#ifdef WIN32
  1970. X
  1971. X#include <dos.h>
  1972. X#include <direct.h>
  1973. X#include <ctype.h>
  1974. X#include <windows.h>
  1975. X
  1976. X/*
  1977. X * The following WIN32 API routines are used in this file.
  1978. X *
  1979. X * GetDiskFreeSpace
  1980. X * GetVolumeInformation
  1981. X * FindFirstFile
  1982. X * FindNextFile
  1983. X * FindClose
  1984. X *
  1985. X */
  1986. X
  1987. X
  1988. X/* globals required within here */
  1989. XHANDLE ffhandle = NULL;
  1990. XWIN32_FIND_DATA ffd;
  1991. X
  1992. X
  1993. Xchar
  1994. Xswitchar()
  1995. X{
  1996. X /* Could not locate a WIN32 API call for this- MJA */
  1997. X    return '-';
  1998. X}
  1999. X
  2000. Xlong
  2001. Xfreediskspace(path)
  2002. Xchar *path;
  2003. X{
  2004. X    char tmppath[4];
  2005. X    DWORD SectorsPerCluster = 0;
  2006. X    DWORD BytesPerSector = 0;
  2007. X    DWORD FreeClusters = 0;
  2008. X    DWORD TotalClusters = 0;
  2009. X
  2010. X    tmppath[0] = *path;
  2011. X    tmppath[1] = ':';
  2012. X    tmppath[2] = '\\';
  2013. X    tmppath[3] = '\0';
  2014. X    GetDiskFreeSpace(tmppath, &SectorsPerCluster,
  2015. X            &BytesPerSector,
  2016. X            &FreeClusters,
  2017. X            &TotalClusters);
  2018. X    return (long)(SectorsPerCluster * BytesPerSector *
  2019. X            FreeClusters);
  2020. X}
  2021. X
  2022. X/*
  2023. X * Functions to get filenames using wildcards
  2024. X */
  2025. Xint
  2026. Xfindfirst(path)
  2027. Xchar *path;
  2028. X{
  2029. X    if (ffhandle){
  2030. X         FindClose(ffhandle);
  2031. X         ffhandle = NULL;
  2032. X    }
  2033. X    ffhandle = FindFirstFile(path,&ffd);
  2034. X    return 
  2035. X      (ffhandle == INVALID_HANDLE_VALUE) ? 0 : 1;
  2036. X}
  2037. X
  2038. Xint
  2039. Xfindnext() 
  2040. X{
  2041. X    return FindNextFile(ffhandle,&ffd) ? 1 : 0;
  2042. X}
  2043. X
  2044. Xchar *
  2045. Xfoundfile_buffer()
  2046. X{
  2047. X    return &ffd.cFileName[0];
  2048. X}
  2049. X
  2050. Xlong
  2051. Xfilesize(file)
  2052. Xchar *file;
  2053. X{
  2054. X    if (findfirst(file)) {
  2055. X        return ((long *)&ffd.nFileSizeLow);
  2056. X    } else
  2057. X        return -1L;
  2058. X}
  2059. X
  2060. X/*
  2061. X * Chdrive() changes the default drive.
  2062. X */
  2063. Xvoid
  2064. Xchdrive(str)
  2065. Xchar *str;
  2066. X{
  2067. X    char *ptr;
  2068. X    char drive;
  2069. X    if ((ptr = index(str, ':')) != NULL) 
  2070. X    {
  2071. X        drive = toupper(*(ptr - 1));
  2072. X        _chdrive((drive - 'A') + 1);
  2073. X    }
  2074. X}
  2075. X
  2076. X/* NT supports long file names, but does THIS particular volume? */
  2077. Xvoid
  2078. Xnt_regularize(s)
  2079. Xchar *s;
  2080. X{
  2081. X    DWORD maxflen;
  2082. X    int status=0;
  2083. X    
  2084. X    status = GetVolumeInformation(NULL,NULL,NULL
  2085. X            ,NULL,&maxflen,NULL,NULL,NULL);
  2086. X    if (status)
  2087. X    {
  2088. X       if (strlen(s) > maxflen-4) s[maxflen-4] = '\0';
  2089. X    }
  2090. X}
  2091. X#endif /* WIN32 */
  2092. END_OF_FILE
  2093. if test 2186 -ne `wc -c <'sys/winnt/winnt.c'`; then
  2094.     echo shar: \"'sys/winnt/winnt.c'\" unpacked with wrong size!
  2095. fi
  2096. # end of 'sys/winnt/winnt.c'
  2097. echo shar: End of archive 9 \(of 31\).
  2098. cp /dev/null ark9isdone
  2099. MISSING=""
  2100. 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
  2101.     if test ! -f ark${I}isdone ; then
  2102.     MISSING="${MISSING} ${I}"
  2103.     fi
  2104. done
  2105. if test "${MISSING}" = "" ; then
  2106.     echo You have unpacked all 31 archives.
  2107.     echo "Now execute 'patchit.sh'"
  2108.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2109. else
  2110.     echo You still need to unpack the following archives:
  2111.     echo "        " ${MISSING}
  2112. fi
  2113. ##  End of shell archive.
  2114. exit 0
  2115.