summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.cc
diff options
context:
space:
mode:
authorStefan O'Rear <stefanor@cox.net>2009-11-07 14:58:31 -0800
committerStefan O'Rear <stefanor@cox.net>2009-11-07 14:58:31 -0800
commit37f3b6a119e9b0835557c709b49333d24284c911 (patch)
treed6aef3942381a1fdb587d13fee23a4a8a8538c1c /crawl-ref/source/item_use.cc
parent87fab62dd12ec126564ee9cda60aa59e7d5ea351 (diff)
downloadcrawl-ref-37f3b6a119e9b0835557c709b49333d24284c911.tar.gz
crawl-ref-37f3b6a119e9b0835557c709b49333d24284c911.zip
Properly ID vamp weapons on wield failure
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc15
1 files changed, 13 insertions, 2 deletions
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))