diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-09-21 09:53:50 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-09-21 09:53:50 +0000 |
commit | 724da7b6f8eebce7b00ac5f58702b7cd2d868a69 (patch) | |
tree | 7b77480468e5541ffd159dbd3e16b9d67dd982a3 /crawl-ref | |
parent | 747e0eae09c7af9ce7d4acb5af9f059d9d2495a9 (diff) | |
download | crawl-ref-724da7b6f8eebce7b00ac5f58702b7cd2d868a69.tar.gz crawl-ref-724da7b6f8eebce7b00ac5f58702b7cd2d868a69.zip |
Fixed order-of-operations bug which was causing items with subtype 23
(e.g. ?oHolyWord) being considered evil. [apparently introduced in r6601?]
Fixes 2121183.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6959 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/religion.cc | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 4b45483d48..eb18e2a988 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -3030,9 +3030,9 @@ bool god_dislikes_item_handling(const item_def &item) if (you.religion == GOD_ZIN) { - if ((item.base_type == OBJ_POTIONS && item.sub_type == POT_MUTATION - || item.base_type == OBJ_WANDS - && item.sub_type == WAND_POLYMORPH_OTHER) + if (((item.base_type == OBJ_POTIONS && item.sub_type == POT_MUTATION) + || (item.base_type == OBJ_WANDS + && item.sub_type == WAND_POLYMORPH_OTHER)) && item_type_known(item)) { return (true); @@ -3061,14 +3061,12 @@ bool god_dislikes_item_handling(const item_def &item) { const int item_brand = get_ammo_brand(item); - if (item_brand == SPMSL_POISONED - || item_brand == SPMSL_CURARE) - { + if (item_brand == SPMSL_POISONED || item_brand == SPMSL_CURARE) return (true); - } } else if (item.base_type == OBJ_STAVES - && item.sub_type == STAFF_POISON || item.sub_type == STAFF_VENOM) + && (item.sub_type == STAFF_POISON + || item.sub_type == STAFF_VENOM)) { return (true); } |