diff options
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r-- | crawl-ref/source/item_use.cc | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 32be70e0d3..eb429cd7b1 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -91,7 +91,7 @@ static bool _fire_validate_item(int selected, std::string& err); // Rather messy - we've gathered all the can't-wield logic from wield_weapon() // here. -bool can_wield(const item_def *weapon, bool say_reason, +bool can_wield(item_def *weapon, bool say_reason, bool ignore_temporary_disability) { #define SAY(x) if (say_reason) { x; } else @@ -172,7 +172,18 @@ bool can_wield(const item_def *weapon, bool say_reason, if ((you.is_undead || you.species == SP_DEMONSPAWN) && (weap_brand == SPWPN_HOLY_WRATH || is_blessed_blade(*weapon))) { - SAY(mpr("This weapon will not allow you to wield it.")); + if (say_reason) + { + mpr("This weapon is holy and will not allow you to wield it."); + // 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); } |