Path: utzoo!mnetor!uunet!wucs1!wucs2!sw1e!tness1!tness7!bellcore!jcricket!raj
From: raj@jcricket.ctt.bellcore.com (Randy Jackson)
Newsgroups: comp.sources.games.bugs
Subject: Nethack 2.3 Blindfold bug
Message-ID: <7279@bellcore.bellcore.com>
Date: 10 May 88 13:20:20 GMT
Sender: news@bellcore.bellcore.com
Reply-To: raj@jcricket.UUCP (Randy Jackson)
Distribution: comp.sources.games.bugs
Organization: Computer Technology Transfer, Bellcore
Lines: 67
Summary: Fix for Nymph stealing blindfold


	The following diffs will fix the bug where the nymph steals your
	blindfold while you are wearing it and you are left blind. The patch
	should be applied to the 2.3 source for steal.c.

-------------------------------------cut here--------------------------------------------

*** steal.c.orig	Fri May  6 16:55:34 1988
--- steal.c	Fri May  6 17:16:43 1988
***************
*** 86,104 ****
  		impossible("Steal fails!");
  		return(0);
  	}
  	if(otmp->o_id == stealoid)
  		return(0);
! 	if((otmp->owornmask & (W_ARMOR | W_RING))){
  		switch(otmp->olet) {
  		case RING_SYM:
  			ringoff(otmp);
  			break;
  		case ARMOR_SYM:
  			if(multi < 0 || otmp == uarms){
  			  setworn((struct obj *) 0, otmp->owornmask & W_ARMOR);
  			  break;
  			}
  		{ int curssv = otmp->cursed;
  			otmp->cursed = 0;
  			stop_occupation();
  			if(flags.female)
--- 86,114 ----
  		impossible("Steal fails!");
  		return(0);
  	}
  	if(otmp->o_id == stealoid)
  		return(0);
! 	if((otmp->owornmask & (W_ARMOR | W_RING | W_TOOL))){
  		switch(otmp->olet) {
  		case RING_SYM:
  			ringoff(otmp);
  			break;
  		case ARMOR_SYM:
  			if(multi < 0 || otmp == uarms){
  			  setworn((struct obj *) 0, otmp->owornmask & W_ARMOR);
  			  break;
+ 			}
+ 		case TOOL_SYM:
+ 			if(otmp->otyp == BLINDFOLD){
+ 				Blindfolded = 0;
+ 				if(!Blinded) Blinded = 1;
+ 				break;
+ 			}
+ 			else if(otmp->otyp == BADGE){
+ 				Badged = 0;
+ 				break;
  			}
  		{ int curssv = otmp->cursed;
  			otmp->cursed = 0;
  			stop_occupation();
  			if(flags.female)


-------------------------------------cut here--------------------------------------------

************************************************************************************
* Randy A Jackson         Bellcore         raj@ctt!bellcore.com                    *
************************************************************************************