]> granicus.if.org Git - nethack/commitdiff
discovering divine gifts
authornethack.rankin <nethack.rankin>
Tue, 22 Aug 2006 03:31:32 +0000 (03:31 +0000)
committernethack.rankin <nethack.rankin>
Tue, 22 Aug 2006 03:31:32 +0000 (03:31 +0000)
     <Someone> says he reported this five years ago, but I don't think I ever
saw it.  Receiving an artifact as the result of #offer would add it into
the discoveries even if the hero was blind and never saw it.  It either
needed to have the dknown bit set, as if it had been seen, or else should
not be added to the list.  I've opted for the latter.

doc/fixes34.4
src/pray.c

index 14e23f4bec2607dc08412a4b02ef6eaaa5ff5065..7ab93d466857174fbae414bd0ca6c66a70a2310f 100644 (file)
@@ -248,6 +248,7 @@ fix phrasing in monster against monster attack feedback when attacker is
        wielding stacked weapons
 don't place hero on top of monster when arriving on level which is so full
        that the monster can't be moved out of the way
+have to see a divine gift in order to have it become a discovery
 
 
 Platform- and/or Interface-Specific Fixes
index 4fce54477dc3948f17e1ae43649c894cdb2801d7..7640a0855268619b7a174c922a5c730c08edc058 100644 (file)
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)pray.c     3.5     2006/04/14      */
+/*     SCCS Id: @(#)pray.c     3.5     2006/08/21      */
 /* Copyright (c) Benson I. Margulies, Mike Stephenson, Steve Linhart, 1989. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -1526,7 +1526,11 @@ verbalize("In return for thy service, I grant thee the gift of Immortality!");
                    exercise(A_WIS, TRUE);
                    /* make sure we can use this weapon */
                    unrestrict_weapon_skill(weapon_type(otmp));
-                   discover_artifact(otmp->oartifact);
+                   if (!Hallucination && !Blind) {
+                       otmp->dknown = 1;
+                       makeknown(otmp->otyp);
+                       discover_artifact(otmp->oartifact);
+                   }
                    return(1);
                }
            }