From df2a542d658cebfc151aff61d42abafd82de60c2 Mon Sep 17 00:00:00 2001 From: dolorous Date: Wed, 16 Jul 2008 05:29:28 +0000 Subject: Apply trunk r6575 to 0.4. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6576 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/religion.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 8d7ba6d663..d0f9d7dee0 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -5337,6 +5337,7 @@ void offer_items() return; int num_sacced = 0; + int num_disliked = 0; const int old_leading = _leading_sacrifice_group(); @@ -5344,10 +5345,13 @@ void offer_items() { item_def &item(mitm[i]); const int next = item.link; // in case we can't get it later. + const bool disliked = !_god_likes_item(you.religion, item); - if (item_is_stationary(item) || !_god_likes_item(you.religion, item)) + if (item_is_stationary(item) || disliked) { i = next; + if (disliked) + num_disliked++; continue; } @@ -5410,7 +5414,8 @@ void offer_items() _show_pure_deck_chances(); #endif } - else if (num_sacced == 0) // explanatory messages if nothing sacrificed + // Explanatory messages if nothing the god likes is sacrificed. + else if (num_sacced == 0 && num_disliked > 0) { // Zin was handled above, and the other gods don't care about // sacrifices. -- cgit v1.2.3-54-g00ecf