summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/invent.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2013-12-22 10:41:19 -0500
committerNeil Moore <neil@s-z.org>2013-12-22 10:41:19 -0500
commitabf99355d8b96edcde7a36537e0808295c3240a2 (patch)
treeebe19d72c470a008d7ef9e6eef3dafd2377684bd /crawl-ref/source/invent.cc
parent3e71587fcec31e068e104df59aa9c0401add3cd9 (diff)
downloadcrawl-ref-abf99355d8b96edcde7a36537e0808295c3240a2.tar.gz
crawl-ref-abf99355d8b96edcde7a36537e0808295c3240a2.zip
Make no-evokables message clearer.
If the player has an item that is only evokable when wielded (including polearms), indicate that in the message.
Diffstat (limited to 'crawl-ref/source/invent.cc')
-rw-r--r--crawl-ref/source/invent.cc21
1 files changed, 20 insertions, 1 deletions
diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc
index 52850d91ab..f6f4c336df 100644
--- a/crawl-ref/source/invent.cc
+++ b/crawl-ref/source/invent.cc
@@ -446,6 +446,22 @@ static bool _has_tran_unwearable_armour()
return false;
}
+static bool _has_hand_evokable()
+{
+ for (int i = 0; i < ENDOFPACK; i++)
+ {
+ item_def &item(you.inv[i]);
+
+ if (item.defined()
+ && item_is_evokable(item, true, true, true, false, false)
+ && !item_is_evokable(item, true, true, true, false, true))
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
static string _no_selectables_message(int item_selector)
{
switch (item_selector)
@@ -494,7 +510,10 @@ static string _no_selectables_message(int item_selector)
case OSEL_BUTCHERY:
return "You aren't carrying any sharp implements.";
case OSEL_EVOKABLE:
- return "You aren't carrying any items that can be evoked.";
+ if (_has_hand_evokable())
+ return "You aren't carrying any items that can be evoked without being wielded.";
+ else
+ return "You aren't carrying any items that can be evoked.";
case OSEL_FRUIT:
return "You aren't carrying any fruit.";
case OSEL_CURSED_WORN: