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

  1. Subject:  v17i057:  nethack31 - display oriented dungeons & dragons (Ver. 3.1), Patch1p/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 57
  7. Archive-name: nethack31/Patch1p
  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 16 (of 31)."
  20. # Contents:  patches01b
  21. # Wrapped by billr@saab on Fri Mar  5 10:50:45 1993
  22. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  23. if test -f 'patches01b' -a "${1}" != "-c" ; then 
  24.   echo shar: Renaming existing file \"'patches01b'\" to \"'patches01b.orig'\"
  25.   mv -f 'patches01b' 'patches01b.orig'
  26. fi
  27. echo shar: Extracting \"'patches01b'\" \(52704 characters\)
  28. sed "s/^X//" >'patches01b' <<'END_OF_FILE'
  29. X*** /tmp/da08061    Thu Feb 25 10:22:24 1993
  30. X--- src/cmd.c    Wed Feb 17 09:59:12 1993
  31. X***************
  32. X*** 1,4 ****
  33. X! /*    SCCS Id: @(#)cmd.c    3.1    92/11/25    */
  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: @(#)cmd.c    3.1    93/02/16    */
  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*** 117,126 ****
  44. X  #endif
  45. X  #endif /* OVLB */
  46. X  
  47. X- #ifdef OVL0
  48. X- static int FDECL(click_to_cmd, (int,int,int));
  49. X- #endif /* OVL0 */
  50. X- 
  51. X  STATIC_OVL char *NDECL(parse);
  52. X  
  53. X  #ifdef UNIX
  54. X--- 117,122 ----
  55. X***************
  56. X*** 195,201 ****
  57. X   */
  58. X  #define BSIZE 20
  59. X  static char pushq[BSIZE], saveq[BSIZE];
  60. X! static int NEARDATA phead, NEARDATA ptail, NEARDATA shead, NEARDATA stail;
  61. X  
  62. X  static char
  63. X  popch() {
  64. X--- 191,197 ----
  65. X   */
  66. X  #define BSIZE 20
  67. X  static char pushq[BSIZE], saveq[BSIZE];
  68. X! static NEARDATA int phead, ptail, shead, stail;
  69. X  
  70. X  static char
  71. X  popch() {
  72. X***************
  73. X*** 261,267 ****
  74. X  #else
  75. X      getlin("#", buf);
  76. X  #endif
  77. X-     clear_nhwindow(WIN_MESSAGE);
  78. X      if(buf[0] == '\0' || buf[0] == '\033')
  79. X          return 0;
  80. X      if(buf[0] == '?') {
  81. X--- 257,262 ----
  82. X***************
  83. X*** 660,665 ****
  84. X--- 655,661 ----
  85. X      {M('m'), domonability},
  86. X  #endif /* POLYSELF */
  87. X      {'N', ddocall}, /* if number_pad is on */
  88. X+     {M('n'), ddocall},
  89. X      {M('N'), ddocall},
  90. X      {'o', doopen},
  91. X      {'O', doset},
  92. X***************
  93. X*** 699,704 ****
  94. X--- 695,701 ----
  95. X      {'/', dowhatis},
  96. X      {'&', dowhatdoes},
  97. X      {'?', dohelp},
  98. X+     {M('?'), doextlist},
  99. X  #ifdef SHELL
  100. X      {'!', dosh},
  101. X  #endif
  102. X***************
  103. X*** 720,726 ****
  104. X      {'#', doextcmd},
  105. X      {0,0,0}
  106. X  };
  107. X- #undef M
  108. X  
  109. X  const struct ext_func_tab extcmdlist[] = {
  110. X      {"adjust", "adjust inventory letters", doorganize},
  111. X--- 717,722 ----
  112. X***************
  113. X*** 977,988 ****
  114. X      return x >= 1 && x <= COLNO-1 && y >= 0 && y <= ROWNO-1;
  115. X  }
  116. X  
  117. X! static int NEARDATA last_multi;
  118. X  
  119. X  /*
  120. X   * convert a MAP window position into a movecmd
  121. X   */
  122. X! static int
  123. X  click_to_cmd(x, y, mod)
  124. X      int x, y, mod;
  125. X  {
  126. X--- 973,984 ----
  127. X      return x >= 1 && x <= COLNO-1 && y >= 0 && y <= ROWNO-1;
  128. X  }
  129. X  
  130. X! static NEARDATA int last_multi;
  131. X  
  132. X  /*
  133. X   * convert a MAP window position into a movecmd
  134. X   */
  135. X! int
  136. X  click_to_cmd(x, y, mod)
  137. X      int x, y, mod;
  138. X  {
  139. X***************
  140. X*** 1007,1013 ****
  141. X      if(mod == CLICK_1) {
  142. X      return (flags.num_pad ? ndir[x] : sdir[x]);
  143. X      } else {
  144. X!     return (sdir[x] - 'a' + 'A'); /* run command */
  145. X      }
  146. X  }
  147. X  
  148. X--- 1003,1010 ----
  149. X      if(mod == CLICK_1) {
  150. X      return (flags.num_pad ? ndir[x] : sdir[x]);
  151. X      } else {
  152. X!     return (flags.num_pad ? M(ndir[x]) :
  153. X!         (sdir[x] - 'a' + 'A')); /* run command */
  154. X      }
  155. X  }
  156. X  
  157. X*** /tmp/da08069    Thu Feb 25 10:22:26 1993
  158. X--- src/dbridge.c    Fri Feb 12 10:26:10 1993
  159. X***************
  160. X*** 223,229 ****
  161. X  
  162. X  #define ENTITIES 2
  163. X  
  164. X! static struct entity NEARDATA occupants[ENTITIES];
  165. X  
  166. X  static
  167. X  struct entity *
  168. X--- 223,229 ----
  169. X  
  170. X  #define ENTITIES 2
  171. X  
  172. X! static NEARDATA struct entity occupants[ENTITIES];
  173. X  
  174. X  static
  175. X  struct entity *
  176. X*** /tmp/da08077    Thu Feb 25 10:22:29 1993
  177. X--- src/decl.c    Fri Feb 12 10:25:36 1993
  178. X***************
  179. X*** 17,35 ****
  180. X  char *catmore = 0;        /* default pager */
  181. X  #endif
  182. X  
  183. X! int NEARDATA bases[MAXOCLASSES] = DUMMY;
  184. X  
  185. X! int NEARDATA multi = 0;
  186. X! int NEARDATA warnlevel = 0;        /* used by movemon and dochugw */
  187. X! int NEARDATA nroom = 0;
  188. X! int NEARDATA nsubroom = 0;
  189. X! int NEARDATA occtime = 0;
  190. X  
  191. X  int x_maze_max, y_maze_max;    /* initialized in main, used in mkmaze.c */
  192. X  int otg_temp;            /* used by object_to_glyph() [otg] */
  193. X  
  194. X  #ifdef REDO
  195. X! int NEARDATA in_doagain = 0;
  196. X  #endif
  197. X  
  198. X  /*
  199. X--- 17,35 ----
  200. X  char *catmore = 0;        /* default pager */
  201. X  #endif
  202. X  
  203. X! NEARDATA int bases[MAXOCLASSES] = DUMMY;
  204. X  
  205. X! NEARDATA int multi = 0;
  206. X! NEARDATA int warnlevel = 0;        /* used by movemon and dochugw */
  207. X! NEARDATA int nroom = 0;
  208. X! NEARDATA int nsubroom = 0;
  209. X! NEARDATA int occtime = 0;
  210. X  
  211. X  int x_maze_max, y_maze_max;    /* initialized in main, used in mkmaze.c */
  212. X  int otg_temp;            /* used by object_to_glyph() [otg] */
  213. X  
  214. X  #ifdef REDO
  215. X! NEARDATA int in_doagain = 0;
  216. X  #endif
  217. X  
  218. X  /*
  219. X***************
  220. X*** 43,75 ****
  221. X  struct q_score    quest_status = DUMMY;
  222. X  #endif
  223. X  
  224. X! int NEARDATA smeq[MAXNROFROOMS+1] = DUMMY;
  225. X! int NEARDATA doorindex = 0;
  226. X  
  227. X! char NEARDATA *save_cm = 0;
  228. X! int NEARDATA killer_format = 0;
  229. X! const char NEARDATA *killer = 0;
  230. X! const char NEARDATA *nomovemsg = 0;
  231. X! const char NEARDATA nul[40] = DUMMY;        /* contains zeros */
  232. X! char NEARDATA plname[PL_NSIZ] = DUMMY;        /* player name */
  233. X! char NEARDATA pl_character[PL_CSIZ] = DUMMY;
  234. X  
  235. X  #ifdef TUTTI_FRUTTI
  236. X! char NEARDATA pl_fruit[PL_FSIZ] = DUMMY;
  237. X! int NEARDATA current_fruit = 0;
  238. X! struct fruit NEARDATA *ffruit = (struct fruit *)0;
  239. X  #endif
  240. X  
  241. X! char NEARDATA tune[6] = DUMMY;
  242. X  
  243. X! const char NEARDATA *occtxt = DUMMY;
  244. X! const char NEARDATA quitchars[] = " \r\n\033";
  245. X! const char NEARDATA vowels[] = "aeiouAEIOU";
  246. X! const char NEARDATA ynchars[] = "yn";
  247. X! const char NEARDATA ynqchars[] = "ynq";
  248. X! const char NEARDATA ynaqchars[] = "ynaq";
  249. X! const char NEARDATA ynNaqchars[] = "yn#aq";
  250. X! long NEARDATA yn_number = 0L;
  251. X  
  252. X  #ifdef MICRO
  253. X  char hackdir[PATHLEN];        /* where rumors, help, record are */
  254. X--- 43,75 ----
  255. X  struct q_score    quest_status = DUMMY;
  256. X  #endif
  257. X  
  258. X! NEARDATA int smeq[MAXNROFROOMS+1] = DUMMY;
  259. X! NEARDATA int doorindex = 0;
  260. X  
  261. X! NEARDATA char *save_cm = 0;
  262. X! NEARDATA int killer_format = 0;
  263. X! NEARDATA const char *killer = 0;
  264. X! NEARDATA const char *nomovemsg = 0;
  265. X! NEARDATA const char nul[40] = DUMMY;        /* contains zeros */
  266. X! NEARDATA char plname[PL_NSIZ] = DUMMY;        /* player name */
  267. X! NEARDATA char pl_character[PL_CSIZ] = DUMMY;
  268. X  
  269. X  #ifdef TUTTI_FRUTTI
  270. X! NEARDATA char pl_fruit[PL_FSIZ] = DUMMY;
  271. X! NEARDATA int current_fruit = 0;
  272. X! NEARDATA struct fruit *ffruit = (struct fruit *)0;
  273. X  #endif
  274. X  
  275. X! NEARDATA char tune[6] = DUMMY;
  276. X  
  277. X! NEARDATA const char *occtxt = DUMMY;
  278. X! NEARDATA const char quitchars[] = " \r\n\033";
  279. X! NEARDATA const char vowels[] = "aeiouAEIOU";
  280. X! NEARDATA const char ynchars[] = "yn";
  281. X! NEARDATA const char ynqchars[] = "ynq";
  282. X! NEARDATA const char ynaqchars[] = "ynaq";
  283. X! NEARDATA const char ynNaqchars[] = "yn#aq";
  284. X! NEARDATA long yn_number = 0L;
  285. X  
  286. X  #ifdef MICRO
  287. X  char hackdir[PATHLEN];        /* where rumors, help, record are */
  288. X***************
  289. X*** 92,159 ****
  290. X  #undef INFOSIZE
  291. X  
  292. X  /* 'rogue'-like direction commands (cmd.c) */
  293. X! const char NEARDATA sdir[] = "hykulnjb><";
  294. X! const char NEARDATA ndir[] = "47896321><";    /* number pad mode */
  295. X! const schar NEARDATA xdir[10] = { -1,-1, 0, 1, 1, 1, 0,-1, 0, 0 };
  296. X! const schar NEARDATA ydir[10] = {  0,-1,-1,-1, 0, 1, 1, 1, 0, 0 };
  297. X! const schar zdir[10]          = {  0, 0, 0, 0, 0, 0, 0, 0, 1,-1 };
  298. X  
  299. X! schar NEARDATA tbx = 0, NEARDATA tby = 0;    /* mthrowu: target */
  300. X! int NEARDATA dig_effort = 0;    /* effort expended on current pos */
  301. X! d_level NEARDATA dig_level = { 0, 0 };
  302. X! coord NEARDATA dig_pos = DUMMY;
  303. X! boolean NEARDATA dig_down = FALSE;
  304. X  
  305. X! dungeon NEARDATA dungeons[MAXDUNGEON];    /* ini'ed by init_dungeon() */
  306. X! s_level NEARDATA *sp_levchn;
  307. X! int NEARDATA done_stopprint = 0;
  308. X! int NEARDATA done_hup = 0;
  309. X! stairway NEARDATA upstair = { 0, 0 }, NEARDATA dnstair = { 0, 0 };
  310. X! stairway NEARDATA upladder = { 0, 0 }, NEARDATA dnladder = { 0, 0 };
  311. X! stairway NEARDATA sstairs = { 0, 0 };
  312. X! dest_area NEARDATA updest = { 0, 0, 0, 0, 0, 0, 0, 0 };
  313. X! dest_area NEARDATA dndest = { 0, 0, 0, 0, 0, 0, 0, 0 };
  314. X! coord NEARDATA inv_pos = { 0, 0 };
  315. X  
  316. X! boolean NEARDATA in_mklev = FALSE;
  317. X! boolean    NEARDATA stoned = FALSE;    /* done to monsters hit by 'c' */
  318. X! boolean    NEARDATA unweapon = FALSE;
  319. X! boolean NEARDATA mrg_to_wielded = FALSE;
  320. X               /* weapon picked is merged with wielded one */
  321. X  
  322. X  #ifdef KOPS
  323. X! boolean NEARDATA allow_kops = TRUE;
  324. X  #endif
  325. X  
  326. X! coord NEARDATA bhitpos = DUMMY;
  327. X! coord NEARDATA doors[DOORMAX] = {DUMMY};
  328. X  
  329. X! struct mkroom NEARDATA rooms[(MAXNROFROOMS+1)*2] = {DUMMY};
  330. X! struct mkroom* NEARDATA subrooms = &rooms[MAXNROFROOMS+1];
  331. X  struct mkroom *upstairs_room, *dnstairs_room, *sstairs_room;
  332. X  
  333. X  dlevel_t level;        /* level map */
  334. X  struct trap *ftrap = (struct trap *)0;
  335. X! struct monst NEARDATA youmonst = DUMMY;
  336. X! struct flag NEARDATA flags = DUMMY;
  337. X! struct you NEARDATA u = DUMMY;
  338. X  
  339. X! struct obj NEARDATA *invent = (struct obj *)0, 
  340. X!         NEARDATA *uwep = (struct obj *)0, NEARDATA *uarm = (struct obj *)0,
  341. X  #ifdef TOURIST
  342. X!     NEARDATA *uarmu = (struct obj *)0, /* under-wear, so to speak */
  343. X  #endif
  344. X  #ifdef POLYSELF
  345. X!     NEARDATA *uskin = (struct obj *)0, /* dragon armor, if a dragon */
  346. X  #endif
  347. X!     NEARDATA *uarmc = (struct obj *)0, NEARDATA *uarmh = (struct obj *)0, 
  348. X!         NEARDATA *uarms = (struct obj *)0, NEARDATA *uarmg = (struct obj *)0,
  349. X!         NEARDATA *uarmf = (struct obj *)0, NEARDATA *uamul = (struct obj *)0,
  350. X!     NEARDATA *uright = (struct obj *)0,
  351. X!         NEARDATA *uleft = (struct obj *)0,
  352. X!         NEARDATA *ublindf = (struct obj *)0,
  353. X!     NEARDATA *uchain = (struct obj *)0,
  354. X!         NEARDATA *uball = (struct obj *)0;
  355. X  
  356. X  #ifdef TEXTCOLOR
  357. X  /*
  358. X--- 92,159 ----
  359. X  #undef INFOSIZE
  360. X  
  361. X  /* 'rogue'-like direction commands (cmd.c) */
  362. X! NEARDATA const char sdir[] = "hykulnjb><";
  363. X! NEARDATA const char ndir[] = "47896321><";    /* number pad mode */
  364. X! NEARDATA const schar xdir[10] = { -1,-1, 0, 1, 1, 1, 0,-1, 0, 0 };
  365. X! NEARDATA const schar ydir[10] = {  0,-1,-1,-1, 0, 1, 1, 1, 0, 0 };
  366. X! NEARDATA const schar zdir[10]          = {  0, 0, 0, 0, 0, 0, 0, 0, 1,-1 };
  367. X  
  368. X! NEARDATA schar tbx = 0, tby = 0;    /* mthrowu: target */
  369. X! NEARDATA int dig_effort = 0;    /* effort expended on current pos */
  370. X! NEARDATA d_level dig_level = { 0, 0 };
  371. X! NEARDATA coord dig_pos = DUMMY;
  372. X! NEARDATA boolean dig_down = FALSE;
  373. X  
  374. X! NEARDATA dungeon dungeons[MAXDUNGEON];    /* ini'ed by init_dungeon() */
  375. X! NEARDATA s_level *sp_levchn;
  376. X! NEARDATA int done_stopprint = 0;
  377. X! NEARDATA int done_hup = 0;
  378. X! NEARDATA stairway upstair = { 0, 0 }, dnstair = { 0, 0 };
  379. X! NEARDATA stairway upladder = { 0, 0 }, dnladder = { 0, 0 };
  380. X! NEARDATA stairway sstairs = { 0, 0 };
  381. X! NEARDATA dest_area updest = { 0, 0, 0, 0, 0, 0, 0, 0 };
  382. X! NEARDATA dest_area dndest = { 0, 0, 0, 0, 0, 0, 0, 0 };
  383. X! NEARDATA coord inv_pos = { 0, 0 };
  384. X  
  385. X! NEARDATA boolean in_mklev = FALSE;
  386. X! NEARDATA boolean stoned = FALSE;    /* done to monsters hit by 'c' */
  387. X! NEARDATA boolean unweapon = FALSE;
  388. X! NEARDATA boolean mrg_to_wielded = FALSE;
  389. X               /* weapon picked is merged with wielded one */
  390. X  
  391. X  #ifdef KOPS
  392. X! NEARDATA boolean allow_kops = TRUE;
  393. X  #endif
  394. X  
  395. X! NEARDATA coord bhitpos = DUMMY;
  396. X! NEARDATA coord doors[DOORMAX] = {DUMMY};
  397. X  
  398. X! NEARDATA struct mkroom rooms[(MAXNROFROOMS+1)*2] = {DUMMY};
  399. X! NEARDATA struct mkroom* subrooms = &rooms[MAXNROFROOMS+1];
  400. X  struct mkroom *upstairs_room, *dnstairs_room, *sstairs_room;
  401. X  
  402. X  dlevel_t level;        /* level map */
  403. X  struct trap *ftrap = (struct trap *)0;
  404. X! NEARDATA struct monst youmonst = DUMMY;
  405. X! NEARDATA struct flag flags = DUMMY;
  406. X! NEARDATA struct you u = DUMMY;
  407. X  
  408. X! NEARDATA struct obj *invent = (struct obj *)0, 
  409. X!     *uwep = (struct obj *)0, *uarm = (struct obj *)0,
  410. X  #ifdef TOURIST
  411. X!     *uarmu = (struct obj *)0, /* under-wear, so to speak */
  412. X  #endif
  413. X  #ifdef POLYSELF
  414. X!      *uskin = (struct obj *)0, /* dragon armor, if a dragon */
  415. X  #endif
  416. X!     *uarmc = (struct obj *)0, *uarmh = (struct obj *)0, 
  417. X!         *uarms = (struct obj *)0, *uarmg = (struct obj *)0,
  418. X!         *uarmf = (struct obj *)0, *uamul = (struct obj *)0,
  419. X!     *uright = (struct obj *)0,
  420. X!         *uleft = (struct obj *)0,
  421. X!         *ublindf = (struct obj *)0,
  422. X!     *uchain = (struct obj *)0,
  423. X!         *uball = (struct obj *)0;
  424. X  
  425. X  #ifdef TEXTCOLOR
  426. X  /*
  427. X***************
  428. X*** 177,206 ****
  429. X      S_ss1, S_ss2, S_ss3, S_ss2, S_ss1, S_ss2, S_ss4,
  430. X  };
  431. X  
  432. X! struct spell NEARDATA spl_book[MAXSPELL + 1] = {DUMMY};
  433. X  
  434. X! long NEARDATA moves = 1L, NEARDATA monstermoves = 1L;
  435. X       /* These diverge when player is Fast */
  436. X! long NEARDATA wailmsg = 0L;
  437. X  
  438. X  /* objects that are moving to another dungeon level */
  439. X! struct obj NEARDATA *migrating_objs = (struct obj *)0;
  440. X  /* objects not yet paid for */
  441. X! struct obj NEARDATA *billobjs = (struct obj *)0;
  442. X  
  443. X  /* used to zero all elements of a struct obj */
  444. X! struct obj NEARDATA zeroobj = DUMMY;
  445. X  
  446. X  /* originally from dog.c */
  447. X! char NEARDATA dogname[63] = DUMMY;
  448. X! char NEARDATA catname[63] = DUMMY;
  449. X  char preferred_pet;    /* '\0', 'c', 'd' */
  450. X  /* monsters that went down/up together with @ */
  451. X! struct monst NEARDATA *mydogs = (struct monst *)0;
  452. X  /* monsters that are moving to another dungeon level */
  453. X! struct monst NEARDATA *migrating_mons = (struct monst *)0;
  454. X  
  455. X! struct c_color_names NEARDATA c_color_names = {
  456. X      "black", "amber", "golden",
  457. X      "light blue", "red", "green",
  458. X      "silver", "blue", "purple",
  459. X--- 177,211 ----
  460. X      S_ss1, S_ss2, S_ss3, S_ss2, S_ss1, S_ss2, S_ss4,
  461. X  };
  462. X  
  463. X! NEARDATA struct spell spl_book[MAXSPELL + 1] = {DUMMY};
  464. X  
  465. X! NEARDATA long moves = 1L, monstermoves = 1L;
  466. X       /* These diverge when player is Fast */
  467. X! NEARDATA long wailmsg = 0L;
  468. X  
  469. X  /* objects that are moving to another dungeon level */
  470. X! NEARDATA struct obj *migrating_objs = (struct obj *)0;
  471. X  /* objects not yet paid for */
  472. X! NEARDATA struct obj *billobjs = (struct obj *)0;
  473. X  
  474. X  /* used to zero all elements of a struct obj */
  475. X! NEARDATA struct obj zeroobj = DUMMY;
  476. X  
  477. X+ /* monster pronouns, index is return value of gender(mtmp) */
  478. X+ NEARDATA const char *he[3]  = { "he",  "she", "it" };
  479. X+ NEARDATA const char *him[3] = { "him", "her", "it" };
  480. X+ NEARDATA const char *his[3] = { "his", "her", "its" };
  481. X+ 
  482. X  /* originally from dog.c */
  483. X! NEARDATA char dogname[63] = DUMMY;
  484. X! NEARDATA char catname[63] = DUMMY;
  485. X  char preferred_pet;    /* '\0', 'c', 'd' */
  486. X  /* monsters that went down/up together with @ */
  487. X! NEARDATA struct monst *mydogs = (struct monst *)0;
  488. X  /* monsters that are moving to another dungeon level */
  489. X! NEARDATA struct monst *migrating_mons = (struct monst *)0;
  490. X  
  491. X! NEARDATA struct c_color_names c_color_names = {
  492. X      "black", "amber", "golden",
  493. X      "light blue", "red", "green",
  494. X      "silver", "blue", "purple",
  495. X***************
  496. X*** 213,224 ****
  497. X  };
  498. X  
  499. X  /* Vision */
  500. X! boolean    NEARDATA vision_full_recalc = 0;
  501. X! char    NEARDATA **viz_array = 0;/* used in cansee() and couldsee() macros */
  502. X  
  503. X  /* Global windowing data, defined here for multi-window-system support */
  504. X! winid NEARDATA WIN_MESSAGE = WIN_ERR, NEARDATA WIN_STATUS = WIN_ERR;
  505. X! winid NEARDATA WIN_MAP = WIN_ERR, NEARDATA WIN_INVEN = WIN_ERR;
  506. X  char toplines[BUFSZ];
  507. X  /* Windowing stuff that's really tty oriented, but present for all ports */
  508. X  struct tc_gbl_data tc_gbl_data = { 0,0, 0,0 };    /* AS,AE, LI,CO */
  509. X--- 218,229 ----
  510. X  };
  511. X  
  512. X  /* Vision */
  513. X! NEARDATA boolean vision_full_recalc = 0;
  514. X! NEARDATA char     **viz_array = 0;/* used in cansee() and couldsee() macros */
  515. X  
  516. X  /* Global windowing data, defined here for multi-window-system support */
  517. X! NEARDATA winid WIN_MESSAGE = WIN_ERR, WIN_STATUS = WIN_ERR;
  518. X! NEARDATA winid WIN_MAP = WIN_ERR, WIN_INVEN = WIN_ERR;
  519. X  char toplines[BUFSZ];
  520. X  /* Windowing stuff that's really tty oriented, but present for all ports */
  521. X  struct tc_gbl_data tc_gbl_data = { 0,0, 0,0 };    /* AS,AE, LI,CO */
  522. X*** /tmp/da08085    Thu Feb 25 10:22:31 1993
  523. X--- src/detect.c    Sun Feb 21 16:06:26 1993
  524. X***************
  525. X*** 535,541 ****
  526. X  level_distance(where)
  527. X  d_level *where;
  528. X  {
  529. X!     register xchar ll = depth(&u.uz) - depth(where);
  530. X      register boolean indun = (u.uz.dnum == where->dnum);
  531. X  
  532. X      if (ll < 0) {
  533. X--- 535,541 ----
  534. X  level_distance(where)
  535. X  d_level *where;
  536. X  {
  537. X!     register schar ll = depth(&u.uz) - depth(where);
  538. X      register boolean indun = (u.uz.dnum == where->dnum);
  539. X  
  540. X      if (ll < 0) {
  541. X***************
  542. X*** 639,645 ****
  543. X      if (flags.verbose) pline("Never mind.");
  544. X      return;
  545. X      }
  546. X!     You("peer into %s", the(bname));
  547. X      nomul(-rnd(10));
  548. X      nomovemsg = "";
  549. X      if (obj->spe <= 0)
  550. X--- 639,645 ----
  551. X      if (flags.verbose) pline("Never mind.");
  552. X      return;
  553. X      }
  554. X!     You("peer into %s...", the(bname));
  555. X      nomul(-rnd(10));
  556. X      nomovemsg = "";
  557. X      if (obj->spe <= 0)
  558. X***************
  559. X*** 661,679 ****
  560. X              break;
  561. X          default:
  562. X              {
  563. X!             short i = rn2(SIZE(level_detects));
  564. X              You("see %s, %s.",
  565. X              level_detects[i].what,
  566. X              level_distance(level_detects[i].where));
  567. X              }
  568. X!             ret = 1;
  569. X              break;
  570. X      }
  571. X  
  572. X!     if (!ret)
  573. X          if (!rn2(100))  /* make them nervous */
  574. X          You("see the Wizard of Yendor gazing out at you.");
  575. X!         else pline("The vision is unclear.");
  576. X      }
  577. X      return;
  578. X  }
  579. X--- 661,680 ----
  580. X              break;
  581. X          default:
  582. X              {
  583. X!             int i = rn2(SIZE(level_detects));
  584. X              You("see %s, %s.",
  585. X              level_detects[i].what,
  586. X              level_distance(level_detects[i].where));
  587. X              }
  588. X!             ret = 0;
  589. X              break;
  590. X      }
  591. X  
  592. X!     if (ret) {
  593. X          if (!rn2(100))  /* make them nervous */
  594. X          You("see the Wizard of Yendor gazing out at you.");
  595. X!         else pline("The vision is unclear.");
  596. X!     }
  597. X      }
  598. X      return;
  599. X  }
  600. X*** /tmp/da08101    Thu Feb 25 10:22:36 1993
  601. X--- src/do.c    Wed Feb 24 17:53:39 1993
  602. X***************
  603. X*** 1,4 ****
  604. X! /*    SCCS Id: @(#)do.c    3.1    92/11/11    */
  605. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  606. X  /* NetHack may be freely redistributed.  See license for details. */
  607. X  
  608. X--- 1,4 ----
  609. X! /*    SCCS Id: @(#)do.c    3.1    93/02/20    */
  610. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  611. X  /* NetHack may be freely redistributed.  See license for details. */
  612. X  
  613. X***************
  614. X*** 40,46 ****
  615. X  
  616. X  #ifdef OVLB
  617. X  
  618. X! static const char NEARDATA drop_types[] =
  619. X      { ALLOW_COUNT, GOLD_CLASS, ALL_CLASSES, 0 };
  620. X  
  621. X  int
  622. X--- 40,46 ----
  623. X  
  624. X  #ifdef OVLB
  625. X  
  626. X! static NEARDATA const char drop_types[] =
  627. X      { ALLOW_COUNT, GOLD_CLASS, ALL_CLASSES, 0 };
  628. X  
  629. X  int
  630. X***************
  631. X*** 60,66 ****
  632. X  #ifdef OVL0
  633. X  
  634. X  /* Called when a boulder is dropped, thrown, or pushed.  If it ends up
  635. X!  * in a pool, it either fills the pool up or sinks away.  In either case, 
  636. X   * it's gone for good...  If the destination is not a pool, returns FALSE.
  637. X   */
  638. X  boolean
  639. X--- 60,66 ----
  640. X  #ifdef OVL0
  641. X  
  642. X  /* Called when a boulder is dropped, thrown, or pushed.  If it ends up
  643. X!  * in a pool, it either fills the pool up or sinks away.  In either case,
  644. X   * it's gone for good...  If the destination is not a pool, returns FALSE.
  645. X   */
  646. X  boolean
  647. X***************
  648. X*** 95,111 ****
  649. X          }
  650. X          }
  651. X          if (!fills_up || !pushing) {    /* splashing occurs */
  652. X!         if (pushing ? !Blind : cansee(rx,ry))
  653. X!             pline("There is a large splash as %s %s the %s.",
  654. X!             the(xname(otmp)), fills_up ? "fills" : "falls into",
  655. X!             lava ? "lava" : ltyp==POOL ? "pool" : "moat");
  656. X!         else if (flags.soundok)
  657. X!             You("hear a%s splash.", lava ? " sizzling" : "");
  658. X!         wake_nearby();
  659. X  
  660. X          if (fills_up && u.uinwater && distu(rx,ry) == 0) {
  661. X-             You("find yourself on dry land again!");
  662. X              u.uinwater = 0;
  663. X          } else if (lava && distu(rx,ry) <= 2) {
  664. X              You("are hit by molten lava%c",
  665. X              Fire_resistance ? '.' : '!');
  666. X--- 95,119 ----
  667. X          }
  668. X          }
  669. X          if (!fills_up || !pushing) {    /* splashing occurs */
  670. X!         if (!u.uinwater) {
  671. X!             if (pushing ? !Blind : cansee(rx,ry)) {
  672. X!             boolean moat = (ltyp != WATER) &&
  673. X!                 !Is_medusa_level(&u.uz) && !Is_waterlevel(&u.uz);
  674. X  
  675. X+             pline("There is a large splash as %s %s the %s.",
  676. X+                   the(xname(otmp)), fills_up? "fills":"falls into",
  677. X+                   lava ? "lava" : ltyp==POOL ? "pool" :
  678. X+                   moat ? "moat" : "water");
  679. X+             } else if (flags.soundok)
  680. X+             You("hear a%s splash.", lava ? " sizzling" : "");
  681. X+             wake_nearby();
  682. X+         }
  683. X+ 
  684. X          if (fills_up && u.uinwater && distu(rx,ry) == 0) {
  685. X              u.uinwater = 0;
  686. X+             docrt();
  687. X+             vision_full_recalc = 1;
  688. X+             You("find yourself on dry land again!");
  689. X          } else if (lava && distu(rx,ry) <= 2) {
  690. X              You("are hit by molten lava%c",
  691. X              Fire_resistance ? '.' : '!');
  692. X***************
  693. X*** 136,141 ****
  694. X--- 144,152 ----
  695. X  {
  696. X      struct trap *t;
  697. X  
  698. X+     /* make sure things like water_damage() have no pointers to follow */
  699. X+     obj->nobj = obj->nexthere = (struct obj *)0;
  700. X+ 
  701. X      if (obj->otyp == BOULDER && boulder_hits_pool(obj, x, y, FALSE))
  702. X          return TRUE;
  703. X      else if (obj->otyp == BOULDER && (t = t_at(x,y)) != 0 &&
  704. X***************
  705. X*** 149,170 ****
  706. X              (u.utrap && x==u.ux && y==u.uy)) {
  707. X              /* u.utrap = 0;     /* player remains trapped. See trap.c */
  708. X              if (*verb)
  709. X!             pline("The boulder %ss into the pit%s.", verb, 
  710. X!                   (mtmp)? "" : " with you");
  711. X              if (mtmp) {
  712. X              if (!passes_walls(mtmp->data) && !throws_rocks(mtmp->data))
  713. X                  if (hmon(mtmp, obj, TRUE))
  714. X!                     return FALSE;            /* still alive */
  715. X                  else
  716. X                      delallobj(x, y);  /* treasure, corpse */
  717. X              } else
  718. X  #ifdef POLYSELF
  719. X!                 if (!passes_walls(uasmon) && !throws_rocks(uasmon))
  720. X  #endif
  721. X              {
  722. X!                    losehp(rnd(15), "squished under a boulder",
  723. X!                              NO_KILLER_PREFIX);
  724. X!                        return FALSE;
  725. X              }
  726. X          }
  727. X          if (*verb) {
  728. X--- 160,181 ----
  729. X              (u.utrap && x==u.ux && y==u.uy)) {
  730. X              /* u.utrap = 0;     /* player remains trapped. See trap.c */
  731. X              if (*verb)
  732. X!             pline("The boulder %ss into the pit%s.", verb,
  733. X!                 (mtmp) ? "" : " with you");
  734. X              if (mtmp) {
  735. X              if (!passes_walls(mtmp->data) && !throws_rocks(mtmp->data))
  736. X                  if (hmon(mtmp, obj, TRUE))
  737. X!                     return FALSE;      /* still alive */
  738. X                  else
  739. X                      delallobj(x, y);  /* treasure, corpse */
  740. X              } else
  741. X  #ifdef POLYSELF
  742. X!             if (!passes_walls(uasmon) && !throws_rocks(uasmon))
  743. X  #endif
  744. X              {
  745. X!                 losehp(rnd(15), "squished under a boulder",
  746. X!                     NO_KILLER_PREFIX);
  747. X!                 return FALSE;
  748. X              }
  749. X          }
  750. X          if (*verb) {
  751. X***************
  752. X*** 175,183 ****
  753. X                      You("hear the boulder %s.", verb);
  754. X              } else if (cansee(x, y)) {
  755. X                  pline("The boulder %sfills a %s.",
  756. X!                       t->tseen ? "" : "triggers and ",
  757. X!                       t->ttyp == TRAPDOOR ? 
  758. X!                       "trap door" : "pit");
  759. X              }
  760. X          }
  761. X          deltrap(t);
  762. X--- 186,194 ----
  763. X                      You("hear the boulder %s.", verb);
  764. X              } else if (cansee(x, y)) {
  765. X                  pline("The boulder %sfills a %s.",
  766. X!                      t->tseen ? "" : "triggers and ",
  767. X!                      t->ttyp == TRAPDOOR ?
  768. X!                      "trap door" : "pit");
  769. X              }
  770. X          }
  771. X          deltrap(t);
  772. X***************
  773. X*** 184,189 ****
  774. X--- 195,202 ----
  775. X          obfree(obj, (struct obj *)0);
  776. X          newsym(x,y);
  777. X          return TRUE;
  778. X+     } else if (is_pool(x, y)) {
  779. X+         water_damage(obj, FALSE, FALSE);
  780. X      }
  781. X      return FALSE;
  782. X  }
  783. X***************
  784. X*** 198,207 ****
  785. X      if (Blind) return;
  786. X      if (obj->blessed || obj->cursed) {
  787. X          pline("There is %s flash as %s hit%s the altar.",
  788. X!               an(Hallucination ? hcolor() :
  789. X!              obj->blessed ? amber : Black),
  790. X!               doname(obj),
  791. X!               (obj->quan == 1L) ? "s" : "");
  792. X          if (!Hallucination) obj->bknown = 1;
  793. X      } else {
  794. X          pline("%s land%s on the altar.", Doname2(obj),
  795. X--- 211,220 ----
  796. X      if (Blind) return;
  797. X      if (obj->blessed || obj->cursed) {
  798. X          pline("There is %s flash as %s hit%s the altar.",
  799. X!             an(Hallucination ? hcolor() :
  800. X!                 obj->blessed ? amber : Black),
  801. X!             doname(obj),
  802. X!             (obj->quan == 1L) ? "s" : "");
  803. X          if (!Hallucination) obj->bknown = 1;
  804. X      } else {
  805. X          pline("%s land%s on the altar.", Doname2(obj),
  806. X***************
  807. X*** 231,240 ****
  808. X--- 244,259 ----
  809. X      register boolean ideed = TRUE;
  810. X  
  811. X      You("drop %s down the drain.", doname(obj));
  812. X+ #ifndef NO_SIGNAL
  813. X+     obj->in_use = TRUE;    /* block free identification via interrupt */
  814. X+ #endif
  815. X      switch(obj->otyp) {    /* effects that can be noticed without eyes */
  816. X          case RIN_SEARCHING:
  817. X          You("thought your %s got lost in the sink, but there it is!",
  818. X              xname(obj));
  819. X+ #ifndef NO_SIGNAL
  820. X+         obj->in_use = FALSE;
  821. X+ #endif
  822. X          dropx(obj);
  823. X          trycall(obj);
  824. X          return;
  825. X***************
  826. X*** 339,344 ****
  827. X--- 358,366 ----
  828. X          You("hear the ring bouncing down the drainpipe.");
  829. X      if (!rn2(20)) {
  830. X          pline("The sink backs up, leaving %s.", doname(obj));
  831. X+ #ifndef NO_SIGNAL
  832. X+         obj->in_use = FALSE;
  833. X+ #endif
  834. X          dropx(obj);
  835. X      }
  836. X      else
  837. X***************
  838. X*** 356,362 ****
  839. X  register const char *word;
  840. X  {
  841. X      if(obj->owornmask & (W_ARMOR | W_RING | W_AMUL | W_TOOL)){
  842. X!            if (*word)
  843. X              Norep("You cannot %s something you are wearing.",word);
  844. X          return(FALSE);
  845. X      }
  846. X--- 378,384 ----
  847. X  register const char *word;
  848. X  {
  849. X      if(obj->owornmask & (W_ARMOR | W_RING | W_AMUL | W_TOOL)){
  850. X!         if (*word)
  851. X              Norep("You cannot %s something you are wearing.",word);
  852. X          return(FALSE);
  853. X      }
  854. X***************
  855. X*** 380,386 ****
  856. X      }
  857. X  #ifdef WALKIES
  858. X      if (obj->otyp == LEASH && obj->leashmon != 0) {
  859. X!            if (*word)
  860. X              pline ("The leash is tied around your %s.",
  861. X                      body_part(HAND));
  862. X          return(FALSE);
  863. X--- 402,408 ----
  864. X      }
  865. X  #ifdef WALKIES
  866. X      if (obj->otyp == LEASH && obj->leashmon != 0) {
  867. X!         if (*word)
  868. X              pline ("The leash is tied around your %s.",
  869. X                      body_part(HAND));
  870. X          return(FALSE);
  871. X***************
  872. X*** 412,417 ****
  873. X--- 434,447 ----
  874. X          return(1);
  875. X      }
  876. X  #endif
  877. X+     if (Levitation && !(Is_airlevel(&u.uz) || Is_waterlevel(&u.uz) ||
  878. X+                 is_pool(u.ux, u.uy) || u.uswallow)) {
  879. X+         if(flags.verbose) You("drop %s.", doname(obj));
  880. X+         if (obj->otyp != GOLD_PIECE) freeinv(obj);
  881. X+         (void) snuff_candle(obj);
  882. X+         hitfloor(obj);
  883. X+         return(1);
  884. X+     }
  885. X      if (IS_ALTAR(levl[u.ux][u.uy].typ) && !u.uswallow) {
  886. X          doaltarobj(obj);    /* set bknown */
  887. X      } else
  888. X***************
  889. X*** 429,435 ****
  890. X      if (obj->otyp != GOLD_PIECE) freeinv(obj);
  891. X      (void) snuff_candle(obj);
  892. X      if(!u.uswallow && obj != uball &&
  893. X!                   ship_object(obj, u.ux, u.uy, FALSE)) return;
  894. X      dropy(obj);
  895. X  }
  896. X  
  897. X--- 459,465 ----
  898. X      if (obj->otyp != GOLD_PIECE) freeinv(obj);
  899. X      (void) snuff_candle(obj);
  900. X      if(!u.uswallow && obj != uball &&
  901. X!               ship_object(obj, u.ux, u.uy, FALSE)) return;
  902. X      dropy(obj);
  903. X  }
  904. X  
  905. X***************
  906. X*** 483,489 ****
  907. X  #ifdef OVL2
  908. X  
  909. X  /* on a ladder, used in goto_level */
  910. X! static boolean NEARDATA at_ladder = FALSE;
  911. X  
  912. X  int
  913. X  dodown()
  914. X--- 513,519 ----
  915. X  #ifdef OVL2
  916. X  
  917. X  /* on a ladder, used in goto_level */
  918. X! static NEARDATA boolean at_ladder = FALSE;
  919. X  
  920. X  int
  921. X  dodown()
  922. X***************
  923. X*** 516,522 ****
  924. X          You("are standing at the gate to Gehennom.");
  925. X          pline("Unspeakable cruelty and harm lurk down there.");
  926. X          if (yn("Are you sure you want to enter?") != 'y')
  927. X!              return(0);
  928. X          else pline("So be it.");
  929. X          u.uevent.gehennom_entered = 1;    /* don't ask again */
  930. X      }
  931. X--- 546,552 ----
  932. X          You("are standing at the gate to Gehennom.");
  933. X          pline("Unspeakable cruelty and harm lurk down there.");
  934. X          if (yn("Are you sure you want to enter?") != 'y')
  935. X!             return(0);
  936. X          else pline("So be it.");
  937. X          u.uevent.gehennom_entered = 1;    /* don't ask again */
  938. X      }
  939. X***************
  940. X*** 546,552 ****
  941. X           && (!xupladder || u.ux != xupladder || u.uy != yupladder)
  942. X           && (!sstairs.sx || u.ux != sstairs.sx || u.uy != sstairs.sy
  943. X              || !sstairs.up)
  944. X!        ) {
  945. X          You("can't go up here.");
  946. X          return(0);
  947. X      }
  948. X--- 576,582 ----
  949. X           && (!xupladder || u.ux != xupladder || u.uy != yupladder)
  950. X           && (!sstairs.sx || u.ux != sstairs.sx || u.uy != sstairs.sy
  951. X              || !sstairs.up)
  952. X!       ) {
  953. X          You("can't go up here.");
  954. X          return(0);
  955. X      }
  956. X***************
  957. X*** 557,563 ****
  958. X      if(near_capacity() > SLT_ENCUMBER) {
  959. X          /* No levitation check; inv_weight() already allows for it */
  960. X          Your("load is too heavy to climb the %s.",
  961. X!               levl[u.ux][u.uy].typ == STAIRS ? "stairs" : "ladder");
  962. X          return(1);
  963. X      }
  964. X      if(ledger_no(&u.uz) == 1) {
  965. X--- 587,593 ----
  966. X      if(near_capacity() > SLT_ENCUMBER) {
  967. X          /* No levitation check; inv_weight() already allows for it */
  968. X          Your("load is too heavy to climb the %s.",
  969. X!             levl[u.ux][u.uy].typ == STAIRS ? "stairs" : "ladder");
  970. X          return(1);
  971. X      }
  972. X      if(ledger_no(&u.uz) == 1) {
  973. X***************
  974. X*** 584,589 ****
  975. X--- 614,623 ----
  976. X  {
  977. X      register int fd;
  978. X  
  979. X+     /* since level change might be a bit slow, flush any buffered screen
  980. X+      *  output (like "you fall through a trapdoor") */
  981. X+     mark_synch();
  982. X+ 
  983. X      fd = create_levelfile(ledger_no(&u.uz));
  984. X  
  985. X      if(fd < 0) {
  986. X***************
  987. X*** 636,643 ****
  988. X  badspot(x, y)
  989. X  register xchar x, y;
  990. X  {
  991. X!         return((levl[x][y].typ != ROOM && levl[x][y].typ != AIR &&
  992. X!                  levl[x][y].typ != CORR) || MON_AT(x, y));
  993. X  }
  994. X  */
  995. X  
  996. X--- 670,677 ----
  997. X  badspot(x, y)
  998. X  register xchar x, y;
  999. X  {
  1000. X!     return((levl[x][y].typ != ROOM && levl[x][y].typ != AIR &&
  1001. X!              levl[x][y].typ != CORR) || MON_AT(x, y));
  1002. X  }
  1003. X  */
  1004. X  
  1005. X***************
  1006. X*** 653,716 ****
  1007. X      int new = 0;    /* made a new level? */
  1008. X  #endif
  1009. X  
  1010. X!     if(dunlev(newlevel) > dunlevs_in_dungeon(newlevel))
  1011. X!             newlevel->dlevel = dunlevs_in_dungeon(newlevel);
  1012. X!     if(newdungeon && In_endgame(newlevel)) { /* 1st Endgame Level !!! */
  1013. X!             if(u.uhave.amulet) 
  1014. X              assign_level(newlevel, &earth_level);
  1015. X!             else return;
  1016. X      }
  1017. X!     if(ledger_no(newlevel) <= 0)
  1018. X!             done(ESCAPED);    /* in fact < 0 is impossible */
  1019. X      /* If you have the amulet and are trying to get out of Hell, going
  1020. X       * up a set of stairs sometimes does some very strange things!
  1021. X       */
  1022. X!     if(Inhell && up && !newdungeon && u.uhave.amulet &&
  1023. X!                    (dunlev(&u.uz) < dunlevs_in_dungeon(&u.uz)-3)) {
  1024. X!             if(!rn2(4)) {
  1025. X!             if(!u.ualign.type) {            /* neutral */
  1026. X!                 if(rn2(2)) assign_level(newlevel, &u.uz);
  1027. X!                 else assign_rnd_level(newlevel, &u.uz, rnd(3));
  1028. X!             } else if(u.ualign.type == A_LAWFUL) {    /* lawful */
  1029. X              assign_rnd_level(newlevel, &u.uz, rnd(3));
  1030. X!             } else assign_level(newlevel, &u.uz); /* chaotic */
  1031. X!             }
  1032. X!         pline("A mysterious force momentarily surrounds you...");
  1033. X!             if(ledger_no(newlevel) < 1) assign_level(newlevel, &u.uz);
  1034. X!             if(on_level(newlevel, &u.uz)) {
  1035. X!             (void) safe_teleds();
  1036. X  #ifdef WALKIES
  1037. X!             (void) next_to_u();
  1038. X  #endif
  1039. X!             return;
  1040. X          }
  1041. X      }
  1042. X  #ifdef MULDGN
  1043. X! /*    Prevent the player from going past the first quest level unless
  1044. X!  *    (s)he has been given the go-ahead by the leader.
  1045. X!  */
  1046. X!     if(on_level(&u.uz, &qstart_level) && !newdungeon && !ok_to_quest()) {
  1047. X  
  1048. X          pline("A mysterious force prevents you from descending.");
  1049. X          return;
  1050. X      }
  1051. X  #endif
  1052. X!     if(on_level(newlevel, &u.uz)) return;          /* this can happen */
  1053. X  
  1054. X      fd = currentlevel_rewrite();
  1055. X!     if(fd < 0) return;
  1056. X  
  1057. X      if (falling) /* assuming this is only trapdoor */
  1058. X          impact_drop((struct obj *)0, u.ux, u.uy, newlevel->dlevel);
  1059. X  
  1060. X      check_special_room(TRUE);        /* probably was a trap door */
  1061. X!     if(Punished) unplacebc();
  1062. X      u.utrap = 0;                /* needed in level_tele */
  1063. X      fill_pit(u.ux, u.uy);
  1064. X      u.ustuck = 0;                /* idem */
  1065. X      u.uinwater = 0;
  1066. X      keepdogs();
  1067. X!     if(u.uswallow)                /* idem */
  1068. X          u.uswldtim = u.uswallow = 0;
  1069. X      /*
  1070. X       *  We no longer see anything on the level.  Make sure that this
  1071. X--- 687,749 ----
  1072. X      int new = 0;    /* made a new level? */
  1073. X  #endif
  1074. X  
  1075. X!     if (dunlev(newlevel) > dunlevs_in_dungeon(newlevel))
  1076. X!         newlevel->dlevel = dunlevs_in_dungeon(newlevel);
  1077. X!     if (newdungeon && In_endgame(newlevel)) { /* 1st Endgame Level !!! */
  1078. X!         if (u.uhave.amulet)
  1079. X              assign_level(newlevel, &earth_level);
  1080. X!         else return;
  1081. X      }
  1082. X!     if (ledger_no(newlevel) <= 0)
  1083. X!         done(ESCAPED);    /* in fact < 0 is impossible */
  1084. X      /* If you have the amulet and are trying to get out of Hell, going
  1085. X       * up a set of stairs sometimes does some very strange things!
  1086. X       */
  1087. X!     if (Inhell && up && !newdungeon && u.uhave.amulet &&
  1088. X!                 (dunlev(&u.uz) < dunlevs_in_dungeon(&u.uz)-3)) {
  1089. X!         if (!rn2(4)) {
  1090. X!             if (u.ualign.type == A_CHAOTIC ||
  1091. X!                 (u.ualign.type == A_NEUTRAL && rn2(2)))
  1092. X!             assign_level(newlevel, &u.uz);
  1093. X!             else
  1094. X              assign_rnd_level(newlevel, &u.uz, rnd(3));
  1095. X! 
  1096. X!             pline("A mysterious force momentarily surrounds you...");
  1097. X!             if (on_level(newlevel, &u.uz)) {
  1098. X!             (void) safe_teleds();
  1099. X  #ifdef WALKIES
  1100. X!             (void) next_to_u();
  1101. X  #endif
  1102. X!             return;
  1103. X!             }
  1104. X          }
  1105. X      }
  1106. X  #ifdef MULDGN
  1107. X!     /* Prevent the player from going past the first quest level unless
  1108. X!      * (s)he has been given the go-ahead by the leader.
  1109. X!      */
  1110. X!     if (on_level(&u.uz, &qstart_level) && !newdungeon && !ok_to_quest()) {
  1111. X  
  1112. X          pline("A mysterious force prevents you from descending.");
  1113. X          return;
  1114. X      }
  1115. X  #endif
  1116. X!     if (on_level(newlevel, &u.uz)) return;        /* this can happen */
  1117. X  
  1118. X      fd = currentlevel_rewrite();
  1119. X!     if (fd < 0) return;
  1120. X  
  1121. X      if (falling) /* assuming this is only trapdoor */
  1122. X          impact_drop((struct obj *)0, u.ux, u.uy, newlevel->dlevel);
  1123. X  
  1124. X      check_special_room(TRUE);        /* probably was a trap door */
  1125. X!     if (Punished) unplacebc();
  1126. X      u.utrap = 0;                /* needed in level_tele */
  1127. X      fill_pit(u.ux, u.uy);
  1128. X      u.ustuck = 0;                /* idem */
  1129. X      u.uinwater = 0;
  1130. X      keepdogs();
  1131. X!     if (u.uswallow)                /* idem */
  1132. X          u.uswldtim = u.uswallow = 0;
  1133. X      /*
  1134. X       *  We no longer see anything on the level.  Make sure that this
  1135. X***************
  1136. X*** 730,736 ****
  1137. X      assign_level(&u.uz, newlevel);
  1138. X      assign_level(&u.utolev, newlevel);
  1139. X      u.utotype = 0;
  1140. X!     if(dunlev_reached(&u.uz) < dunlev(&u.uz))
  1141. X          dunlev_reached(&u.uz) = dunlev(&u.uz);
  1142. X  
  1143. X      /* set default level change destination areas */
  1144. X--- 763,769 ----
  1145. X      assign_level(&u.uz, newlevel);
  1146. X      assign_level(&u.utolev, newlevel);
  1147. X      u.utotype = 0;
  1148. X!     if (dunlev_reached(&u.uz) < dunlev(&u.uz))
  1149. X          dunlev_reached(&u.uz) = dunlev(&u.uz);
  1150. X  
  1151. X      /* set default level change destination areas */
  1152. X***************
  1153. X*** 738,744 ****
  1154. X      (void) memset((genericptr_t) &updest, 0, sizeof updest);
  1155. X      (void) memset((genericptr_t) &dndest, 0, sizeof dndest);
  1156. X  
  1157. X!     if(In_endgame(&u.uz) ||
  1158. X  #ifdef MFLOPPY
  1159. X          /* If the level has no .where yet, it hasn't been made */
  1160. X          !fileinfo[ledger_no(&u.uz)].where) {
  1161. X--- 771,777 ----
  1162. X      (void) memset((genericptr_t) &updest, 0, sizeof updest);
  1163. X      (void) memset((genericptr_t) &dndest, 0, sizeof dndest);
  1164. X  
  1165. X!     if (In_endgame(&u.uz) ||
  1166. X  #ifdef MFLOPPY
  1167. X          /* If the level has no .where yet, it hasn't been made */
  1168. X          !fileinfo[ledger_no(&u.uz)].where) {
  1169. X***************
  1170. X*** 763,791 ****
  1171. X          getlev(fd, hackpid, ledger_no(&u.uz), FALSE);
  1172. X          (void) close(fd);
  1173. X      }
  1174. X- #ifdef MULDGN
  1175. X-     quest_init();    /* re-initialize */
  1176. X- #endif
  1177. X  
  1178. X!     if(portal && !In_endgame(&u.uz)) {
  1179. X          /* find the portal on the new level */
  1180. X          register struct trap *ttrap;
  1181. X  
  1182. X!         for(ttrap = ftrap; ttrap; ttrap = ttrap->ntrap)
  1183. X!         if(ttrap->ttyp == MAGIC_PORTAL) break;
  1184. X  
  1185. X!         if(ttrap) {
  1186. X!         u.ux = ttrap->tx;
  1187. X!         u.uy = ttrap->ty;
  1188. X!         } else panic("goto_level: no corresponding portal!");
  1189. X!     } else if(at_stairs && !In_endgame(&u.uz)) {
  1190. X!         if(up) {
  1191. X!         if(at_ladder) {
  1192. X              u.ux = xdnladder;
  1193. X              u.uy = ydnladder;
  1194. X          } else {
  1195. X!             if(newdungeon) {
  1196. X!             if(Is_stronghold(&u.uz)) {
  1197. X                  register xchar x, y;
  1198. X  
  1199. X                  do {
  1200. X--- 796,820 ----
  1201. X          getlev(fd, hackpid, ledger_no(&u.uz), FALSE);
  1202. X          (void) close(fd);
  1203. X      }
  1204. X  
  1205. X!     if (portal && !In_endgame(&u.uz)) {
  1206. X          /* find the portal on the new level */
  1207. X          register struct trap *ttrap;
  1208. X  
  1209. X!         for (ttrap = ftrap; ttrap; ttrap = ttrap->ntrap)
  1210. X!         if (ttrap->ttyp == MAGIC_PORTAL) break;
  1211. X  
  1212. X!         if (!ttrap) panic("goto_level: no corresponding portal!");
  1213. X!         u.ux = ttrap->tx;
  1214. X!         u.uy = ttrap->ty;
  1215. X!     } else if (at_stairs && !In_endgame(&u.uz)) {
  1216. X!         if (up) {
  1217. X!         if (at_ladder) {
  1218. X              u.ux = xdnladder;
  1219. X              u.uy = ydnladder;
  1220. X          } else {
  1221. X!             if (newdungeon) {
  1222. X!             if (Is_stronghold(&u.uz)) {
  1223. X                  register xchar x, y;
  1224. X  
  1225. X                  do {
  1226. X***************
  1227. X*** 797,865 ****
  1228. X                  u.uy = y;
  1229. X              } else u_on_sstairs();
  1230. X              } else u_on_dnstairs();
  1231. X!         } 
  1232. X!         /* Remove bug which crashes with */ 
  1233. X!         /* levitation/punishment  KAA    */
  1234. X!         if(Punished) {
  1235. X!             if(!Levitation)
  1236. X              pline("With great effort you climb the %s.",
  1237. X!                   !at_ladder ? "stairs" : "ladder");
  1238. X!             placebc();
  1239. X!         } 
  1240. X!         if(at_ladder && (!Punished || Levitation))
  1241. X              You("climb up the ladder.");
  1242. X!         } else { /* down */
  1243. X!         if(at_ladder) {
  1244. X              u.ux = xupladder;
  1245. X              u.uy = yupladder;
  1246. X          } else {
  1247. X!             if(newdungeon) u_on_sstairs();
  1248. X              else u_on_upstairs();
  1249. X          }
  1250. X!         if(at_stairs && u.dz && !up &&
  1251. X!            ((near_capacity()>UNENCUMBERED) || Punished || Fumbling)) {
  1252. X!             You("fall down the %s.",
  1253. X!             !at_ladder ? "stairs" : "ladder");
  1254. X!             if(Punished) {
  1255. X              drag_down();
  1256. X!             if(carried(uball)) {
  1257. X                  if (uwep == uball)
  1258. X                  setuwep((struct obj *)0);
  1259. X!                 if (uwep != uball)
  1260. X!                 freeinv(uball);
  1261. X              }
  1262. X!             placebc();
  1263. X!             } 
  1264. X              losehp(rnd(3), "falling downstairs", KILLED_BY);
  1265. X              selftouch("Falling, you");
  1266. X!         } 
  1267. X!         else if(at_ladder && u.dz)
  1268. X              You("climb down the ladder.");
  1269. X          }
  1270. X!     } else { /* trap door or level_tele or In_endgame */
  1271. X!         if(up)
  1272. X          place_lregion(updest.lx, updest.ly,
  1273. X!                   updest.hx, updest.hy,
  1274. X!                   updest.nlx, updest.nly,
  1275. X!                   updest.nhx, updest.nhy,
  1276. X!                   LR_UPTELE, (d_level *) 0);
  1277. X          else
  1278. X          place_lregion(dndest.lx, dndest.ly,
  1279. X!                   dndest.hx, dndest.hy,
  1280. X!                   dndest.nlx, dndest.nly,
  1281. X!                   dndest.nhx, dndest.nhy,
  1282. X!                   LR_DOWNTELE, (d_level *) 0);
  1283. X!         if(Punished) {
  1284. X!         if(falling) ballfall();
  1285. X!         placebc();
  1286. X!         }
  1287. X!         if(falling)
  1288. X          selftouch("Falling, you");
  1289. X      }
  1290. X  
  1291. X      losedogs();
  1292. X      obj_delivery();
  1293. X-     check_special_room(FALSE);
  1294. X  
  1295. X      initrack();
  1296. X  
  1297. X--- 826,884 ----
  1298. X                  u.uy = y;
  1299. X              } else u_on_sstairs();
  1300. X              } else u_on_dnstairs();
  1301. X!         }
  1302. X!         /* Remove bug which crashes with levitation/punishment  KAA */
  1303. X!         if (Punished && !Levitation) {
  1304. X              pline("With great effort you climb the %s.",
  1305. X!                 at_ladder ? "ladder" : "stairs");
  1306. X!         } else if (at_ladder)
  1307. X              You("climb up the ladder.");
  1308. X!         } else {    /* down */
  1309. X!         if (at_ladder) {
  1310. X              u.ux = xupladder;
  1311. X              u.uy = yupladder;
  1312. X          } else {
  1313. X!             if (newdungeon) u_on_sstairs();
  1314. X              else u_on_upstairs();
  1315. X          }
  1316. X!         if (u.dz &&
  1317. X!             (near_capacity() > UNENCUMBERED || Punished || Fumbling)) {
  1318. X!             You("fall down the %s.", at_ladder ? "ladder" : "stairs");
  1319. X!             if (Punished) {
  1320. X              drag_down();
  1321. X!             if (carried(uball)) {
  1322. X                  if (uwep == uball)
  1323. X                  setuwep((struct obj *)0);
  1324. X!                 freeinv(uball);
  1325. X              }
  1326. X!             }
  1327. X              losehp(rnd(3), "falling downstairs", KILLED_BY);
  1328. X              selftouch("Falling, you");
  1329. X!         } else if (u.dz && at_ladder)
  1330. X              You("climb down the ladder.");
  1331. X          }
  1332. X!     } else {    /* trap door or level_tele or In_endgame */
  1333. X!         if (up)
  1334. X          place_lregion(updest.lx, updest.ly,
  1335. X!                 updest.hx, updest.hy,
  1336. X!                 updest.nlx, updest.nly,
  1337. X!                 updest.nhx, updest.nhy,
  1338. X!                 LR_UPTELE, (d_level *) 0);
  1339. X          else
  1340. X          place_lregion(dndest.lx, dndest.ly,
  1341. X!                 dndest.hx, dndest.hy,
  1342. X!                 dndest.nlx, dndest.nly,
  1343. X!                 dndest.nhx, dndest.nhy,
  1344. X!                 LR_DOWNTELE, (d_level *) 0);
  1345. X!         if (falling) {
  1346. X!         if (Punished) ballfall();
  1347. X          selftouch("Falling, you");
  1348. X+         }
  1349. X      }
  1350. X  
  1351. X+     if (Punished) placebc();
  1352. X      losedogs();
  1353. X      obj_delivery();
  1354. X  
  1355. X      initrack();
  1356. X  
  1357. X***************
  1358. X*** 878,895 ****
  1359. X      vision_reset();        /* reset the blockages */
  1360. X      docrt();        /* does a full vision recalc */
  1361. X  
  1362. X      /* In Nethack 3.1, Gehennom starts after the stronghold.  Moreover,
  1363. X       * there are traps in the stronghold, that can send the player
  1364. X       * to Gehennom (gnark, gnark)!  So we have to test here:
  1365. X       */
  1366. X      if(!In_hell(&u.uz0) && Inhell) {
  1367. X!             if(Is_valley(newlevel)) {
  1368. X          You("arrive at the Valley of the Dead...");
  1369. X!             pline("There is a smell of burnt flesh and decay here.");
  1370. X  #ifdef MICRO
  1371. X!             display_nhwindow(WIN_MESSAGE, FALSE);
  1372. X  #endif
  1373. X!         pline("The sounds of groans and moans fill the air.");
  1374. X          } else pline("It is hot here.  You smell smoke...");
  1375. X      }
  1376. X  
  1377. X--- 897,917 ----
  1378. X      vision_reset();        /* reset the blockages */
  1379. X      docrt();        /* does a full vision recalc */
  1380. X  
  1381. X+     /* give room entrance message, if any */
  1382. X+     check_special_room(FALSE);
  1383. X+ 
  1384. X      /* In Nethack 3.1, Gehennom starts after the stronghold.  Moreover,
  1385. X       * there are traps in the stronghold, that can send the player
  1386. X       * to Gehennom (gnark, gnark)!  So we have to test here:
  1387. X       */
  1388. X      if(!In_hell(&u.uz0) && Inhell) {
  1389. X!         if(Is_valley(newlevel)) {
  1390. X          You("arrive at the Valley of the Dead...");
  1391. X!         pline("The odor of burnt flesh and decay pervades the air.");
  1392. X  #ifdef MICRO
  1393. X!         display_nhwindow(WIN_MESSAGE, FALSE);
  1394. X  #endif
  1395. X!         You("hear groans and moans everywhere.");
  1396. X          } else pline("It is hot here.  You smell smoke...");
  1397. X      }
  1398. X  
  1399. X***************
  1400. X*** 898,904 ****
  1401. X       *  Move all plines beyond the screen reset.
  1402. X       */
  1403. X      if (new && Is_rogue_level(&u.uz))
  1404. X!      You("have entered what appears to be an older, more primitive world.");
  1405. X  #endif
  1406. X      /* Final confrontation */
  1407. X      if (In_endgame(&u.uz) && newdungeon && u.uhave.amulet &&
  1408. X--- 920,926 ----
  1409. X       *  Move all plines beyond the screen reset.
  1410. X       */
  1411. X      if (new && Is_rogue_level(&u.uz))
  1412. X!         You("enter what seems to be an older, more primitive world.");
  1413. X  #endif
  1414. X      /* Final confrontation */
  1415. X      if (In_endgame(&u.uz) && newdungeon && u.uhave.amulet &&
  1416. X***************
  1417. X*** 912,930 ****
  1418. X          com_pager(2);    /* the message from the leader */
  1419. X  
  1420. X      if(Is_knox(&u.uz)) {
  1421. X!             register struct monst *mtmp;
  1422. X  
  1423. X!             You("penetrated a high security area!");
  1424. X          pline("An alarm sounds!");
  1425. X!         for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) 
  1426. X              if(mtmp->msleep) mtmp->msleep = 0;
  1427. X      }
  1428. X  #endif /* MULDGN */
  1429. X      if(on_level(&u.uz, &astral_level)) {
  1430. X!             register struct monst *mtmp;
  1431. X  
  1432. X!             /* reset monster hostility relative to player */
  1433. X!         for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) 
  1434. X              reset_hostility(mtmp);
  1435. X  
  1436. X          /* create some player-monsters */
  1437. X--- 934,952 ----
  1438. X          com_pager(2);    /* the message from the leader */
  1439. X  
  1440. X      if(Is_knox(&u.uz)) {
  1441. X!         register struct monst *mtmp;
  1442. X  
  1443. X!         You("penetrated a high security area!");
  1444. X          pline("An alarm sounds!");
  1445. X!         for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
  1446. X              if(mtmp->msleep) mtmp->msleep = 0;
  1447. X      }
  1448. X  #endif /* MULDGN */
  1449. X      if(on_level(&u.uz, &astral_level)) {
  1450. X!         register struct monst *mtmp;
  1451. X  
  1452. X!         /* reset monster hostility relative to player */
  1453. X!         for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
  1454. X              reset_hostility(mtmp);
  1455. X  
  1456. X          /* create some player-monsters */
  1457. X***************
  1458. X*** 934,980 ****
  1459. X          if (Conflict) {
  1460. X              coord mm;
  1461. X              int i = rnd(4);
  1462. X!     pline("A voice booms: \"Thy desire for conflict shall be rewarded!\"");
  1463. X              while(i--) {
  1464. X              mm.x = u.ux;
  1465. X              mm.y = u.uy;
  1466. X              if(enexto(&mm, mm.x, mm.y, &mons[PM_ANGEL]))
  1467. X                  (void) mk_roamer(&mons[PM_ANGEL], u.ualign.type,
  1468. X!                          mm.x, mm.y, FALSE);
  1469. X              }
  1470. X  
  1471. X!         } else if(u.ualign.record > 3) {
  1472. X              coord mm;
  1473. X  
  1474. X          pline("A voice whispers: \"Thou hast been worthy of me!\"");
  1475. X              mm.x = u.ux;
  1476. X              mm.y = u.uy;
  1477. X!             if(enexto(&mm, mm.x, mm.y, &mons[PM_ANGEL])) {
  1478. X!             if((mtmp = mk_roamer(&mons[PM_ANGEL], u.ualign.type,
  1479. X                         mm.x, mm.y, TRUE)) != 0) {
  1480. X!                  register struct obj *otmp =
  1481. X!                                mksobj(SILVER_SABER, FALSE, FALSE);
  1482. X  
  1483. X!                  if(!Blind)
  1484. X!                          pline("An angel appears near you.");
  1485. X!                  else 
  1486. X!                You("feel the presence of a friendly angel near you.");
  1487. X                  /* guardian angel -- the one case mtame doesn't
  1488. X                   * imply an edog structure, so we don't want to
  1489. X                   * call tamedog().
  1490. X                   */
  1491. X!                  mtmp->mtame = 10;
  1492. X!                  /* make him strong enough vs. endgame foes */
  1493. X!                  mtmp->m_lev = rn1(8,15);
  1494. X!                  mtmp->mhp = mtmp->mhpmax = 
  1495. X!                        d((int)mtmp->m_lev,10) + 30 + rnd(30);
  1496. X!                  bless(otmp);
  1497. X!                  otmp->spe = 7;
  1498. X!                  mpickobj(mtmp, otmp);
  1499. X!                 }
  1500. X              }
  1501. X          }
  1502. X!         }
  1503. X  
  1504. X  #ifdef MULDGN
  1505. X      onquest();
  1506. X--- 956,1002 ----
  1507. X          if (Conflict) {
  1508. X              coord mm;
  1509. X              int i = rnd(4);
  1510. X!     pline("A voice booms: \"Thy desire for conflict shall be fulfilled!\"");
  1511. X              while(i--) {
  1512. X              mm.x = u.ux;
  1513. X              mm.y = u.uy;
  1514. X              if(enexto(&mm, mm.x, mm.y, &mons[PM_ANGEL]))
  1515. X                  (void) mk_roamer(&mons[PM_ANGEL], u.ualign.type,
  1516. X!                         mm.x, mm.y, FALSE);
  1517. X              }
  1518. X  
  1519. X!         } else if(u.ualign.record > 8 /* fervent */) {
  1520. X              coord mm;
  1521. X  
  1522. X          pline("A voice whispers: \"Thou hast been worthy of me!\"");
  1523. X              mm.x = u.ux;
  1524. X              mm.y = u.uy;
  1525. X!             if (enexto(&mm, mm.x, mm.y, &mons[PM_ANGEL])) {
  1526. X!             if ((mtmp = mk_roamer(&mons[PM_ANGEL], u.ualign.type,
  1527. X                         mm.x, mm.y, TRUE)) != 0) {
  1528. X!                 register struct obj *otmp =
  1529. X!                        mksobj(SILVER_SABER, FALSE, FALSE);
  1530. X  
  1531. X!                 if (!Blind)
  1532. X!                 pline("An angel appears near you.");
  1533. X!                 else
  1534. X!             You("feel the presence of a friendly angel near you.");
  1535. X                  /* guardian angel -- the one case mtame doesn't
  1536. X                   * imply an edog structure, so we don't want to
  1537. X                   * call tamedog().
  1538. X                   */
  1539. X!                 mtmp->mtame = 10;
  1540. X!                 /* make him strong enough vs. endgame foes */
  1541. X!                 mtmp->m_lev = rn1(8,15);
  1542. X!                 mtmp->mhp = mtmp->mhpmax =
  1543. X!                     d((int)mtmp->m_lev,10) + 30 + rnd(30);
  1544. X!                 bless(otmp);
  1545. X!                 otmp->spe = 7;
  1546. X!                 mpickobj(mtmp, otmp);
  1547. X!             }
  1548. X              }
  1549. X          }
  1550. X!     }
  1551. X  
  1552. X  #ifdef MULDGN
  1553. X      onquest();
  1554. X***************
  1555. X*** 1101,1106 ****
  1556. X--- 1123,1129 ----
  1557. X      } else if(obj->cobj && Is_container(obj) && obj->otyp != ICE_BOX)
  1558. X          remove_cadavers(&obj->cobj);
  1559. X      /* pobj is only used for containers, which don't allow revive() -dlc */
  1560. X+     /* and for monster inventory (special cases only) under MUSE */
  1561. X      if (obj) pobj = obj;
  1562. X      }
  1563. X  }
  1564. X***************
  1565. X*** 1136,1142 ****
  1566. X  dowipe()
  1567. X  {
  1568. X      if(u.ucreamed)  {
  1569. X!         static char NEARDATA buf[39];
  1570. X  
  1571. X          Sprintf(buf, "wiping off your %s", body_part(FACE));
  1572. X          set_occupation(wipeoff, buf, 0);
  1573. X--- 1159,1165 ----
  1574. X  dowipe()
  1575. X  {
  1576. X      if(u.ucreamed)  {
  1577. X!         static NEARDATA char buf[39];
  1578. X  
  1579. X          Sprintf(buf, "wiping off your %s", body_part(FACE));
  1580. X          set_occupation(wipeoff, buf, 0);
  1581. X*** /tmp/da08109    Thu Feb 25 10:22:39 1993
  1582. X--- src/do_name.c    Tue Feb 23 09:59:57 1993
  1583. X***************
  1584. X*** 1,4 ****
  1585. X! /*    SCCS Id: @(#)do_name.c    3.1    92/12/29    */
  1586. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1587. X  /* NetHack may be freely redistributed.  See license for details. */
  1588. X  
  1589. X--- 1,4 ----
  1590. X! /*    SCCS Id: @(#)do_name.c    3.1    93/02/22    */
  1591. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1592. X  /* NetHack may be freely redistributed.  See license for details. */
  1593. X  
  1594. X***************
  1595. X*** 29,34 ****
  1596. X--- 29,37 ----
  1597. X  #endif
  1598. X      curs(WIN_MAP, cx,cy);
  1599. X      flush_screen(0);
  1600. X+ #ifdef MAC
  1601. X+     lock_mouse_cursor(TRUE);
  1602. X+ #endif
  1603. X      while((c = nh_poskey(&tx, &ty, &sidx)) != '.') {
  1604. X          if(c == '\033') {
  1605. X              cc->x = -10;
  1606. X***************
  1607. X*** 86,93 ****
  1608. X              loopback:
  1609. X              for (ty = lasty; ty < ROWNO; ty++) {
  1610. X                  for (tx = lastx; tx < COLNO; tx++) {
  1611. X!                 if ((IS_POOL(levl[tx][ty].typ) ||
  1612. X!                      IS_FURNITURE(levl[tx][ty].typ)) &&
  1613. X       defsyms[sidx].sym == defsyms[glyph_to_cmap(levl[tx][ty].glyph)].sym) {
  1614. X                      cx = tx;
  1615. X                      lastx = tx+1;
  1616. X--- 89,95 ----
  1617. X              loopback:
  1618. X              for (ty = lasty; ty < ROWNO; ty++) {
  1619. X                  for (tx = lastx; tx < COLNO; tx++) {
  1620. X!                 if (glyph_is_cmap(levl[tx][ty].glyph) &&
  1621. X       defsyms[sidx].sym == defsyms[glyph_to_cmap(levl[tx][ty].glyph)].sym) {
  1622. X                      cx = tx;
  1623. X                      lastx = tx+1;
  1624. X***************
  1625. X*** 127,132 ****
  1626. X--- 129,137 ----
  1627. X      curs(WIN_MAP,cx,cy);
  1628. X      flush_screen(0);
  1629. X      }
  1630. X+ #ifdef MAC
  1631. X+     lock_mouse_cursor(FALSE);
  1632. X+ #endif
  1633. X      cc->x = cx;
  1634. X      cc->y = cy;
  1635. X      return;
  1636. X***************
  1637. X*** 198,204 ****
  1638. X      Sprintf(qbuf, "What do you want to call %s?", x_monnam(mtmp, 0,
  1639. X          (char *)0, 1));
  1640. X      getlin(qbuf,buf);
  1641. X-     clear_nhwindow(WIN_MESSAGE);
  1642. X      if(!*buf || *buf == '\033') return(0);
  1643. X  
  1644. X      /* unnames monster if all spaces */
  1645. X--- 203,208 ----
  1646. X***************
  1647. X*** 226,232 ****
  1648. X  
  1649. X      Sprintf(qbuf, "What do you want to name %s?", doname(obj));
  1650. X      getlin(qbuf, buf);
  1651. X-     clear_nhwindow(WIN_MESSAGE);
  1652. X      if(!*buf || *buf == '\033')    return;
  1653. X  
  1654. X      /* strip trailing spaces; unnames item if all spaces */
  1655. X--- 230,235 ----
  1656. X***************
  1657. X*** 314,320 ****
  1658. X      return otmp2;
  1659. X  }
  1660. X  
  1661. X! static const char NEARDATA callable[] = {
  1662. X      SCROLL_CLASS, POTION_CLASS, WAND_CLASS, RING_CLASS, AMULET_CLASS,
  1663. X      GEM_CLASS, SPBOOK_CLASS, ARMOR_CLASS, TOOL_CLASS, 0 };
  1664. X  
  1665. X--- 317,323 ----
  1666. X      return otmp2;
  1667. X  }
  1668. X  
  1669. X! static NEARDATA const char callable[] = {
  1670. X      SCROLL_CLASS, POTION_CLASS, WAND_CLASS, RING_CLASS, AMULET_CLASS,
  1671. X      GEM_CLASS, SPBOOK_CLASS, ARMOR_CLASS, TOOL_CLASS, 0 };
  1672. X  
  1673. X***************
  1674. X*** 380,386 ****
  1675. X      } else
  1676. X          Sprintf(qbuf, "Call %s:", an(xname(&otemp)));
  1677. X      getlin(qbuf, buf);
  1678. X-     clear_nhwindow(WIN_MESSAGE);
  1679. X      if(!*buf || *buf == '\033')
  1680. X          return;
  1681. X  
  1682. X--- 383,388 ----
  1683. X***************
  1684. X*** 453,459 ****
  1685. X          return name;
  1686. X      }
  1687. X      if(!canseemon(mtmp) && !sensemon(mtmp) &&
  1688. X!                     !(u.uswallow && mtmp == u.ustuck)) {
  1689. X          if(!mtmp->wormno || (mtmp != m_at(bhitpos.x, bhitpos.y)) ||
  1690. X             !(cansee(bhitpos.x, bhitpos.y) && mon_visible(mtmp))) {
  1691. X          Strcpy(buf, "it");
  1692. X--- 455,461 ----
  1693. X          return name;
  1694. X      }
  1695. X      if(!canseemon(mtmp) && !sensemon(mtmp) &&
  1696. X!                 !(u.uswallow && mtmp == u.ustuck) && !killer) {
  1697. X          if(!mtmp->wormno || (mtmp != m_at(bhitpos.x, bhitpos.y)) ||
  1698. X             !(cansee(bhitpos.x, bhitpos.y) && mon_visible(mtmp))) {
  1699. X          Strcpy(buf, "it");
  1700. X***************
  1701. X*** 478,484 ****
  1702. X          Strcat(buf, adjective);
  1703. X          Strcat(buf, " ");
  1704. X      }
  1705. X!     if (mtmp->minvis)
  1706. X          Strcat(buf, "invisible ");
  1707. X      if (name && !called) {
  1708. X          Strcat(buf, name);
  1709. X--- 480,486 ----
  1710. X          Strcat(buf, adjective);
  1711. X          Strcat(buf, " ");
  1712. X      }
  1713. X!     if (mtmp->minvis && !Blind)
  1714. X          Strcat(buf, "invisible ");
  1715. X      if (name && !called) {
  1716. X          Strcat(buf, name);
  1717. X***************
  1718. X*** 579,585 ****
  1719. X      return(bp);
  1720. X  }
  1721. X  
  1722. X! static const char NEARDATA *bogusmons[] = {
  1723. X      "jumbo shrimp", "giant pigmy", "gnu", "killer penguin", 
  1724. X      "giant cockroach", "giant slug", "maggot", "pterodactyl",
  1725. X      "tyrannosaurus rex", "basilisk", "beholder", "nightmare",
  1726. X--- 581,587 ----
  1727. X      return(bp);
  1728. X  }
  1729. X  
  1730. X! static NEARDATA const char *bogusmons[] = {
  1731. X      "jumbo shrimp", "giant pigmy", "gnu", "killer penguin", 
  1732. X      "giant cockroach", "giant slug", "maggot", "pterodactyl",
  1733. X      "tyrannosaurus rex", "basilisk", "beholder", "nightmare",
  1734. X***************
  1735. X*** 640,646 ****
  1736. X  
  1737. X  #ifdef OVL2
  1738. X  
  1739. X! static const char NEARDATA *hcolors[] = {
  1740. X      "ultraviolet", "infrared", "bluish-orange",
  1741. X      "reddish-green", "dark white", "light black", "sky blue-pink",
  1742. X      "salty", "sweet", "sour", "bitter",
  1743. X--- 642,648 ----
  1744. X  
  1745. X  #ifdef OVL2
  1746. X  
  1747. X! static NEARDATA const char *hcolors[] = {
  1748. X      "ultraviolet", "infrared", "bluish-orange",
  1749. X      "reddish-green", "dark white", "light black", "sky blue-pink",
  1750. X      "salty", "sweet", "sour", "bitter",
  1751. X***************
  1752. X*** 670,676 ****
  1753. X  const char *str;
  1754. X  const char *pronoun;
  1755. X  {
  1756. X!     static char NEARDATA buf[BUFSZ];
  1757. X      register int i;
  1758. X  
  1759. X      for(i=0; pronoun_pairs[i][0]; i++) {
  1760. X--- 672,678 ----
  1761. X  const char *str;
  1762. X  const char *pronoun;
  1763. X  {
  1764. X!     static NEARDATA char buf[BUFSZ];
  1765. X      register int i;
  1766. X  
  1767. X      for(i=0; pronoun_pairs[i][0]; i++) {
  1768. X*** /tmp/da08117    Thu Feb 25 10:22:41 1993
  1769. X--- src/do_wear.c    Wed Feb 17 09:17:12 1993
  1770. X***************
  1771. X*** 6,12 ****
  1772. X  
  1773. X  #ifdef OVLB
  1774. X  
  1775. X! static int NEARDATA todelay;
  1776. X  
  1777. X  #endif /*OVLB */
  1778. X  
  1779. X--- 6,12 ----
  1780. X  
  1781. X  #ifdef OVLB
  1782. X  
  1783. X! static NEARDATA int todelay;
  1784. X  
  1785. X  #endif /*OVLB */
  1786. X  
  1787. X***************
  1788. X*** 16,24 ****
  1789. X  
  1790. X  #else /* OVLB */
  1791. X  
  1792. X! STATIC_OVL long NEARDATA takeoff_mask = 0L, NEARDATA taking_off = 0L;
  1793. X  
  1794. X! static const long NEARDATA takeoff_order[] = { WORN_BLINDF, 1L, /* weapon */
  1795. X      WORN_SHIELD, WORN_GLOVES, LEFT_RING, RIGHT_RING, WORN_CLOAK,
  1796. X      WORN_HELMET, WORN_AMUL, WORN_ARMOR,
  1797. X  #ifdef TOURIST
  1798. X--- 16,24 ----
  1799. X  
  1800. X  #else /* OVLB */
  1801. X  
  1802. X! STATIC_OVL NEARDATA long takeoff_mask = 0L, taking_off = 0L;
  1803. X  
  1804. X! static NEARDATA const long takeoff_order[] = { WORN_BLINDF, 1L, /* weapon */
  1805. X      WORN_SHIELD, WORN_GLOVES, LEFT_RING, RIGHT_RING, WORN_CLOAK,
  1806. X      WORN_HELMET, WORN_AMUL, WORN_ARMOR,
  1807. X  #ifdef TOURIST
  1808. X***************
  1809. X*** 220,226 ****
  1810. X          }
  1811. X          break;
  1812. X      case OILSKIN_CLOAK:
  1813. X!         pline("The %s fits very tightly.",xname(uarmc));
  1814. X          break;
  1815. X      default: impossible("Unknown type of cloak (%d)", uarmc->otyp);
  1816. X      }
  1817. X--- 220,226 ----
  1818. X          }
  1819. X          break;
  1820. X      case OILSKIN_CLOAK:
  1821. X!         pline("%s fits very tightly.",The(xname(uarmc)));
  1822. X          break;
  1823. X      default: impossible("Unknown type of cloak (%d)", uarmc->otyp);
  1824. X      }
  1825. X***************
  1826. X*** 774,781 ****
  1827. X      multi = 0;
  1828. X  }
  1829. X  
  1830. X! static const char NEARDATA clothes[] = {ARMOR_CLASS, 0};
  1831. X! static const char NEARDATA accessories[] = {RING_CLASS, AMULET_CLASS, TOOL_CLASS, 0};
  1832. X  
  1833. X  int
  1834. X  dotakeoff()
  1835. X--- 774,781 ----
  1836. X      multi = 0;
  1837. X  }
  1838. X  
  1839. X! static NEARDATA const char clothes[] = {ARMOR_CLASS, 0};
  1840. X! static NEARDATA const char accessories[] = {RING_CLASS, AMULET_CLASS, TOOL_CLASS, 0};
  1841. X  
  1842. X  int
  1843. X  dotakeoff()
  1844. X***************
  1845. X*** 1120,1126 ****
  1846. X  }
  1847. X  
  1848. X  int
  1849. X! doputon() {
  1850. X      register struct obj *otmp;
  1851. X      long mask = 0L;
  1852. X  
  1853. X--- 1120,1127 ----
  1854. X  }
  1855. X  
  1856. X  int
  1857. X! doputon()
  1858. X! {
  1859. X      register struct obj *otmp;
  1860. X      long mask = 0L;
  1861. X  
  1862. X
  1863. END_OF_FILE
  1864. if test 52704 -ne `wc -c <'patches01b'`; then
  1865.     echo shar: \"'patches01b'\" unpacked with wrong size!
  1866. fi
  1867. # end of 'patches01b'
  1868. echo shar: End of archive 16 \(of 31\).
  1869. cp /dev/null ark16isdone
  1870. MISSING=""
  1871. 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
  1872.     if test ! -f ark${I}isdone ; then
  1873.     MISSING="${MISSING} ${I}"
  1874.     fi
  1875. done
  1876. if test "${MISSING}" = "" ; then
  1877.     echo You have unpacked all 31 archives.
  1878.     echo "Now execute 'patchit.sh'"
  1879.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1880. else
  1881.     echo You still need to unpack the following archives:
  1882.     echo "        " ${MISSING}
  1883. fi
  1884. ##  End of shell archive.
  1885. exit 0
  1886.