[comp.sources.games.bugs] Nethack 2.3 Blindfold bug

raj@jcricket.ctt.bellcore.com (Randy Jackson) (05/10/88)

	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                    *
************************************************************************************