[rec.games.hack] Nethack 2.3 Bug fixed + Announce

jcc@axis.UUCP (07/09/88)

Hi folks,

	My last posting before I take a few holydays...

	1) Not really a bug except if you have implemented the GRAPHIC code
	   I posted a few weeks ago....
	   I noticed that zapping a wand of digging at a corner of a room
	   had no effect. So I tracked the bug in zap.c and found that there
	   was a test with HWALL & VWALL (instead of using the IS_WALL macro).
	   I searched through the whole sources and found 2 more (in apply.c
	   and in hack.c ). Even if you have'nt the GRAPHIC code the patches
	   make the code cleaner ( and may fixed future bugs :-) ).
	   The patches are at the end of this file.

	2) I worked on the "sacrifice" code in order to make it not so easy
	   to win the jackpot (hand of El*th). Here are the principles of my
	   implementation :

		- You can make sacrifice only on ALTARS (#).
		  (incompatible with kitchen sinks, but who cares ? :-) )

		- There are blessed, neutral and cursed ALTARS.
		  (not getting the same effects...).

		- You can only sacrifice dead monsters (the harder to kill,
		  the better the reward).

	
	  What I wish now, is to get some remarks or ideas about those
	  altars in order to make them smarter before posting the patches.
	  So I'm waiting for suggestions. Please by EMAIL ( remember, I will
	  be on holydays....)

Happy hacking,
jcc
-------------------------------------------------------------------------------
jcc@axis.fr             ! "An artificial intelligence is better than none !"
..!mcvax!inria!axis!jcc ! "Artificial intelligence matches natural stupidity !"
Collet jean-christophe  ! "Objets inanimes avez vous donc une ame ?"
-------------------------------------------------------------------------------
	Axis Digital        |
	135 rue d'aguesseau |       <this space left intentionaly blank>
	92100 Boulogne      |
	France              |
-------------------------------------------------------------------------------

------ CUT HERE --- CUT HERE --- CUT HERE --- CUT HERE --- CUT HERE ------
*** apply.c.old	Fri Jul  8 17:10:59 1988
--- apply.c	Fri Jul  8 17:12:12 1988
***************
*** 1000,1007
  		} else if(!lev->typ || lev->typ == SCORR) {
  			lev->typ = CORR;
  			digtxt = "You succeeded in cutting away some rock.";
! 		} else if(lev->typ == HWALL || lev->typ == VWALL
! 					    || lev->typ == SDOOR) {
  			lev->typ = xdnstair ? DOOR : ROOM;
  			digtxt = "You just made an opening in the wall.";
  		} else

--- 1000,1006 -----
  		} else if(!lev->typ || lev->typ == SCORR) {
  			lev->typ = CORR;
  			digtxt = "You succeeded in cutting away some rock.";
! 		} else if(IS_WALL(lev->typ) || lev->typ == SDOOR) {
  			lev->typ = xdnstair ? DOOR : ROOM;
  			digtxt = "You just made an opening in the wall.";
  		} else
*** hack.c.old	Fri Jul  8 17:19:16 1988
--- hack.c	Fri Jul  8 17:19:28 1988
***************
*** 689,697
  		{
  		register uchar sym = levl[x][y].scrsym;
  
! 		if (sym == VWALL_SYM || sym == HWALL_SYM
! 		    || sym == ROOM_SYM || sym == STONE_SYM
! 		    || IS_CORNER(sym))
  			continue;
  		else if (sym == DOOR_SYM) {
  			if(x != u.ux && y != u.uy) continue;

--- 689,696 -----
  		{
  		register uchar sym = levl[x][y].scrsym;
  
! 		if (IS_WALL(levl[x][y].typ)
! 		    || sym == ROOM_SYM || sym == STONE_SYM)
  			continue;
  		else if (sym == DOOR_SYM) {
  			if(x != u.ux && y != u.uy) continue;
*** zap.c.old	Fri Jul  8 17:04:58 1988
--- zap.c	Fri Jul  8 17:07:48 1988
***************
*** 568,575
  					if(zx < 3 || zx > COLNO-3 ||
  					    zy < 3 || zy > ROWNO-3)
  						break;
! 					if(room->typ == HWALL ||
! 					    room->typ == VWALL){
  						room->typ = ROOM;
  						break;
  					}

--- 568,574 -----
  					if(zx < 3 || zx > COLNO-3 ||
  					    zy < 3 || zy > ROWNO-3)
  						break;
! 					if(IS_WALL(room->typ)){
  						room->typ = ROOM;
  						break;
  					}
***************
*** 574,580
  						break;
  					}
  				} else
! 				if(room->typ == HWALL || room->typ == VWALL ||
  				   room->typ == SDOOR || room->typ == LDOOR){
  					room->typ = DOOR;
  					digdepth -= 2;

--- 573,579 -----
  						break;
  					}
  				} else
! 				if(IS_WALL(room->typ)  ||
  				   room->typ == SDOOR || room->typ == LDOOR){
  					room->typ = DOOR;
  					digdepth -= 2;

------ CUT HERE --- CUT HERE --- CUT HERE --- CUT HERE --- CUT HERE ------