fix github issue #1017 - webs in/on water
Reported by copperwater, it was possible for a web to be created at a water or lava location. It would not be displayed even after being discovered; showing the terrain superseded showing the trap. But it functioned normally and could trap the hero. Webs pull the victim to the floor so hero would drown or burn up on next move even if the spot had been reached while floating or flying. A monster spider couldn't survive at a water or lava location, but a poly'd hero could. Creating a web via #monster or wizard mode wish could result in it affecting some unsuspecting player via bones. Disallow creation of webs at water, lava, and air or cloud spots. (They're already disallowed at furniture spots.) Fixes #1017
This commit is contained in:
@@ -438,6 +438,7 @@ maketrap(coordxy x, coordxy y, int typ)
|
||||
/* old <tx,ty> remain valid */
|
||||
} else if ((IS_FURNITURE(lev->typ)
|
||||
&& (!IS_GRAVE(lev->typ) || (typ != PIT && typ != HOLE)))
|
||||
|| (is_pool_or_lava(x, y) || IS_AIR(lev->typ))
|
||||
|| (typ == LEVEL_TELEP && single_level_branch(&u.uz))) {
|
||||
/* no trap on top of furniture (caller usually screens the
|
||||
location to inhibit this, but wizard mode wishing doesn't)
|
||||
|
||||
Reference in New Issue
Block a user