summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index d29a361040..49ebabc724 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -4733,6 +4733,19 @@ bool confuse_player(int amount, bool resistable)
if (resistable && wearing_amulet(AMU_CLARITY))
{
mpr("You feel momentarily confused.");
+ // Identify the amulet if necessary.
+ if (!extrinsic_amulet_effect(AMU_CLARITY))
+ {
+ // Since it's not extrinsic, it must be from the amulet.
+ ASSERT(player_wearing_slot(EQ_AMULET));
+ item_def* const amu = you.slot_item(EQ_AMULET);
+ if (!item_ident(*amu, ISFLAG_KNOW_TYPE))
+ {
+ set_ident_flags(*amu, ISFLAG_KNOW_TYPE);
+ mprf("You are wearing: %s",
+ amu->name(DESC_INVENTORY_EQUIP).c_str());
+ }
+ }
return (false);
}