summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/religion.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-30 01:32:50 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-30 01:32:50 +0000
commitd6acd8509be166fcef5eae18eeaabf76312a0b0b (patch)
tree78a8cee36a1951bf09c87831027c4752e19975a4 /crawl-ref/source/religion.cc
parent5d7e01fb4089f4154003be5e1216a6a9bcc1a000 (diff)
downloadcrawl-ref-d6acd8509be166fcef5eae18eeaabf76312a0b0b.tar.gz
crawl-ref-d6acd8509be166fcef5eae18eeaabf76312a0b0b.zip
Mark potions of mutation as evil for Zin worshippers, and poisoned
weapons and ammunition as evil for TSO worshippers. Also, mark all demonic weapons as evil, whether their types are known or not. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6227 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/religion.cc')
-rw-r--r--crawl-ref/source/religion.cc35
1 files changed, 30 insertions, 5 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 3217122067..7d22dbf93b 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -2971,8 +2971,8 @@ bool is_evil_item(const item_def& item)
{
case OBJ_WEAPONS:
{
- int item_brand = get_weapon_brand(item);
- int item_eff = item_special_wield_effect(item);
+ const int item_brand = get_weapon_brand(item);
+ const int item_eff = item_special_wield_effect(item);
retval = (is_demonic(item)
|| item.special == SPWPN_SCEPTRE_OF_ASMODEUS
@@ -3029,15 +3029,40 @@ bool god_dislikes_item_handling(const item_def &item)
if (you.religion == GOD_ZIN)
{
- if (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);
}
}
+ if (you.religion == GOD_SHINING_ONE)
+ {
+ if (item.base_type == OBJ_WEAPONS)
+ {
+ const int item_brand = get_weapon_brand(item);
+
+ if (item_brand == SPWPN_VENOM)
+ return (true);
+ }
+ else if (item.base_type == OBJ_MISSILES)
+ {
+ const int item_brand = get_weapon_brand(item);
+
+ if (item_brand == SPMSL_POISONED
+ || item_brand == SPMSL_POISONED_II
+ || item_brand == SPMSL_CURARE)
+ {
+ return (true);
+ }
+ }
+ }
+
return (is_good_god(you.religion) && is_evil_item(item)
- && item_type_known(item));
+ && (is_demonic(item) || item_type_known(item)));
}
// Is the destroyed weapon valuable enough to gain piety by doing so?