From da5a6f678e819f92d5d3dc2f26e62de2006eadaf Mon Sep 17 00:00:00 2001 From: Haran Pilpel Date: Sun, 3 Jan 2010 21:47:34 +0200 Subject: Type-identify amulets of clarity when you resist confusion based on them; this works even if you're drinking an unIDed !oConfusion or similar, because nowhere else that I know of gives that exact message. --- crawl-ref/source/player.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'crawl-ref/source/player.cc') 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); } -- cgit v1.2.3-54-g00ecf