fix #Q431 - water elemental caught in beartrap (trunk only)
Reported two months ago by <email deleted>, having a water elemental become trapped in a bear trap seems pretty strange. Fixed by marking water elementals as M1_UNSOLID (like air and fire elementals), which has a side-effect of making them immune to webs as well. Tweaked some unused digging code which checks unsolid(), added unsolid() to the types allowed to bar through iron bars, and brought the check for whether a monster is willing to enter a bear trap location up to date. That code also needed an update to reflect the change made to anti-magic traps last year. Lastly, there was another report which suggested that being hit by a bear trap should dish out some damage (along with a suggestion that wand of opening should work to escape such traps, which has already been done). This makes bear trap do 2d4 damage (on entry, not when trying to pull out after becoming stuck).
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)dig.c 3.5 2006/07/08 */
|
||||
/* SCCS Id: @(#)dig.c 3.5 2007/04/02 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1937,7 +1937,9 @@ escape_tomb()
|
||||
boolean good;
|
||||
|
||||
if(amorphous(youmonst.data) || Passes_walls ||
|
||||
noncorporeal(youmonst.data) || unsolid(youmonst.data) ||
|
||||
noncorporeal(youmonst.data) ||
|
||||
(unsolid(youmonst.data) &&
|
||||
youmonst.data != &mons[PM_WATER_ELEMENTAL]) ||
|
||||
(tunnels(youmonst.data) && !needspick(youmonst.data))) {
|
||||
|
||||
You("%s up through the %s.",
|
||||
|
||||
Reference in New Issue
Block a user