diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-05-23 18:35:21 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-05-23 18:35:21 +0000 |
commit | 764966f7e59634c19b6188ed8fef7f8dd0b93c93 (patch) | |
tree | c5740ea70264b43e0c4f58e887e012f30061d211 /crawl-ref/source/tilereg.cc | |
parent | 093e48fae110d3856da6420ec7d6b1cead90579c (diff) | |
download | crawl-ref-764966f7e59634c19b6188ed8fef7f8dd0b93c93.tar.gz crawl-ref-764966f7e59634c19b6188ed8fef7f8dd0b93c93.zip |
Fix evoking the box of the beasts or the efreet flask destroying or
modifying the wielded weapon rather than the misc. item in question.
Also update tooltips.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9802 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tilereg.cc')
-rw-r--r-- | crawl-ref/source/tilereg.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/crawl-ref/source/tilereg.cc b/crawl-ref/source/tilereg.cc index 4e5a2e06bb..11bc7df8da 100644 --- a/crawl-ref/source/tilereg.cc +++ b/crawl-ref/source/tilereg.cc @@ -1571,6 +1571,10 @@ static bool _is_true_equipped_item(item_def item) // apart from dropping it. static bool _can_use_item(const item_def &item, bool equipped) { + // There's nothing you can do with an empty box if you can't unwield it. + if (!equipped && item.sub_type == MISC_EMPTY_EBONY_CASKET) + return (false); + // Vampires can drain corpses. if (item.base_type == OBJ_CORPSES) { @@ -1691,7 +1695,6 @@ bool InventoryRegion::update_tip_text(std::string& tip) // first equipable categories case OBJ_WEAPONS: case OBJ_STAVES: - case OBJ_MISCELLANY: tip += "Wield (w)"; if (is_throwable(&you, item)) tip += "\n[Ctrl-L-Click] Fire (f)"; @@ -1701,6 +1704,15 @@ bool InventoryRegion::update_tip_text(std::string& tip) if (is_throwable(&you, item)) tip += "\n[Ctrl-L-Click] Fire (f)"; break; + case OBJ_MISCELLANY: + if (item.sub_type >= MISC_DECK_OF_ESCAPE + && item.sub_type <= MISC_DECK_OF_DEFENCE) + { + tip += "Wield (w)"; + break; + } + tip += "Evoke (V)"; + break; case OBJ_MISCELLANY + EQUIP_OFFSET: if (item.sub_type >= MISC_DECK_OF_ESCAPE && item.sub_type <= MISC_DECK_OF_DEFENCE) |