[net.games.hack] 2 bugfixes for Hack

ab@unido.UUCP (09/26/85)

According to the source you should be suspended for 30 moves after eating
a mimic. Instead you just eat the mimic and only for about four moves
you mimic a treasure chest.

This is the relevant part of the source:

hack.eat.c, line 448:
>	case 'M':
>	  pline("You cannot resist the temptation to mimic a treasure chest.");
>	  tp++;
>	  nomul(-30);
>	  afternmv = Meatdone;
>	  nomovemsg = "You now again prefer mimicking a human.";
>	  u.usym = '$';
>	  prme();
>	  break;

I wondered about that and it turned out that the nomul(-30) didn't
work, because that routine had a small bug in it. Here comes the fix:

*** hack.c.orig	Sun Aug  4 12:05:57 1985
--- hack.c	Thu Sep 26 11:18:33 1985
***************
*** 682,688
  nomul(nval)
  register nval;
  {
! 	if(multi < 0) return;
  	multi = nval;
  	flags.mv = flags.run = 0;
  }

--- 682,688 -----
  nomul(nval)
  register nval;
  {
! 	if(multi < nval) return;  /* ab@unido */
  	multi = nval;
  	flags.mv = flags.run = 0;
  }

Here is another fix; I found the bug while I was looking for all
nomul()-calls...

*** hack.wizard.c.orig	Sun Aug  4 12:08:35 1985
--- hack.wizard.c	Thu Sep 26 11:16:29 1985
***************
*** 120,126
  		    if(canseemon(mtmp)){
  			if(!rn2(6) && !Invis) {
  			    pline("%s hypnotizes you.", Monnam(mtmp));
! 			    nomul(rn2(3) + 3);
  			    break;
  			} else
  			    pline("%s chants an incantation.",

--- 120,126 -----
  		    if(canseemon(mtmp)){
  			if(!rn2(6) && !Invis) {
  			    pline("%s hypnotizes you.", Monnam(mtmp));
! 			    nomul(-(rn2(3) + 3));	/* ab@unido */
  			    break;
  			} else
  			    pline("%s chants an incantation.",

--
Andreas Bormann
University of Dortmund  [UniDo]
West Germany

Uucp:   ab@unido.uucp
Path:   {USA}!ihnp4!seismo!mcvax!unido!ab
	{Europe}!{cernvax,diku,enea,ircam,mcvax,prlb2,tuvie,ukc}!unido!ab
Bitnet: ab@ddoinf6.bitnet
		 \
Missiles:    -=>-->-*>      N 51 29' 05"   E 07 24' 42"
		 /