From c850007966adaa7c53d28bf09fb655b70248a183 Mon Sep 17 00:00:00 2001 From: cohrs Date: Sun, 14 Apr 2002 06:44:46 +0000 Subject: [PATCH] trapped monsters A suggestion from - since newsym marks physical traps that have a monster trapped as seen, and the ^ command will tell you what it is, lookat() can tell you about the trap too --- doc/fixes34.1 | 1 + src/pager.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/doc/fixes34.1 b/doc/fixes34.1 index e1d152e9d..c924e6dd2 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -71,6 +71,7 @@ travel command should restrict its shortest paths to areas of the map the hero knows about or might reasonably guess non-altar prayer should limit god action, not maximize it potions of acid explode, not dilute, so make water_damage behave this way +lookat monster notes if you see monster is trapped Platform- and/or Interface-Specific Fixes diff --git a/src/pager.c b/src/pager.c index 240b0f3ea..4eb86a26f 100644 --- a/src/pager.c +++ b/src/pager.c @@ -121,6 +121,16 @@ lookat(x, y, buf, monbuf) if (mtmp->mleashed) Strcat(buf, ", leashed to you"); + if (mtmp->mtrapped && cansee(mtmp->mx, mtmp->my)) { + struct trap *t = t_at(mtmp->mx, mtmp->my); + int tt = t ? t->ttyp : NO_TRAP; + + /* newsym lets you know of the trap, so mention it here */ + if (tt == BEAR_TRAP || tt == PIT || + tt == SPIKED_PIT ||tt == WEB) + Strcat(buf, ", trapped"); + } + { int ways_seen = 0, normal = 0, xraydist; boolean useemon = (boolean) canseemon(mtmp);