From d3135ffe1ce960e26383b998a94e76068c1bec6b Mon Sep 17 00:00:00 2001 From: cohrs Date: Sun, 14 Apr 2002 04:46:11 +0000 Subject: [PATCH] R778 - prayer bit - need to use min() not max() for action choice when not on altar --- doc/fixes34.1 | 1 + src/pray.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/fixes34.1 b/doc/fixes34.1 index ed4493e88..8e90d78d0 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -69,6 +69,7 @@ prevent the Wizard of Yendor from displacing the high priest of Moloch out of ATR_BOLD on spell menu header travel command should restrict its shortest paths to areas of the map the hero knows about or might reasonably guess +non-altar prayer should limit god action, not maximize it Platform- and/or Interface-Specific Fixes diff --git a/src/pray.c b/src/pray.c index 5fff68487..b492e8ed5 100644 --- a/src/pray.c +++ b/src/pray.c @@ -747,7 +747,7 @@ pleased(g_align) } else { int action = rn1(on_altar() ? 3 + on_shrine() : 2, Luck+1); - if (!on_altar()) action = max(action,2); + if (!on_altar()) action = min(action, 2); if (u.ualign.record < STRIDENT) action = (u.ualign.record > 0 || !rnl(2)) ? 1 : 0; -- 2.40.0