From f7eb8c113c75b0b9a064cfd840d46915494b9a34 Mon Sep 17 00:00:00 2001 From: dolorous Date: Thu, 25 Sep 2008 22:52:07 +0000 Subject: 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 --- crawl-ref/source/fight.cc | 3 +-- crawl-ref/source/item_use.cc | 8 +++++--- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'crawl-ref') 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); -- cgit v1.2.3-54-g00ecf