prayer result bits

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.
This commit is contained in:
nethack.rankin
2002-10-21 08:32:57 +00:00
parent 810386390e
commit 7870c96605

View 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;