summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-25 22:52:07 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-25 22:52:07 +0000
commitf7eb8c113c75b0b9a064cfd840d46915494b9a34 (patch)
tree86140b28c7287a78b6469113f4f15e0bf53c668d /crawl-ref
parentb67ca8220470dc19f83db1b199fec11c8f311da4 (diff)
downloadcrawl-ref-f7eb8c113c75b0b9a064cfd840d46915494b9a34.tar.gz
crawl-ref-f7eb8c113c75b0b9a064cfd840d46915494b9a34.zip
Properly warn Yredelemnulites about the use of holy items, just as we do
with good god worshippers and evil items. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6995 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/fight.cc3
-rw-r--r--crawl-ref/source/item_use.cc8
2 files changed, 6 insertions, 5 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index afb3e9dd43..d196cf824c 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -1756,8 +1756,7 @@ void melee_attack::player_check_weapon_effects()
{
if (is_holy_item(*weapon))
did_god_conduct(DID_HOLY, 1);
-
- if (is_demonic(*weapon))
+ else if (is_demonic(*weapon))
did_god_conduct(DID_UNHOLY, 1);
}
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index a08ccee3ba..7bce87d93b 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -527,10 +527,12 @@ void wield_effects(int item_wield_2, bool showMsgs)
case OBJ_WEAPONS:
{
- if (is_evil_item(item) && is_good_god(you.religion))
+ if (showMsgs)
{
- if (showMsgs)
- mpr("You really shouldn't be using a nasty item like this.");
+ if (is_holy_item(item) && you.religion == GOD_YREDELEMNUL)
+ mpr("You really shouldn't be using a holy item like this.");
+ else if (is_evil_item(item) && is_good_god(you.religion))
+ mpr("You really shouldn't be using an evil item like this.");
}
const bool was_known = item_type_known(item);