🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.games.hack
Article #811

Shape Changing Ring fix

#811
From: Ken Arnold%CGL
Date: Sun, 23 Jun 1985 00:57
69 lines
2376 bytes
The following is a fix for the ring of protection from shape changers.
The problem is that, if one is swallowed by a chameleon masquerading as
a trapper, and then one puts on a ring of protection from shape
changers, one instantly dies because of it, since you are now inside a
non-swallowing monster.  I figure that if you put on a ring to protect
you from a monster, it shouldn't make that monster kill you.  Here is a
context diff which fixes this problem.

----- CUT HERE -----
*** /tmp/,RCSt1007456	Tue Jun 18 16:12:59 1985
--- hack.mon.c	Tue Jun 18 12:07:34 1985
***************
*** 627,632
  unstuck(mtmp)
  register struct monst *mtmp;
  {
  	if(u.ustuck == mtmp) {
  		if(u.uswallow){
  			u.ux = mtmp->mx;

--- 627,635 -----
  unstuck(mtmp)
  register struct monst *mtmp;
  {
+ 	extern coord enexto();
+ 	coord mm;
+ 
  	if(u.ustuck == mtmp) {
  		if(u.uswallow){
  			u.ux = mtmp->mx;
***************
*** 632,637
  			u.ux = mtmp->mx;
  			u.uy = mtmp->my;
  			u.uswallow = 0;
  			setsee();
  			docrt();
  		}

--- 635,643 -----
  			u.ux = mtmp->mx;
  			u.uy = mtmp->my;
  			u.uswallow = 0;
+ 			mm = enexto(u.ux, u.uy);
+ 			mtmp->mx = mm.x;
+ 			mtmp->my = mm.y;
  			setsee();
  			docrt();
  		}
***************
*** 787,792
  	if(mdat->mlet == 'w' && getwn(mtmp)) initworm(mtmp);
  			/* perhaps we should clear mtmp->mtame here? */
  #endif NOWORM
  	unpmon(mtmp);	/* necessary for 'I' and to force pmon */
  	pmon(mtmp);
  	return(1);

--- 793,802 -----
  	if(mdat->mlet == 'w' && getwn(mtmp)) initworm(mtmp);
  			/* perhaps we should clear mtmp->mtame here? */
  #endif NOWORM
+ 	unstuck(mtmp);
+ 	mtmp->mflee = 0;
+ 	mtmp->mfleetim = 0;
+ 	mtmp->mpeaceful = 0;
  	unpmon(mtmp);	/* necessary for 'I' and to force pmon */
  	pmon(mtmp);
  	return(1);
Technical Details
Message-ID: <554@ucsfcgl.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!linus!decvax!ucbvax!ucsfcgl!arnold

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site ucsfcgl.UUCP
Path: arc1-ca.pugleaf.net!utzoo!linus!decvax!ucbvax!ucsfcgl!arnold
From: arnold@ucsfcgl.UUCP (Ken Arnold%CGL)
Newsgroups: net.games.hack
Subject: Shape Changing Ring fix
Message-ID: <554@ucsfcgl.UUCP>
Date: Sat, 22-Jun-85 20:57:35 EDT
Article-I.D.: ucsfcgl.554
Posted: Sat Jun 22 20:57:35 1985
Date-Received: Mon, 24-Jun-85 20:23:11 EDT
Reply-To: arnold@ucsfcgl.UUCP ()
Organization: UCSF Computer Graphics Lab
Lines: 69