[comp.sources.games.bugs] NetHack2.3 bugs + patches

mwp@mulga.oz (Michael Paddon) (05/24/88)

Patch #1
========

There is a serious bug in NetHack which allows players to get almost
infinite scores (billions of points) with ease. Credit for finding
this goes to one of our local NetHack devotees -- Stuart McCormack.

It seems that when demons try to blackmail you, a negative amount of
gold can be specified as a peace offering. The demon gets mad and
the player gets rich. To do this properly, one must then teleport to
level 0 -- billions of gold pieces will cause even the strongest
player to collapse.

This fix (to mhitu.c) will make this tatic obsolete.


Patch #2
========

The second fix in this posting (to zap.c) addresses a "feature"
which many people here found annoying. Dragons which breathe death
rays can appear around level 8 upwards, and are inevitably deadly at
that stage. In the interests of game playability this fix implements
a saving throw versus experience level and luck when the player
is hit by a death ray (any death ray due the the method of implementing
breath weapons).


Request
=======

It is extremely annoying to die whilw reading a spell book.
Would it not be better to allow the player to react and have
the transcribe fail? Has anyone implemented this?


					Michael Paddon
					==============


*** mhitu.c.orig	Mon May 23 19:30:57 1988
--- mhitu.c	Tue May 24 11:55:16 1988
***************
*** 552,558
  	    getlin(buf);
  	    sscanf(buf, "%d", &offer);
  
! 	    if(offer >= u.ugold) {
  		pline("You give %s all your gold.", xmonnam(mtmp, 0));
  		offer = u.ugold;
  	    } else pline("You give %s %d Zorkmids.", xmonnam(mtmp, 0), offer);

--- 552,562 -----
  	    getlin(buf);
  	    sscanf(buf, "%d", &offer);
  
! 	    if(offer < 0) {
! 		pline("You try to short change %s, but fumble.", xmonnam(mtmp, 0));
! 		offer = 0;
! 	    }
! 	    else if(offer >= u.ugold) {
  		pline("You give %s all your gold.", xmonnam(mtmp, 0));
  		offer = u.ugold;
  	    } else pline("You give %s %d Zorkmids.", xmonnam(mtmp, 0), offer);


*** zap.c.orig	Tue May 24 11:56:42 1988
--- zap.c	Tue May 24 11:56:55 1988
***************
*** 862,868
  						freeze_potions();
  					break;
  				case 4:		/* death */
! 					u.uhp = -1;
  					break;
  				case 5:		/* lightning */
  					if(Shock_resistance)

--- 862,871 -----
  						freeze_potions();
  					break;
  				case 4:		/* death */
! 					if (u.ulevel+u.uluck > rn2(2*LUCKMAX))
! 						dam = (u.uhp*2)/3;
! 					else
! 						u.uhp = -1;
  					break;
  				case 5:		/* lightning */
  					if(Shock_resistance)