]> granicus.if.org Git - nethack/commitdiff
quest artifact handling (trunk only)
authornethack.rankin <nethack.rankin>
Thu, 18 May 2006 02:50:33 +0000 (02:50 +0000)
committernethack.rankin <nethack.rankin>
Thu, 18 May 2006 02:50:33 +0000 (02:50 +0000)
     When the hero receives the quest artifact "got it" message, set the
artifact's dknown bit in case the hero is blinded.  That message describes
the object by name, effectively the same as seeing it up close.  (This
would have prevented the "now wearing an Eyes of the Overworld" grammar bug
for monks but not for non-monks, so the previous fix is still necessary.)

include/extern.h
src/invent.c
src/quest.c

index cc26e7d0b61524556925c27cc27e68a8b0a6ce2c..a5ac7055a9b4db85a0d48c1390b3cee3fa03ea33 100644 (file)
@@ -1733,7 +1733,7 @@ E void FDECL(free_epri, (struct monst *));
 
 E void NDECL(onquest);
 E void NDECL(nemdead);
-E void NDECL(artitouch);
+E void FDECL(artitouch, (struct obj *));
 E boolean NDECL(ok_to_quest);
 E void FDECL(leader_speaks, (struct monst *));
 E void NDECL(nemesis_speaks);
index 8040d0024caa82b742a88e7477fb4271ec691346..f6cf34fc2aec9ffac5d2ff2258087b4c1882b1f4 100644 (file)
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)invent.c   3.5     2006/04/15      */
+/*     SCCS Id: @(#)invent.c   3.5     2006/05/17      */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -259,7 +259,7 @@ struct obj *obj;
                    if (u.uhave.questart)
                        impossible("already have quest artifact?");
                    u.uhave.questart = 1;
-                   artitouch();
+                   artitouch(obj);
                }
                set_artifact_intrinsic(obj, 1, W_ART);
        }
index 116c578069f1e5861f93ffadaf38c2951c694ed0..e261e75ef120f71e377ae1f26e97ccb0dbf905bd 100644 (file)
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)quest.c    3.5     2000/05/05      */
+/*     SCCS Id: @(#)quest.c    3.5     2006/05/17      */
 /*     Copyright 1991, M. Stephenson             */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -82,9 +82,14 @@ nemdead()
 }
 
 void
-artitouch()
+artitouch(obj)
+struct obj *obj;
 {
        if(!Qstat(touched_artifact)) {
+           /* in case we haven't seen the item yet (ie, currently blinded),
+              this quest message describes it by name so mark it as seen */
+           obj->dknown = 1;
+           /* only give this message once */
            Qstat(touched_artifact) = TRUE;
            qt_pager(QT_GOTIT);
            exercise(A_WIS, TRUE);