fix #H7065 - clairvoyance shows trap over monsters

and over the hero.  3.6.0's clairvoyance tried to show things in
a non-standard sequence, which was intentional but had unintended
side-effects like the disappearing monsters complained about in the
report.  To make it work as intended would have required --More--
whenever it kicked in, which is much too intrusive when it happens
every N turns rather than when explicitly casting the spell.

Redo it substantially, and give preference to monsters over objects,
objects over traps, and traps over underlying terrain like normal
vision-based display does.  It now detects all monsters within its
bounding box but shows ones which aren't directly in view as
"unseen monster" unless via spell cast at skilled or expert, or at
basic when also having intrinsic clairvoyance.
This commit is contained in:
PatR
2018-11-11 14:28:54 -08:00
parent ed70005c9b
commit ab7fb9360e
4 changed files with 94 additions and 16 deletions

View File

@@ -26,7 +26,8 @@ nhsym l_syms[SYM_MAX] = DUMMY; /* loaded symbols */
nhsym r_syms[SYM_MAX] = DUMMY; /* rogue symbols */
nhsym warnsyms[WARNCOUNT] = DUMMY; /* the current warning display symbols */
const char invisexplain[] = "remembered, unseen, creature";
const char invisexplain[] = "remembered, unseen, creature",
altinvisexplain[] = "unseen creature"; /* for clairvoyance */
/* Default object class symbols. See objclass.h.
* {symbol, name, explain}