diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-16 05:29:28 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-16 05:29:28 +0000 |
commit | df2a542d658cebfc151aff61d42abafd82de60c2 (patch) | |
tree | 4c6fb8bec5eab7719aad2035c552ab2c2e1674d8 /crawl-ref/source/religion.cc | |
parent | edefb23ebb9bad2faa64cda1c958b9a4879b30d0 (diff) | |
download | crawl-ref-df2a542d658cebfc151aff61d42abafd82de60c2.tar.gz crawl-ref-df2a542d658cebfc151aff61d42abafd82de60c2.zip |
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
Diffstat (limited to 'crawl-ref/source/religion.cc')
-rw-r--r-- | crawl-ref/source/religion.cc | 9 |
1 files 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. |