[net.games.hack] Y.A.H.B

ryan@ucla-cs.UUCP (05/12/85)

I was playing hack last night when i tamed a mimic......
When i tamed him i was stuck to him and then when i killed him
i was still stuck.....


Is there a bug fix for this or am i the only one who has experianced
this....

Also, in my version stairs are not created past the 27th level....
Why, how are you supposed to get the amulet without teleporting?
Is there a bug fix for it?

		Bye

	Ryan

aeb@mcvax.UUCP (Andries Brouwer) (05/14/85)

In article <5367@ucla-cs.ARPA> ryan@ucla-cs.UUCP writes:
>I was playing hack last night when i tamed a mimic......
>When i tamed him i was stuck to him and then when i killed him
>i was still stuck.....

Yes, I cannot reproduce the bug on my machine, but reading the source
shows that it works fine for me by some coincidence. The problem is that when
you name or tame a monster, it is moved to a new monster structure but
there may still be pointers around to the old structure. I'll think
about this a little more, but the problem you mention is cured by adding
the line  if(u.ustuck == mtmp) u.ustuck = mtmp2;  to the routine replmon()
in hack.mon.c. Future versions of hack will use ustuckid instead of ustuck.

Below follows a diff between my current hack.mon.c and the 1.0.2 version.

>Also, in my version stairs are not created past the 27th level....
>Why, how are you supposed to get the amulet without teleporting?
>Is there a bug fix for it?

But this is not a bug; it is quite intentional.


< /* hack.mon.c - version 1.0.2 */
---
> /* hack.mon.c - current working version */
130a131
> 	/* flags.botlx = 1;		/* should we show status line ? */
193a195,199
> 
> 	/* fleeing monsters might regain courage */
> 	if(mtmp->mflee && mtmp->mhp == mtmp->mhpmax && !rn2(25))
> 		mtmp->mflee = 0;
> 
231a238,239
> 	if(mtmp->mfroz || mtmp->msleep)
> 		return(0);
239a248,252
> #ifndef NOWORM
> 	if(mtmp->wormno)
> 		goto not_special;
> #endif NOWORM
> 
283a297
> not_special:
579a594
> 	if(u.ustuck == mtmp) u.ustuck = mtmp2;
720c735
< 	if(!letter(tmp) || !rn2(3)) tmp = 0;
---
> 	if(!letter(tmp) || (!index("mw", tmp) && !rn2(3))) tmp = 0;