summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-10 14:51:33 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-10 14:51:33 +0000
commit3680ca92908368402ea6caf2f9066213e3a816fc (patch)
treec6f283cd92e79b5f5188add50c60dc0b9859cca6
parent827db876a847287ed21a72fe190baf32b588c196 (diff)
downloadcrawl-ref-3680ca92908368402ea6caf2f9066213e3a816fc.tar.gz
crawl-ref-3680ca92908368402ea6caf2f9066213e3a816fc.zip
Apply trunk r6474 to 0.4.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6475 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/describe.cc6
-rw-r--r--crawl-ref/source/itemname.cc5
-rw-r--r--crawl-ref/source/religion.cc9
-rw-r--r--crawl-ref/source/religion.h1
4 files changed, 18 insertions, 3 deletions
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index 658191e1c8..3dd6883dc1 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -1909,6 +1909,12 @@ std::string get_item_description( const item_def &item, bool verbose,
}
}
+ if (good_god_dislikes_item_handling(item))
+ {
+ description << "$$" << god_name(you.religion) << " opposes the use of "
+ << "such an evil item.";
+ }
+
if (god_dislikes_item_handling(item))
{
description << "$$" << god_name(you.religion) << " disapproves of the "
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc
index 830fa06757..71f15c9565 100644
--- a/crawl-ref/source/itemname.cc
+++ b/crawl-ref/source/itemname.cc
@@ -2555,8 +2555,11 @@ const std::string menu_colour_item_prefix(const item_def &item, bool temp)
prefixes.push_back("unidentified");
}
- if (god_dislikes_item_handling(item))
+ if (good_god_dislikes_item_handling(item)
+ || god_dislikes_item_handling(item))
+ {
prefixes.push_back("evil_item");
+ }
if (is_emergency_item(item))
prefixes.push_back("emergency_item");
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 21dda6e4e3..644dcee506 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -3052,6 +3052,12 @@ bool is_evil_item(const item_def& item)
return retval;
}
+bool good_god_dislikes_item_handling(const item_def &item)
+{
+ return (is_good_god(you.religion) && is_evil_item(item)
+ && (is_demonic(item) || item_type_known(item)));
+}
+
bool god_dislikes_item_handling(const item_def &item)
{
if (you.religion == GOD_TROG)
@@ -3101,8 +3107,7 @@ bool god_dislikes_item_handling(const item_def &item)
}
}
- return (is_good_god(you.religion) && is_evil_item(item)
- && (is_demonic(item) || item_type_known(item)));
+ return (false);
}
// Is the destroyed weapon valuable enough to gain piety by doing so?
diff --git a/crawl-ref/source/religion.h b/crawl-ref/source/religion.h
index f950a8902f..2ff9afb3bf 100644
--- a/crawl-ref/source/religion.h
+++ b/crawl-ref/source/religion.h
@@ -105,6 +105,7 @@ void good_god_holy_attitude_change(monsters *holy);
void beogh_convert_orc(monsters *orc, bool emergency,
bool converted_by_follower = false);
bool is_evil_item(const item_def& item);
+bool good_god_dislikes_item_handling(const item_def &item);
bool god_dislikes_item_handling(const item_def &item);
bool ely_destroy_weapons();
bool trog_burn_books();