]> granicus.if.org Git - nethack/commitdiff
polywarn followup (trunk only)
authornethack.allison <nethack.allison>
Fri, 4 Jun 2004 01:10:44 +0000 (01:10 +0000)
committernethack.allison <nethack.allison>
Fri, 4 Jun 2004 01:10:44 +0000 (01:10 +0000)
src/artifact.c
src/cmd.c

index a071842daa7a8f8f9f8ae2bbd0d484d70eb658ec..02e008beddb539aaa9a3b845b384c7dc139a859e 100644 (file)
@@ -1523,14 +1523,14 @@ long *abil;
        wornbits = (wornmask & *abil);
 
        for(obj = invent; obj; obj = obj->nobj) {               
-           if(obj->oartifact) {
+           if(obj->oartifact && ((abil != &EWarn_of_mon) || context.warntype.obj)) {
                register const struct artifact *art = get_artifact(obj);
                if (art) {
                    if (dtyp &&
                        (art->cary.adtyp == dtyp || art->defn.adtyp == dtyp))
                                return obj;
                    if (spfx && ((art->cspfx & spfx) == spfx ||
-                               (art->spfx &spfx) == spfx))
+                               (art->spfx & spfx) == spfx))
                                return obj;
                }
            } else {
index ffd47ec889276c44093db1c01625949672730d52..78054caac0b904f6f771decd64b3c871ca85bca3 100644 (file)
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -991,7 +991,7 @@ int final;  /* 0 => still in progress; 1 => over, survived; 2 => dead */
                    (context.warntype.polyd & M2_ORC) ? "orcs" :
                    (context.warntype.polyd & M2_DEMON) ? "demons" :
                    "certain monsters");
-               you_are(buf,from_what(WARN_OF_MON));
+               you_are(buf,"");
        }
        if (Warn_of_mon && context.warntype.speciesidx) {
                Sprintf(buf, "aware of the presence of %s",