]> granicus.if.org Git - nethack/commitdiff
prayer result bits
authornethack.rankin <nethack.rankin>
Mon, 21 Oct 2002 08:32:57 +0000 (08:32 +0000)
committernethack.rankin <nethack.rankin>
Mon, 21 Oct 2002 08:32:57 +0000 (08:32 +0000)
     You won't be hallucinating at the end of a prayer which reveals
the Castle passtune even if you were hallucinating before hand, so
there's no point in adding joke messages in that case.  Also, you
can't pray while unconscious, so ignore the soundok flag when dealing
with that tune; otherwise the player could toggle that option off in
order to bypass the tune result in favor of the golden glow effect.

src/pray.c

index 01d1077a2b68ec3bfcdb3b43cac36fc2073b4b18..d9cad716d7719f361cec0194e92280ed8bfdb5f3 100644 (file)
@@ -813,6 +813,9 @@ pleased(g_align)
            }
        }
 
+    /* note: can't get pat_on_head unless all troubles have just been
+       fixed or there were no troubles to begin with; hallucination
+       won't be in effect so special handling for it is superfluous */
     if(pat_on_head)
        switch(rn2((Luck + 6)>>1)) {
        case 0: break;
@@ -862,8 +865,8 @@ pleased(g_align)
            break;
        case 3:
            /* takes 2 hints to get the music to enter the stronghold */
-           if (flags.soundok && !u.uevent.uopened_dbridge) {
-               if(u.uevent.uheard_tune < 1) {
+           if (!u.uevent.uopened_dbridge) {
+               if (u.uevent.uheard_tune < 1) {
                    godvoice(g_align,(char *)0);
                    verbalize("Hark, %s!",
                          youmonst.data->mlet == S_HUMAN ? "mortal" : "creature");
@@ -872,7 +875,7 @@ pleased(g_align)
                    u.uevent.uheard_tune++;
                    break;
                } else if (u.uevent.uheard_tune < 2) {
-                   You_hear(Hallucination ? "a funeral march..." : "a divine music...");
+                   You_hear("a divine music...");
                    pline("It sounds like:  \"%s\".", tune);
                    u.uevent.uheard_tune++;
                    break;