diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-05-02 17:50:19 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-05-02 17:50:19 +0000 |
commit | 1b49ddb74f8d39dd07b712602333fc28810a4f40 (patch) | |
tree | 8dd67f254ab14357aa312aeb47fe591df6d6367e /crawl-ref/source/item_use.cc | |
parent | fb58bd0b0b1ebc50a270c3fcd251631737d3c53c (diff) | |
download | crawl-ref-1b49ddb74f8d39dd07b712602333fc28810a4f40.tar.gz crawl-ref-1b49ddb74f8d39dd07b712602333fc28810a4f40.zip |
Add new command for evoking non-wielded items, placed on 'V'.
* Also applies to wand, and will soon replace 'Z'.
* Decks, rods, and weapons of reaching still need to be wielded ('v').
* The tiles tooltips will need to be adjusted.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9718 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r-- | crawl-ref/source/item_use.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 5a643a6276..b184f89d82 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -23,6 +23,9 @@ REVISION("$Rev$"); #include "cloud.h" #include "command.h" #include "debug.h" +#ifdef USE_TILE +#include "decks.h" +#endif #include "delay.h" #include "describe.h" #include "directn.h" @@ -5435,17 +5438,19 @@ void tile_item_use(int idx) case OBJ_STAVES: case OBJ_MISCELLANY: // Wield any unwielded item of these types. - if (!equipped) + if (!equipped + && (item.base_type != OBJ_MISCELLANY || is_deck(item) + || item.sub_type == MISC_LANTERN_OF_SHADOWS)) { if (check_warning_inscriptions(item, OPER_WIELD)) wield_weapon(true, idx); return; } // Evoke misc. items and rods. - if (item.base_type == OBJ_MISCELLANY || item_is_rod(item)) + if (item_is_evokable(item)) { if (check_warning_inscriptions(item, OPER_EVOKE)) - evoke_wielded(); + evoke_item(idx); return; } // Unwield staves or weapons. |