trapped monsters

A suggestion from <Someone>
- 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
This commit is contained in:
cohrs
2002-04-14 06:44:46 +00:00
parent 1a5f501758
commit c850007966
2 changed files with 11 additions and 0 deletions

View File

@@ -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

View File

@@ -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);