summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2014-06-07 00:28:27 -0400
committerNeil Moore <neil@s-z.org>2014-06-07 00:41:02 -0400
commit78da6b61ffca3c1f1f949988219ce8fe6a5fc57c (patch)
tree8de8a6b29d0bc95fb790c99735244c9482a60d17 /crawl-ref/source/item_use.cc
parentbc1ee5ff183cf15f10ee1569d652e9c3e004e00e (diff)
downloadcrawl-ref-78da6b61ffca3c1f1f949988219ce8fe6a5fc57c.tar.gz
crawl-ref-78da6b61ffca3c1f1f949988219ce8fe6a5fc57c.zip
Mark artefact armour known-uncursed after enchanting (#8653)
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc20
1 files changed, 9 insertions, 11 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index bc37997e89..d293e4b80a 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -2383,6 +2383,10 @@ bool enchant_armour(int &ac_change, bool quiet, item_def &arm)
if (!quiet)
canned_msg(MSG_NOTHING_HAPPENS);
+ // That proved that it was uncursed.
+ if (!you_worship(GOD_ASHENZARI))
+ arm.flags |= ISFLAG_KNOW_CURSE;
+
return false;
}
@@ -2412,24 +2416,18 @@ bool enchant_armour(int &ac_change, bool quiet, item_def &arm)
// Even if not affected, it may be uncursed.
if (!is_enchantable_armour(arm, false))
{
- if (is_cursed)
+ if (!quiet)
{
- if (!quiet)
+ if (is_cursed)
{
mprf("%s glows silver for a moment.",
arm.name(DESC_YOUR).c_str());
}
-
- do_uncurse_item(arm, true, true);
- return true;
- }
- else
- {
- if (!quiet)
+ else
canned_msg(MSG_NOTHING_HAPPENS);
-
- return false;
}
+ do_uncurse_item(arm, true, true);
+ return is_cursed; // was_cursed, really
}
// Output message before changing enchantment and curse status.