home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume1 / rogue / patch2 < prev    next >
Encoding:
Internet Message Format  |  1987-06-13  |  24.5 KB

  1. Path: seismo!husc6!hao!ames!ll-xn!mit-eddie!uw-beaver!tektronix!tekgen!tekred!games-request
  2. From: games-request@tekred.TEK.COM
  3. Newsgroups: comp.sources.games
  4. Subject: v01i052:  rogue - rogue 5.3 clone, Patch2
  5. Message-ID: <1304@tekred.TEK.COM>
  6. Date: 12 Jun 87 21:46:33 GMT
  7. Sender: billr@tekred.TEK.COM
  8. Lines: 982
  9. Approved: billr@tekred.TEK.COM
  10.  
  11. Submitted by: tims@zeus.TEK.COM (Tim Stoehr)
  12. Comp.sources.games: Volume 1, Issue 52
  13. Archive-name: rogue/Patch2
  14.  
  15.     [This is the official patch#2 for the rogue clone previously
  16.      posted to comp.sources.games.  As in Patch1, this posting
  17.      has two files: Tim's original list of changes (for those
  18.      wanting to do it by hand or wanting to check things out)
  19.      and a set of diffs suitable for the 'patch' program.  The
  20.      diffs rely on Patches01 being previously applied.  -br]
  21.  
  22. #! /bin/sh
  23. # This is a shell archive.  Remove anything before this line, then unpack
  24. # it by saving it into a file and typing "sh file".  To overwrite existing
  25. # files, type "sh file -c".  You can also feed this as standard input via
  26. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  27. # will see the following message at the end:
  28. #        "End of shell archive."
  29. # Contents:  Bugs2 Patches02
  30. # Wrapped by billr@tekred on Fri Jun 12 14:41:14 1987
  31. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  32. if test -f Bugs2 -a "${1}" != "-c" ; then 
  33.   echo shar: Will not over-write existing file \"Bugs2\"
  34. else
  35. echo shar: Extracting \"Bugs2\" \(2652 characters\)
  36. sed "s/^X//" >Bugs2 <<'END_OF_Bugs2'
  37. XHere is a second list of fixes for bugs and non-portable items found in my
  38. Xrogue clone.  Many thanks to those who reported the problems, I would
  39. Xappreciate any further reports, particularly if the stuff below does
  40. Xnot fix what it is intended to fix.
  41. X
  42. X            Tim Stoehr
  43. X            tims@zeus.TEK.COM
  44. X    ----------------------------------------------------
  45. X
  46. X 1.)    Change SCROLL and SCROLLS to SCROL and SCROLS respectively
  47. X        throughout the code.  This is to avoid conflicts with
  48. X        some curses stuff.  If your compiler doesn't complain, you
  49. X        probably don't have to worry about this.
  50. X
  51. X 2.)    Change ALL occurences of the symbol 'UP' to 'UPWARD'.  This prevents
  52. X        the definition in rogue.h from clashing with the curses definition.
  53. X
  54. X 3.)    There may be a nested comment around line 41 in machdep.c.
  55. X        Nuke it.
  56. X
  57. X 4.)    In zap.c, a new version of tele_away() was sent out.  That version
  58. X        needs to have the global variable 'detect_monster' added to the
  59. X        list of extern booleans at the top of zap.c, if it is not already
  60. X        there.
  61. X
  62. X 5.)    In message.c, at the bottom of the routine message(), there is code
  63. X        that looks like:
  64. X
  65. X        if (did_int) {
  66. X            onintr();
  67. X        }
  68. X        cant_int = 0;
  69. X
  70. X        It should look like the following:
  71. X
  72. X        cant_int = 0;
  73. X        if (did_int) {
  74. X            did_int = 0;
  75. X            onintr();
  76. X        }
  77. X
  78. X 6.)   In machdep.c, the routine md_slurp() shoud be changed to what is
  79. X       shown below, otherwise, messages get screwed up on UNIX_BSD4_2.
  80. X       Only the BSD4_2 portion needs to be changed.
  81. X
  82. Xmd_slurp()
  83. X{
  84. X    long ln = 0;
  85. X
  86. X#ifdef UNIX_BSD4_2
  87. X    ioctl(0, FIONREAD, &ln);
  88. X#endif
  89. X#ifdef UNIX_SYSV
  90. X    ioctl(0, TCFLSH, &ln);
  91. X    ln = 0;
  92. X#endif
  93. X
  94. X    ln += stdin->_cnt;
  95. X
  96. X    for (; ln > 0; ln--) {
  97. X        (void) getchar();
  98. X    }
  99. X}
  100. X
  101. X 7.)   In monster.c, in the table m_names near the top of the file,
  102. X       change "aquatar" to "aquator" and "quasit" to "quagga."
  103. X
  104. X 8.)   References to curses internals should be removed for the sake
  105. X       of portability/compatibility.
  106. X
  107. X       In score.c, in the routine quit(), change these two lines:
  108. X
  109. X        orow = curscr->_cury;
  110. X        ocol = curscr->_curx;
  111. X
  112. X        to:
  113. X
  114. X        orow = rogue.row;
  115. X        ocol = rogue.col;
  116. X
  117. X
  118. X        And in message.c, in the routine save_screen(), remove these lines
  119. X        which appear at the beginning of the routine:
  120. X
  121. X        row = curscr->_cury;
  122. X        col = curscr->_curx;
  123. X
  124. X        and remove these lines which appear at the bottom of the routine:
  125. X
  126. X        move(row, col);
  127. X        refresh();
  128. X
  129. X        You can also them remove the local variables, row and col.
  130. END_OF_Bugs2
  131. if test 2652 -ne `wc -c <Bugs2`; then
  132.     echo shar: \"Bugs2\" unpacked with wrong size!
  133. fi
  134. # end of overwriting check
  135. fi
  136. if test -f Patches02 -a "${1}" != "-c" ; then 
  137.   echo shar: Will not over-write existing file \"Patches02\"
  138. else
  139. echo shar: Extracting \"Patches02\" \(19425 characters\)
  140. sed "s/^X//" >Patches02 <<'END_OF_Patches02'
  141. X*** hit.c.orig    Fri May 29 14:20:03 1987
  142. X--- hit.c    Fri Jun 12 13:39:57 1987
  143. X***************
  144. X*** 13,19 ****
  145. X  #include "rogue.h"
  146. X  
  147. X  object *fight_monster = 0;
  148. X- boolean detect_monster;
  149. X  char hit_message[80] = "";
  150. X  
  151. X  extern short halluc, blind, cur_level;
  152. X--- 13,18 ----
  153. X*** inventory.c.orig    Fri May 29 14:20:35 1987
  154. X--- inventory.c    Fri Jun 12 13:12:14 1987
  155. X***************
  156. X*** 184,190 ****
  157. X      short i, j, n;
  158. X      short sylls, s;
  159. X  
  160. X!     for (i = 0; i < SCROLLS; i++) {
  161. X          sylls = get_rand(2, 5);
  162. X          (void) strcpy(id_scrolls[i].title, "'");
  163. X  
  164. X--- 184,190 ----
  165. X      short i, j, n;
  166. X      short sylls, s;
  167. X  
  168. X!     for (i = 0; i < SCROLS; i++) {
  169. X          sylls = get_rand(2, 5);
  170. X          (void) strcpy(id_scrolls[i].title, "'");
  171. X  
  172. X***************
  173. X*** 250,256 ****
  174. X      case UNIDENTIFIED:
  175. X  CHECK:
  176. X          switch(obj->what_is) {
  177. X!         case SCROLL:
  178. X              (void) strcat(desc, item_name);
  179. X              (void) strcat(desc, "entitled: ");
  180. X              (void) strcat(desc, id_table[obj->which_kind].title);
  181. X--- 250,256 ----
  182. X      case UNIDENTIFIED:
  183. X  CHECK:
  184. X          switch(obj->what_is) {
  185. X!         case SCROL:
  186. X              (void) strcat(desc, item_name);
  187. X              (void) strcat(desc, "entitled: ");
  188. X              (void) strcat(desc, id_table[obj->which_kind].title);
  189. X***************
  190. X*** 287,293 ****
  191. X          break;
  192. X      case CALLED:
  193. X  CALL:    switch(obj->what_is) {
  194. X!         case SCROLL:
  195. X          case POTION:
  196. X          case WAND:
  197. X          case RING:
  198. X--- 287,293 ----
  199. X          break;
  200. X      case CALLED:
  201. X  CALL:    switch(obj->what_is) {
  202. X!         case SCROL:
  203. X          case POTION:
  204. X          case WAND:
  205. X          case RING:
  206. X***************
  207. X*** 299,305 ****
  208. X          break;
  209. X      case IDENTIFIED:
  210. X  ID:        switch(obj->what_is) {
  211. X!         case SCROLL:
  212. X          case POTION:
  213. X              (void) strcat(desc, item_name);
  214. X              (void) strcat(desc, id_table[obj->which_kind].real);
  215. X--- 299,305 ----
  216. X          break;
  217. X      case IDENTIFIED:
  218. X  ID:        switch(obj->what_is) {
  219. X!         case SCROL:
  220. X          case POTION:
  221. X              (void) strcat(desc, item_name);
  222. X              (void) strcat(desc, id_table[obj->which_kind].real);
  223. X***************
  224. X*** 419,425 ****
  225. X  object *obj;
  226. X  {
  227. X      switch(obj->what_is) {
  228. X!     case SCROLL:
  229. X          return(id_scrolls);
  230. X      case POTION:
  231. X          return(id_potions);
  232. X--- 419,425 ----
  233. X  object *obj;
  234. X  {
  235. X      switch(obj->what_is) {
  236. X!     case SCROL:
  237. X          return(id_scrolls);
  238. X      case POTION:
  239. X          return(id_potions);
  240. X*** level.c.orig    Fri May 29 14:20:48 1987
  241. X--- level.c    Fri Jun 12 13:13:22 1987
  242. X***************
  243. X*** 275,287 ****
  244. X          dir = RIGHT;
  245. X      } else if (same_col(room1, room2) &&
  246. X          (rooms[room1].top_row > rooms[room2].bottom_row)) {
  247. X!         put_door(&rooms[room1], UP, &row1, &col1);
  248. X          put_door(&rooms[room2], DOWN, &row2, &col2);
  249. X!         dir = UP;
  250. X      } else if (same_col(room1, room2) &&
  251. X          (rooms[room2].top_row > rooms[room1].bottom_row)) {
  252. X          put_door(&rooms[room1], DOWN, &row1, &col1);
  253. X!         put_door(&rooms[room2], UP, &row2, &col2);
  254. X          dir = DOWN;
  255. X      } else {
  256. X          return(0);
  257. X--- 275,287 ----
  258. X          dir = RIGHT;
  259. X      } else if (same_col(room1, room2) &&
  260. X          (rooms[room1].top_row > rooms[room2].bottom_row)) {
  261. X!         put_door(&rooms[room1], UPWARD, &row1, &col1);
  262. X          put_door(&rooms[room2], DOWN, &row2, &col2);
  263. X!         dir = UPWARD;
  264. X      } else if (same_col(room1, room2) &&
  265. X          (rooms[room2].top_row > rooms[room1].bottom_row)) {
  266. X          put_door(&rooms[room1], DOWN, &row1, &col1);
  267. X!         put_door(&rooms[room2], UPWARD, &row2, &col2);
  268. X          dir = DOWN;
  269. X      } else {
  270. X          return(0);
  271. X***************
  272. X*** 337,345 ****
  273. X      wall_width = (rm->is_room & R_MAZE) ? 0 : 1;
  274. X  
  275. X      switch(dir) {
  276. X!     case UP:
  277. X      case DOWN:
  278. X!         *row = ((dir == UP) ? rm->top_row : rm->bottom_row);
  279. X          do {
  280. X              *col = get_rand(rm->left_col+wall_width,
  281. X                  rm->right_col-wall_width);
  282. X--- 337,345 ----
  283. X      wall_width = (rm->is_room & R_MAZE) ? 0 : 1;
  284. X  
  285. X      switch(dir) {
  286. X!     case UPWARD:
  287. X      case DOWN:
  288. X!         *row = ((dir == UPWARD) ? rm->top_row : rm->bottom_row);
  289. X          do {
  290. X              *col = get_rand(rm->left_col+wall_width,
  291. X                  rm->right_col-wall_width);
  292. X***************
  293. X*** 497,503 ****
  294. X                  RIGHT : LEFT;
  295. X          } else {
  296. X              tunnel_dir = (rooms[rn].top_row < rooms[target_room].top_row) ?
  297. X!                 DOWN : UP;
  298. X          }
  299. X          door_dir = ((tunnel_dir + 4) % DIRS);
  300. X          if (rooms[target_room].doors[door_dir/2].oth_room != NO_ROOM) {
  301. X--- 497,503 ----
  302. X                  RIGHT : LEFT;
  303. X          } else {
  304. X              tunnel_dir = (rooms[rn].top_row < rooms[target_room].top_row) ?
  305. X!                 DOWN : UPWARD;
  306. X          }
  307. X          door_dir = ((tunnel_dir + 4) % DIRS);
  308. X          if (rooms[target_room].doors[door_dir/2].oth_room != NO_ROOM) {
  309. X***************
  310. X*** 554,560 ****
  311. X                  RIGHT : LEFT;
  312. X          } else {
  313. X              tunnel_dir = (rooms[rn].top_row < rooms[de].top_row) ?
  314. X!                 DOWN : UP;
  315. X          }
  316. X          draw_simple_passage(srow, scol, drow, dcol, tunnel_dir);
  317. X          r_de = de;
  318. X--- 554,560 ----
  319. X                  RIGHT : LEFT;
  320. X          } else {
  321. X              tunnel_dir = (rooms[rn].top_row < rooms[de].top_row) ?
  322. X!                 DOWN : UPWARD;
  323. X          }
  324. X          draw_simple_passage(srow, scol, drow, dcol, tunnel_dir);
  325. X          r_de = de;
  326. X***************
  327. X*** 588,594 ****
  328. X      char dirs[4];
  329. X      short i, t;
  330. X  
  331. X!     dirs[0] = UP;
  332. X      dirs[1] = DOWN;
  333. X      dirs[2] = LEFT;
  334. X      dirs[3] = RIGHT;
  335. X--- 588,594 ----
  336. X      char dirs[4];
  337. X      short i, t;
  338. X  
  339. X!     dirs[0] = UPWARD;
  340. X      dirs[1] = DOWN;
  341. X      dirs[2] = LEFT;
  342. X      dirs[3] = RIGHT;
  343. X***************
  344. X*** 607,613 ****
  345. X      }
  346. X      for (i = 0; i < 4; i++) {
  347. X          switch(dirs[i]) {
  348. X!         case UP:
  349. X              if (((r-1) >= tr) &&
  350. X                  (dungeon[r-1][c] != TUNNEL) &&
  351. X                  (dungeon[r-1][c-1] != TUNNEL) &&
  352. X--- 607,613 ----
  353. X      }
  354. X      for (i = 0; i < 4; i++) {
  355. X          switch(dirs[i]) {
  356. X!         case UPWARD:
  357. X              if (((r-1) >= tr) &&
  358. X                  (dungeon[r-1][c] != TUNNEL) &&
  359. X                  (dungeon[r-1][c-1] != TUNNEL) &&
  360. X*** machdep.c.orig    Fri Jun 12 13:30:16 1987
  361. X--- machdep.c    Fri Jun 12 13:19:48 1987
  362. X***************
  363. X*** 39,45 ****
  364. X   *      #else
  365. X   *         code;
  366. X   *      #endif /* UNIX_SYSV */
  367. X!  *      }
  368. X   *
  369. X   * Appropriate variations of this are of course acceptible.
  370. X   * The use of "#elseif" is discouraged because of non-portability.
  371. X--- 39,45 ----
  372. X   *      #else
  373. X   *         code;
  374. X   *      #endif /* UNIX_SYSV */
  375. X! /*      }
  376. X   *
  377. X   * Appropriate variations of this are of course acceptible.
  378. X   * The use of "#elseif" is discouraged because of non-portability.
  379. X***************
  380. X*** 82,97 ****
  381. X  
  382. X  md_slurp()
  383. X  {
  384. X!     long ln;
  385. X  
  386. X  #ifdef UNIX_BSD4_2
  387. X!     ioctl(0, TIOCFLUSH, &ln);
  388. X  #endif /* UNIX_BSD4_2 */
  389. X  #ifdef UNIX_SYSV
  390. X      ioctl(0, TCFLSH, &ln);
  391. X  #endif /* UNIX_SYSV */
  392. X  
  393. X!     for (ln = stdin->_cnt; ln > 0; ln--) {
  394. X          (void) getchar();
  395. X      }
  396. X  }
  397. X--- 82,100 ----
  398. X  
  399. X  md_slurp()
  400. X  {
  401. X!     long ln = 0;
  402. X  
  403. X  #ifdef UNIX_BSD4_2
  404. X!     ioctl(0, FIONREAD, &ln);
  405. X  #endif /* UNIX_BSD4_2 */
  406. X  #ifdef UNIX_SYSV
  407. X      ioctl(0, TCFLSH, &ln);
  408. X+     ln = 0;
  409. X  #endif /* UNIX_SYSV */
  410. X  
  411. X!     ln += stdin->_cnt;
  412. X! 
  413. X!     for (; ln > 0; ln--) {
  414. X          (void) getchar();
  415. X      }
  416. X  }
  417. X*** message.c.orig    Fri May 29 14:21:38 1987
  418. X--- message.c    Fri Jun 12 13:21:44 1987
  419. X***************
  420. X*** 48,57 ****
  421. X      msg_cleared = 0;
  422. X      msg_col = strlen(msg);
  423. X  
  424. X      if (did_int) {
  425. X          onintr();
  426. X      }
  427. X-     cant_int = 0;
  428. X  }
  429. X  
  430. X  remessage()
  431. X--- 48,58 ----
  432. X      msg_cleared = 0;
  433. X      msg_col = strlen(msg);
  434. X  
  435. X+     cant_int = 0;
  436. X      if (did_int) {
  437. X+         did_int = 0;
  438. X          onintr();
  439. X      }
  440. X  }
  441. X  
  442. X  remessage()
  443. X***************
  444. X*** 256,268 ****
  445. X  save_screen()
  446. X  {
  447. X      FILE *fp;
  448. X!     short i, j, row, col;
  449. X      char buf[DCOLS+2];
  450. X      boolean found_non_blank;
  451. X  
  452. X-     row = curscr->_cury;
  453. X-     col = curscr->_curx;
  454. X- 
  455. X      if ((fp = fopen("rogue.screen", "w")) != NULL) {
  456. X          for (i = 0; i < DROWS; i++) {
  457. X              found_non_blank = 0;
  458. X--- 257,266 ----
  459. X  save_screen()
  460. X  {
  461. X      FILE *fp;
  462. X!     short i, j;
  463. X      char buf[DCOLS+2];
  464. X      boolean found_non_blank;
  465. X  
  466. X      if ((fp = fopen("rogue.screen", "w")) != NULL) {
  467. X          for (i = 0; i < DROWS; i++) {
  468. X              found_non_blank = 0;
  469. X***************
  470. X*** 282,289 ****
  471. X      } else {
  472. X          sound_bell();
  473. X      }
  474. X-     move(row, col);
  475. X-     refresh();
  476. X  }
  477. X  
  478. X  sound_bell()
  479. X--- 280,285 ----
  480. X*** monster.c.orig    Fri May 29 14:21:49 1987
  481. X--- monster.c    Fri Jun 12 13:23:13 1987
  482. X***************
  483. X*** 16,22 ****
  484. X  boolean mon_disappeared;
  485. X  
  486. X  char *m_names[] = {
  487. X!     "aquatar",
  488. X      "bat",
  489. X      "centaur",
  490. X      "dragon",
  491. X--- 16,22 ----
  492. X  boolean mon_disappeared;
  493. X  
  494. X  char *m_names[] = {
  495. X!     "aquator",
  496. X      "bat",
  497. X      "centaur",
  498. X      "dragon",
  499. X***************
  500. X*** 32,38 ****
  501. X      "nymph",
  502. X      "orc",
  503. X      "phantom",
  504. X!     "quasit",
  505. X      "rattlesnake",
  506. X      "snake",
  507. X      "troll",
  508. X--- 32,38 ----
  509. X      "nymph",
  510. X      "orc",
  511. X      "phantom",
  512. X!     "quagga",
  513. X      "rattlesnake",
  514. X      "snake",
  515. X      "troll",
  516. X***************
  517. X*** 479,485 ****
  518. X      }
  519. X      if (dungeon[row][col] & OBJECT) {
  520. X          obj = object_at(&level_objects, row, col);
  521. X!         if ((obj->what_is == SCROLL) && (obj->which_kind == SCARE_MONSTER)) {
  522. X              return(0);
  523. X          }
  524. X      }
  525. X--- 479,485 ----
  526. X      }
  527. X      if (dungeon[row][col] & OBJECT) {
  528. X          obj = object_at(&level_objects, row, col);
  529. X!         if ((obj->what_is == SCROL) && (obj->which_kind == SCARE_MONSTER)) {
  530. X              return(0);
  531. X          }
  532. X      }
  533. X*** object.c.orig    Fri May 29 14:22:10 1987
  534. X--- object.c    Fri Jun 12 13:24:01 1987
  535. X***************
  536. X*** 50,56 ****
  537. X  {145, "beige \0                          ", "of see invisible ", 0}
  538. X  };
  539. X  
  540. X! struct id id_scrolls[SCROLLS] = {
  541. X  {505, "                                   ", "of protect armor ", 0},
  542. X  {200, "                                   ", "of hold monster ", 0},
  543. X  {235, "                                   ", "of enchant weapon ", 0},
  544. X--- 50,56 ----
  545. X  {145, "beige \0                          ", "of see invisible ", 0}
  546. X  };
  547. X  
  548. X! struct id id_scrolls[SCROLS] = {
  549. X  {505, "                                   ", "of protect armor ", 0},
  550. X  {200, "                                   ", "of hold monster ", 0},
  551. X  {235, "                                   ", "of enchant weapon ", 0},
  552. X***************
  553. X*** 244,250 ****
  554. X      char *retstring;
  555. X  
  556. X      switch(obj->what_is) {
  557. X!     case SCROLL:
  558. X          retstring = obj->quantity > 1 ? "scrolls " : "scroll ";
  559. X          break;
  560. X      case POTION:
  561. X--- 244,250 ----
  562. X      char *retstring;
  563. X  
  564. X      switch(obj->what_is) {
  565. X!     case SCROL:
  566. X          retstring = obj->quantity > 1 ? "scrolls " : "scroll ";
  567. X          break;
  568. X      case POTION:
  569. X***************
  570. X*** 308,314 ****
  571. X          obj->what_is = gr_what_is();
  572. X      }
  573. X      switch(obj->what_is) {
  574. X!     case SCROLL:
  575. X          gr_scroll(obj);
  576. X          break;
  577. X      case POTION:
  578. X--- 308,314 ----
  579. X          obj->what_is = gr_what_is();
  580. X      }
  581. X      switch(obj->what_is) {
  582. X!     case SCROL:
  583. X          gr_scroll(obj);
  584. X          break;
  585. X      case POTION:
  586. X***************
  587. X*** 342,348 ****
  588. X      percent = get_rand(1, 91);
  589. X  
  590. X      if (percent <= 30) {
  591. X!         what_is = SCROLL;
  592. X      } else if (percent <= 60) {
  593. X          what_is = POTION;
  594. X      } else if (percent <= 64) {
  595. X--- 342,348 ----
  596. X      percent = get_rand(1, 91);
  597. X  
  598. X      if (percent <= 30) {
  599. X!         what_is = SCROL;
  600. X      } else if (percent <= 60) {
  601. X          what_is = POTION;
  602. X      } else if (percent <= 64) {
  603. X***************
  604. X*** 366,372 ****
  605. X  
  606. X      percent = get_rand(0, 85);
  607. X  
  608. X!     obj->what_is = SCROLL;
  609. X  
  610. X      if (percent <= 5) {
  611. X          obj->which_kind = PROTECT_ARMOR;
  612. X--- 366,372 ----
  613. X  
  614. X      percent = get_rand(0, 85);
  615. X  
  616. X!     obj->what_is = SCROL;
  617. X  
  618. X      if (percent <= 5) {
  619. X          obj->which_kind = PROTECT_ARMOR;
  620. X***************
  621. X*** 694,701 ****
  622. X          max = POTIONS - 1;
  623. X          break;
  624. X      case '?':
  625. X!         obj->what_is = SCROLL;
  626. X!         max = SCROLLS - 1;
  627. X          break;
  628. X      case ',':
  629. X          obj->what_is = AMULET;
  630. X--- 694,701 ----
  631. X          max = POTIONS - 1;
  632. X          break;
  633. X      case '?':
  634. X!         obj->what_is = SCROL;
  635. X!         max = SCROLS - 1;
  636. X          break;
  637. X      case ',':
  638. X          obj->what_is = AMULET;
  639. X*** pack.c.orig    Fri May 29 14:22:20 1987
  640. X--- pack.c    Fri Jun 12 13:24:32 1987
  641. X***************
  642. X*** 60,66 ****
  643. X      obj = object_at(&level_objects, row, col);
  644. X      *status = 1;
  645. X  
  646. X!     if ((obj->what_is == SCROLL) && (obj->which_kind == SCARE_MONSTER) &&
  647. X          obj->picked_up) {
  648. X          message("the scroll turns to dust as you pick it up", 0);
  649. X          dungeon[row][col] &= (~OBJECT);
  650. X--- 60,66 ----
  651. X      obj = object_at(&level_objects, row, col);
  652. X      *status = 1;
  653. X  
  654. X!     if ((obj->what_is == SCROL) && (obj->which_kind == SCARE_MONSTER) &&
  655. X          obj->picked_up) {
  656. X          message("the scroll turns to dust as you pick it up", 0);
  657. X          dungeon[row][col] &= (~OBJECT);
  658. X***************
  659. X*** 157,163 ****
  660. X  {
  661. X      object *op;
  662. X  
  663. X!     if (!(obj->what_is & (WEAPON | FOOD | SCROLL | POTION))) {
  664. X          return(0);
  665. X      }
  666. X      if ((obj->what_is == FOOD) && (obj->which_kind == FRUIT)) {
  667. X--- 157,163 ----
  668. X  {
  669. X      object *op;
  670. X  
  671. X!     if (!(obj->what_is & (WEAPON | FOOD | SCROL | POTION))) {
  672. X          return(0);
  673. X      }
  674. X      if ((obj->what_is == FOOD) && (obj->which_kind == FRUIT)) {
  675. X***************
  676. X*** 380,386 ****
  677. X      struct id *id_table;
  678. X      char buf[MAX_TITLE_LENGTH+2];
  679. X  
  680. X!     ch = pack_letter("call what?", (SCROLL | POTION | WAND | RING));
  681. X  
  682. X      if (ch == CANCEL) {
  683. X          return;
  684. X--- 380,386 ----
  685. X      struct id *id_table;
  686. X      char buf[MAX_TITLE_LENGTH+2];
  687. X  
  688. X!     ch = pack_letter("call what?", (SCROL | POTION | WAND | RING));
  689. X  
  690. X      if (ch == CANCEL) {
  691. X          return;
  692. X***************
  693. X*** 389,395 ****
  694. X          message("no such item.", 0);
  695. X          return;
  696. X      }
  697. X!     if (!(obj->what_is & (SCROLL | POTION | WAND | RING))) {
  698. X          message("surely you already know what that's called", 0);
  699. X          return;
  700. X      }
  701. X--- 389,395 ----
  702. X          message("no such item.", 0);
  703. X          return;
  704. X      }
  705. X!     if (!(obj->what_is & (SCROL | POTION | WAND | RING))) {
  706. X          message("surely you already know what that's called", 0);
  707. X          return;
  708. X      }
  709. X***************
  710. X*** 450,456 ****
  711. X          (*c == ')') || (*c == ']') || (*c == '/') || (*c == ','))) {
  712. X          switch(*c) {
  713. X          case '?':
  714. X!             *mask = SCROLL;
  715. X              break;
  716. X          case '!':
  717. X              *mask = POTION;
  718. X--- 450,456 ----
  719. X          (*c == ')') || (*c == ']') || (*c == '/') || (*c == ','))) {
  720. X          switch(*c) {
  721. X          case '?':
  722. X!             *mask = SCROL;
  723. X              break;
  724. X          case '!':
  725. X              *mask = POTION;
  726. X*** patchlevel.h.orig    Thu May 28 15:06:56 1987
  727. X--- patchlevel.h    Fri Jun 12 13:24:41 1987
  728. X***************
  729. X*** 1 ****
  730. X! #define PATCHLEVEL 1
  731. X--- 1 ----
  732. X! #define PATCHLEVEL 2
  733. X*** rogue.h.orig    Fri May 29 14:18:42 1987
  734. X--- rogue.h    Fri Jun 12 13:25:27 1987
  735. X***************
  736. X*** 26,32 ****
  737. X  
  738. X  #define ARMOR        ((unsigned short)   01)
  739. X  #define WEAPON        ((unsigned short)   02)
  740. X! #define SCROLL        ((unsigned short)   04)
  741. X  #define POTION        ((unsigned short)  010)
  742. X  #define GOLD        ((unsigned short)  020)
  743. X  #define FOOD        ((unsigned short)  040)
  744. X--- 26,32 ----
  745. X  
  746. X  #define ARMOR        ((unsigned short)   01)
  747. X  #define WEAPON        ((unsigned short)   02)
  748. X! #define SCROL        ((unsigned short)   04)
  749. X  #define POTION        ((unsigned short)  010)
  750. X  #define GOLD        ((unsigned short)  020)
  751. X  #define FOOD        ((unsigned short)  040)
  752. X***************
  753. X*** 68,74 ****
  754. X  #define CREATE_MONSTER 9
  755. X  #define AGGRAVATE_MONSTER 10
  756. X  #define MAGIC_MAPPING 11
  757. X! #define SCROLLS 12
  758. X  
  759. X  #define INCREASE_STRENGTH 0
  760. X  #define RESTORE_STRENGTH 1
  761. X--- 68,74 ----
  762. X  #define CREATE_MONSTER 9
  763. X  #define AGGRAVATE_MONSTER 10
  764. X  #define MAGIC_MAPPING 11
  765. X! #define SCROLS 12
  766. X  
  767. X  #define INCREASE_STRENGTH 0
  768. X  #define RESTORE_STRENGTH 1
  769. X***************
  770. X*** 345,351 ****
  771. X  #define QUIT 4
  772. X  #define WIN 5
  773. X  
  774. X! #define UP 0
  775. X  #define UPRIGHT 1
  776. X  #define RIGHT 2
  777. X  #define RIGHTDOWN 3
  778. X--- 345,351 ----
  779. X  #define QUIT 4
  780. X  #define WIN 5
  781. X  
  782. X! #define UPWARD 0
  783. X  #define UPRIGHT 1
  784. X  #define RIGHT 2
  785. X  #define RIGHTDOWN 3
  786. X*** room.c.orig    Fri May 29 14:22:54 1987
  787. X--- room.c    Fri Jun 12 13:25:59 1987
  788. X***************
  789. X*** 140,146 ****
  790. X  register unsigned short mask;
  791. X  {
  792. X          switch(mask) {
  793. X!         case SCROLL:
  794. X              return('?');
  795. X          case POTION:
  796. X              return('!');
  797. X--- 140,146 ----
  798. X  register unsigned short mask;
  799. X  {
  800. X          switch(mask) {
  801. X!         case SCROL:
  802. X              return('?');
  803. X          case POTION:
  804. X              return('!');
  805. X***************
  806. X*** 404,410 ****
  807. X      short d = -1;
  808. X  
  809. X      if (*row == rooms[rn].top_row) {
  810. X!         d = UP/2;
  811. X      } else if (*row == rooms[rn].bottom_row) {
  812. X          d = DOWN/2;
  813. X      } else if (*col == rooms[rn].left_col) {
  814. X--- 404,410 ----
  815. X      short d = -1;
  816. X  
  817. X      if (*row == rooms[rn].top_row) {
  818. X!         d = UPWARD/2;
  819. X      } else if (*row == rooms[rn].bottom_row) {
  820. X          d = DOWN/2;
  821. X      } else if (*col == rooms[rn].left_col) {
  822. X*** save.c.orig    Fri May 29 14:24:31 1987
  823. X--- save.c    Fri Jun 12 13:26:27 1987
  824. X***************
  825. X*** 92,98 ****
  826. X      r_write(fp, (char *) &rogue, sizeof(fighter));
  827. X      write_pack(&rogue.pack, fp);
  828. X      rw_id(id_potions, fp, POTIONS, 1);
  829. X!     rw_id(id_scrolls, fp, SCROLLS, 1);
  830. X      rw_id(id_wands, fp, WANDS, 1);
  831. X      rw_id(id_rings, fp, RINGS, 1);
  832. X      r_write(fp, (char *) traps, (MAX_TRAPS * sizeof(trap)));
  833. X--- 92,98 ----
  834. X      r_write(fp, (char *) &rogue, sizeof(fighter));
  835. X      write_pack(&rogue.pack, fp);
  836. X      rw_id(id_potions, fp, POTIONS, 1);
  837. X!     rw_id(id_scrolls, fp, SCROLS, 1);
  838. X      rw_id(id_wands, fp, WANDS, 1);
  839. X      rw_id(id_rings, fp, RINGS, 1);
  840. X      r_write(fp, (char *) traps, (MAX_TRAPS * sizeof(trap)));
  841. X***************
  842. X*** 164,170 ****
  843. X      r_read(fp, (char *) &rogue, sizeof(fighter));
  844. X      read_pack(&rogue.pack, fp, 1);
  845. X      rw_id(id_potions, fp, POTIONS, 0);
  846. X!     rw_id(id_scrolls, fp, SCROLLS, 0);
  847. X      rw_id(id_wands, fp, WANDS, 0);
  848. X      rw_id(id_rings, fp, RINGS, 0);
  849. X      r_read(fp, (char *) traps, (MAX_TRAPS * sizeof(trap)));
  850. X--- 164,170 ----
  851. X      r_read(fp, (char *) &rogue, sizeof(fighter));
  852. X      read_pack(&rogue.pack, fp, 1);
  853. X      rw_id(id_potions, fp, POTIONS, 0);
  854. X!     rw_id(id_scrolls, fp, SCROLS, 0);
  855. X      rw_id(id_wands, fp, WANDS, 0);
  856. X      rw_id(id_rings, fp, RINGS, 0);
  857. X      r_read(fp, (char *) traps, (MAX_TRAPS * sizeof(trap)));
  858. X*** score.c.orig    Fri May 29 14:25:01 1987
  859. X--- score.c    Fri Jun 12 13:27:40 1987
  860. X***************
  861. X*** 120,127 ****
  862. X  
  863. X      if (from_intrpt) {
  864. X  
  865. X!         orow = curscr->_cury;
  866. X!         ocol = curscr->_curx;
  867. X          mc = msg_cleared;
  868. X  
  869. X          for (i = 0; i < DCOLS; i++) {
  870. X--- 120,127 ----
  871. X  
  872. X      if (from_intrpt) {
  873. X  
  874. X!         orow = rogue.row;
  875. X!         ocol = rogue.col;
  876. X          mc = msg_cleared;
  877. X  
  878. X          for (i = 0; i < DCOLS; i++) {
  879. X***************
  880. X*** 403,409 ****
  881. X      case WAND:
  882. X          val = id_wands[wc].value * (obj->class + 1);
  883. X          break;
  884. X!     case SCROLL:
  885. X          val = id_scrolls[wc].value * obj->quantity;
  886. X          break;
  887. X      case POTION:
  888. X--- 403,409 ----
  889. X      case WAND:
  890. X          val = id_wands[wc].value * (obj->class + 1);
  891. X          break;
  892. X!     case SCROL:
  893. X          val = id_scrolls[wc].value * obj->quantity;
  894. X          break;
  895. X      case POTION:
  896. X***************
  897. X*** 426,432 ****
  898. X  {
  899. X      short i;
  900. X  
  901. X!     for (i = 0; i < SCROLLS; i++) {
  902. X          id_scrolls[i].id_status = IDENTIFIED;
  903. X      }
  904. X      for (i = 0; i < WEAPONS; i++) {
  905. X--- 426,432 ----
  906. X  {
  907. X      short i;
  908. X  
  909. X!     for (i = 0; i < SCROLS; i++) {
  910. X          id_scrolls[i].id_status = IDENTIFIED;
  911. X      }
  912. X      for (i = 0; i < WEAPONS; i++) {
  913. X*** use.c.orig    Fri May 29 14:25:52 1987
  914. X--- use.c    Fri Jun 12 13:28:05 1987
  915. X***************
  916. X*** 148,154 ****
  917. X      object *obj;
  918. X      char msg[DCOLS];
  919. X  
  920. X!     ch = pack_letter("read what?", SCROLL);
  921. X  
  922. X      if (ch == CANCEL) {
  923. X          return;
  924. X--- 148,154 ----
  925. X      object *obj;
  926. X      char msg[DCOLS];
  927. X  
  928. X!     ch = pack_letter("read what?", SCROL);
  929. X  
  930. X      if (ch == CANCEL) {
  931. X          return;
  932. X***************
  933. X*** 157,163 ****
  934. X          message("no such item.", 0);
  935. X          return;
  936. X      }
  937. X!     if (obj->what_is != SCROLL) {
  938. X          message("you can't read that", 0);
  939. X          return;
  940. X      }
  941. X--- 157,163 ----
  942. X          message("no such item.", 0);
  943. X          return;
  944. X      }
  945. X!     if (obj->what_is != SCROL) {
  946. X          message("you can't read that", 0);
  947. X          return;
  948. X      }
  949. X***************
  950. X*** 336,342 ****
  951. X          goto AGAIN;
  952. X      }
  953. X      obj->identified = 1;
  954. X!     if (obj->what_is & (SCROLL | POTION | WEAPON | ARMOR | WAND | RING)) {
  955. X          id_table = get_id_table(obj);
  956. X          id_table[obj->which_kind].id_status = IDENTIFIED;
  957. X      }
  958. X--- 336,342 ----
  959. X          goto AGAIN;
  960. X      }
  961. X      obj->identified = 1;
  962. X!     if (obj->what_is & (SCROL | POTION | WEAPON | ARMOR | WAND | RING)) {
  963. X          id_table = get_id_table(obj);
  964. X          id_table[obj->which_kind].id_status = IDENTIFIED;
  965. X      }
  966. X*** zap.c.orig    Fri May 29 14:26:04 1987
  967. X--- zap.c    Fri Jun 12 13:29:07 1987
  968. X***************
  969. X*** 14,20 ****
  970. X  
  971. X  boolean wizard = 0;
  972. X  
  973. X! extern boolean being_held, score_only;
  974. X  
  975. X  zapp()
  976. X  {
  977. X--- 14,20 ----
  978. X  
  979. X  boolean wizard = 0;
  980. X  
  981. X! extern boolean being_held, score_only, detect_monster;
  982. X  
  983. X  zapp()
  984. X  {
  985. END_OF_Patches02
  986. if test 19425 -ne `wc -c <Patches02`; then
  987.     echo shar: \"Patches02\" unpacked with wrong size!
  988. fi
  989. # end of overwriting check
  990. fi
  991. echo shar: End of shell archive.
  992. exit 0
  993.