diff options
author | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2009-11-11 08:23:06 -0600 |
---|---|---|
committer | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2009-11-11 08:23:06 -0600 |
commit | 6b84e07db1d30804c767f125f4da4e760e9ef7d1 (patch) | |
tree | 2f1716c30589124bd503da190b16a2a2ed5596f4 /crawl-ref/source/goditem.cc | |
parent | 5148e63355ac8fbc5ea8732f2e4a56a347d59c96 (diff) | |
download | crawl-ref-6b84e07db1d30804c767f125f4da4e760e9ef7d1.tar.gz crawl-ref-6b84e07db1d30804c767f125f4da4e760e9ef7d1.zip |
Fix good_god_hates_item_handling() to handle the unholy/evil split.
Diffstat (limited to 'crawl-ref/source/goditem.cc')
-rw-r--r-- | crawl-ref/source/goditem.cc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/crawl-ref/source/goditem.cc b/crawl-ref/source/goditem.cc index f5c6e8976b..3a1341accb 100644 --- a/crawl-ref/source/goditem.cc +++ b/crawl-ref/source/goditem.cc @@ -429,15 +429,23 @@ bool god_hates_rod(const item_def& item) conduct_type good_god_hates_item_handling(const item_def &item) { - if (!is_good_god(you.religion) || !is_evil_item(item)) + if (!is_good_god(you.religion) + || (!is_unholy_item(item) && !is_evil_item(item))) + { return (DID_NOTHING); + } + + if (item_type_known(item)) + { + if (is_evil_item(item)) + return (DID_NECROMANCY); + else + return (DID_UNHOLY); + } if (is_demonic(item)) return (DID_UNHOLY); - if (item_type_known(item)) - return (DID_NECROMANCY); - return (DID_NOTHING); } |