From 37f3b6a119e9b0835557c709b49333d24284c911 Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Sat, 7 Nov 2009 14:58:31 -0800 Subject: Properly ID vamp weapons on wield failure --- crawl-ref/source/item_use.cc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/item_use.cc') diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index f4340a3680..28b8c33d3f 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -171,8 +171,19 @@ bool can_wield(item_def *weapon, bool say_reason, && get_weapon_brand(*weapon) == SPWPN_VAMPIRICISM && you.species != SP_VAMPIRE) { - SAY(mpr("You're too hungry to wield that.")); - return(false); + if (say_reason) + { + mpr("You're too hungry to wield that."); + // If it's a standard weapon, you know its ego now. + if (!is_artefact(*weapon) && !is_blessed_blade(*weapon) + && !item_type_known(*weapon)) + { + set_ident_flags(*weapon, ISFLAG_KNOW_TYPE); + if (in_inventory(*weapon)) + mpr(weapon->name(DESC_INVENTORY_EQUIP).c_str()); + } + } + return (false); } if (!ignore_temporary_disability && is_shield_incompatible(*weapon)) -- cgit v1.2.3-54-g00ecf