[comp.sources.games.bugs] Trap fix for nethack 2.3e

mikew@tahoe.unr.edu (Mike Wishart) (06/24/88)

Below is a patch file to fix the traps if you are flying, eg a killer bee,
Bat, Floating Eye, yellow light, lurker above, or Demon.  The traps fixed
are bear trap, trap door, Squeeky Board, and Landmines.
-------------------------------------CUT HERE---------------------------------
*** trap.c.orig	Thu Jun 23 14:37:30 1988
--- trap.c	Thu Jun 23 15:11:19 1988
***************
*** 93,98 ****
--- 93,102 ----
  				pline("You float over a bear trap.");
  				break;
  			}
+ 			if(index("BEky'&",u.usym)) {
+ 				pline("You see a bear trap snap shut below you.");
+ 				break;
+ 			}
  			u.utrap = 4 + rn2(4);
  			u.utraptype = TT_BEARTRAP;
  			pline("A bear trap closes on your foot!");
***************
*** 125,130 ****
--- 129,137 ----
  			    stackobj(fobj);
  			    if(Invisible) newsym(u.ux, u.uy);
  			} else {
+ 			    if(index("BEky'&",u.usym)) {
+ 				pline("You see a trap door open below you.");
+ 			    } else {
  			    register int newlevel = dlevel + 1;
  				while(!rn2(4) && newlevel < 29)
  					newlevel++;
***************
*** 135,140 ****
--- 142,148 ----
  				}
  				fflush(stdout);
  				goto_level(newlevel, FALSE);
+ 			   }
  			}
  			break;
  		case DART_TRAP:
***************
*** 267,272 ****
--- 275,284 ----
  		case SQBRD: {
  #include      "edog.h"
  			register struct monst *mtmp = fmon;
+ 			if(index("BEky'&",u.usym)) {
+ 			    pline("You see a loose board below you.");
+ 			    break;
+ 			}
  			/* Stepped on a squeaky board. */
  			pline("A board underfoot gives off a loud squeak!");
  			/* Wake up nearby monsters. */
***************
*** 287,293 ****
  
  		       /* Our luckless adventurer has stepped into a web. */
  
! 		       pline("You've stumbled into a spider web!");
  		       u.utraptype = TT_WEB;
  
  		       /* Time stuck in the web depends on your strength. */
--- 299,307 ----
  
  		       /* Our luckless adventurer has stepped into a web. */
  
! 		       if(index("BEky'&",u.usym)) {
! 			  pline("You've flown into a spider web!");
! 		       } else pline("You've stumbled into a spider web!");
  		       u.utraptype = TT_WEB;
  
  		       /* Time stuck in the web depends on your strength. */
***************
*** 309,316 ****
  #ifdef SAC
  		case LANDMINE: {
  			register struct monst *mtmp = fmon;
  
- 			pline("KAABLAMM!!!  You stepped on a land mine!");
  			losehp(rnd(16), "land mine");
  			set_wounded_legs(LEFT_SIDE, 40 + rnd(35));
  			set_wounded_legs(RIGHT_SIDE, 40 + rnd(35));
--- 323,338 ----
  #ifdef SAC
  		case LANDMINE: {
  			register struct monst *mtmp = fmon;
+ 		        if(index("BEky'&",u.usym)) {
+ 			    pline("You see a pile of soil with a trigger below you!");
+ 			    if(rn2(3)) {
+ 			        break; /* wings don't usually set them off */
+ 			    } else {
+ 				pline("KAABLAMM!!! The air currents set it off");
+ 			    }
+ 			}
+ 			else pline("KAABLAMM!!!  You stepped on a land mine!");
  
  			losehp(rnd(16), "land mine");
  			set_wounded_legs(LEFT_SIDE, 40 + rnd(35));
  			set_wounded_legs(RIGHT_SIDE, 40 + rnd(35));