no leash-related message is given when a leashed pet yellow light explodes
shop messages refer to shk by name even when shk is not visible but some
used pronoun "it" or "its" in same sentence; ditto for vault guards
+poly'd hero and monsters could eat through iron bars in areas where walls
+ were flagged as non-diggable
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
#define DB_UNDER 28 /* mask for underneath */
/*
- * Wall information.
+ * Wall information. Nondiggable also applies to iron bars.
*/
#define WM_MASK 0x07 /* wall mode (bottom three bits) */
#define W_NONDIGGABLE 0x08
/*
* still_chewing()
*
- * Chew on a wall, door, or boulder. Returns TRUE if still eating, FALSE
- * when done.
+ * Chew on a wall, door, or boulder. [What about statues?]
+ * Returns TRUE if still eating, FALSE when done.
*/
STATIC_OVL int
still_chewing(x, y)
(void) memset((genericptr_t) &context.digging, 0,
sizeof (struct dig_info));
- if (!boulder && IS_ROCK(lev->typ) && !may_dig(x, y)) {
+ if (!boulder
+ && ((IS_ROCK(lev->typ) && !may_dig(x, y))
+ /* may_dig() checks W_NONDIGGABLE but doesn't handle iron bars */
+ || (lev->typ == IRONBARS && (lev->wall_info & W_NONDIGGABLE)))) {
You("hurt your teeth on the %s.",
(lev->typ == IRONBARS)
? "bars"
&& !((IS_TREE(ntyp) ? treeok : rockok) && may_dig(nx, ny)))
continue;
/* KMH -- Added iron bars */
- if (ntyp == IRONBARS && !(flag & ALLOW_BARS))
+ if (ntyp == IRONBARS
+ && (!(flag & ALLOW_BARS)
+ || ((levl[nx][ny].wall_info & W_NONDIGGABLE)
+ && (dmgtype(mdat, AD_RUST)
+ || dmgtype(mdat, AD_CORR)))))
continue;
if (IS_DOOR(ntyp) && !(amorphous(mdat) || can_fog(mon))
&& (((levl[nx][ny].doormask & D_CLOSED) && !(flag & OPENDOOR))
add_damage(mtmp->mx, mtmp->my, 0L);
}
} else if (levl[mtmp->mx][mtmp->my].typ == IRONBARS) {
- if (may_dig(mtmp->mx, mtmp->my)
+ /* 3.6.2: was using may_dig() but it doesn't handle bars */
+ if (!(levl[mtmp->mx][mtmp->my].wall_info & W_NONDIGGABLE)
&& (dmgtype(ptr, AD_RUST) || dmgtype(ptr, AD_CORR))) {
if (canseemon(mtmp))
pline("%s eats through the iron bars.", Monnam(mtmp));
schar lit;
{
int x, y;
+
for (x = 2; x <= x_maze_max; x++)
for (y = 0; y <= y_maze_max; y++) {
SET_TYPLIT(x, y, filling, lit);
int prop;
{
register xchar x, y;
+ struct rm *lev;
- for (y = max(y1, 0); y <= min(y2, ROWNO - 1); y++)
- for (x = max(x1, 0); x <= min(x2, COLNO - 1); x++)
- if (IS_STWALL(levl[x][y].typ) || IS_TREE(levl[x][y].typ))
- levl[x][y].wall_info |= prop;
+ x1 = max(x1, 1);
+ x2 = min(x2, COLNO - 1);
+ y1 = max(y1, 0);
+ y2 = min(y2, ROWNO - 1);
+ for (y = y1; y <= y2; y++)
+ for (x = x1; x <= x2; x++) {
+ lev = &levl[x][y];
+ if (IS_STWALL(lev->typ) || IS_TREE(lev->typ)
+ /* 3.6.2: made iron bars eligible to be flagged nondiggable
+ (checked by chewing(hack.c) and zap_over_floor(zap.c)) */
+ || lev->typ == IRONBARS)
+ lev->wall_info |= prop;
+ }
}
STATIC_OVL void