inappropriately sensing humans and elves
Discovered while testing the from-what enhancements to enlightenment. Polymorphing into a vampire confers the ability to sense humans and elves without having telepathy or being triggered by blindness. That would be taken away if you polymorphed into something else, but was being left in effect if polymorph just timed out and hero returned to normal form. Same thing occurred for sensing shriekers if you poly'd into a purple worm and then reverted to normal (something much less likely to get noticed and not really subject to abuse if it ever did). Bonus fix: the code involved was using 0 to mean that Warn_of_mon from polymorph wasn't in effect, but 0 is also giant ant. This makes it use NON_PM for that instead.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 cmd.c $NHDT-Date: 1450473780 2015/12/18 21:23:00 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.211 $ */
|
||||
/* NetHack 3.6 cmd.c $NHDT-Date: 1451082253 2015/12/25 22:24:13 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.212 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -2040,7 +2040,7 @@ int final;
|
||||
: "certain monsters");
|
||||
you_are(buf, "");
|
||||
}
|
||||
if (Warn_of_mon && context.warntype.speciesidx) {
|
||||
if (Warn_of_mon && context.warntype.speciesidx >= LOW_PM) {
|
||||
Sprintf(buf, "aware of the presence of %s",
|
||||
makeplural(mons[context.warntype.speciesidx].mname));
|
||||
you_are(buf, from_what(WARN_OF_MON));
|
||||
|
||||
Reference in New Issue
Block a user