summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/invent.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-29 23:56:58 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-29 23:56:58 +0000
commit635a2c2229884aed7bee08796021e6dbe4d2e101 (patch)
treea411d5ca875deeb7a60e815eea4e2923087241a5 /crawl-ref/source/invent.cc
parent63036c9e5ed0103475fea0c6710317f15e8cdb24 (diff)
downloadcrawl-ref-635a2c2229884aed7bee08796021e6dbe4d2e101.tar.gz
crawl-ref-635a2c2229884aed7bee08796021e6dbe4d2e101.zip
Bug 2031257: can't fire-no-quiver ('F') if there are no thorwable items
in inventory. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6724 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/invent.cc')
-rw-r--r--crawl-ref/source/invent.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc
index 9b12c69551..3d05ec4bf1 100644
--- a/crawl-ref/source/invent.cc
+++ b/crawl-ref/source/invent.cc
@@ -1320,6 +1320,12 @@ int prompt_invent_item( const char *prompt,
int *const count,
operation_types oper )
{
+ if (!_any_items_to_select(type_expect) && type_expect == OSEL_THROWABLE
+ && oper == OPER_FIRE && mtype == MT_INVLIST)
+ {
+ type_expect = OSEL_ANY;
+ }
+
if (!_any_items_to_select(type_expect) && type_expect != OSEL_WIELD
&& mtype == MT_INVLIST)
{