hearing an unseen monster read a scroll

Heroes recognized unseen same-race monsters by voice, but it yielded
an unexpected result if the monster was unique.  Change it so that
hero will recognize any type of monster by its voice if that monster
has been seen and limit unseen same-race ones to non-unique monsters.
Treats shopkeepers as unique since they have distinct names.

This adds a new flag to struct monst in order to track whether each
specific monster has ever been seen or sensed.
This commit is contained in:
PatR
2023-04-22 02:00:04 -07:00
parent 861fcdf9c4
commit 85a002c157
5 changed files with 61 additions and 31 deletions
+1 -1
View File
@@ -156,7 +156,7 @@ struct monst {
Bitfield(iswiz, 1); /* is the Wizard of Yendor */
Bitfield(wormno, 5); /* at most 31 worms on any level */
Bitfield(mtemplit, 1); /* temporarily seen; only valid during bhit() */
/* 1 free bit */
Bitfield(meverseen, 1); /* mon has been seen at some point */
#define MAX_NUM_WORMS 32 /* should be 2^(wormno bitfield size) */