]> granicus.if.org Git - nethack/commitdiff
"<foo> appears" followup (trunk only)
authornethack.rankin <nethack.rankin>
Thu, 7 Sep 2006 05:08:41 +0000 (05:08 +0000)
committernethack.rankin <nethack.rankin>
Thu, 7 Sep 2006 05:08:41 +0000 (05:08 +0000)
     If you get "you have summoned <demon>" after making a same-race
sacrifice, treat that as having been the "<demon> appears" message so that
the latter won't be given if it subsequently teleports to you after you've
moved out of sight of it.  There are probably some more cases like this
still lurking in the code.

src/pray.c

index e7b6975fbb9188d251bc421a25adbf02db81cfaa..4e2dc741d1ea408e0748e29b0431a19dc7ac5b67 100644 (file)
@@ -1244,6 +1244,8 @@ dosacrifice()
                    Strcpy(dbuf, a_monnam(dmon));
                    if (!strcmpi(dbuf, "it"))
                        Strcpy(dbuf, "something dreadful");
+                   else
+                       dmon->mstrategy &= ~STRAT_APPEARMSG;
                    You("have summoned %s!", dbuf);
                    if (sgn(u.ualign.type) == sgn(dmon->data->maligntyp))
                        dmon->mpeaceful = TRUE;