add glyphs+tiles for door+chest traps

When trap detection finds trapped doors and trapped chests, it shows
those as bear traps.  When the hero comes within view, they revert to
normal and the detected trap is forgotten.  This doesn't change that,
it is just groundwork to be able to show them distinctly.  Like the
TT_BEARTRAP patch, it increments EDITLEVEL so this seemed like a good
time to put the groudwork in place.

There shouldn't be any visible changes even though internal glyph and
tile values have been renumbered after inserting two new entries.
Adding traps after S_vibrating_square was quite a hassle and suffered
though a couple of off-by-one errors that weren't trivial to find and
fix.
This commit is contained in:
PatR
2022-04-27 11:22:12 -07:00
parent d194459c7d
commit d1217b9f25
13 changed files with 294 additions and 225 deletions

View File

@@ -21,7 +21,9 @@ static boolean m_balks_at_approaching(struct monst *);
static boolean stuff_prevents_passage(struct monst *);
static int vamp_shift(struct monst *, struct permonst *, boolean);
/* True if mtmp died */
/* monster has triggered trapped door lock or was present when it got
triggered remotely (at door spot, door hit by zap);
returns True if mtmp dies */
boolean
mb_trapped(struct monst *mtmp, boolean canseeit)
{
@@ -42,6 +44,7 @@ mb_trapped(struct monst *mtmp, boolean canseeit)
return TRUE;
/* will get here if lifesaved */
}
mtmp->mtrapseen |= (1 << (TRAPPED_DOOR - 1));
return FALSE;
}