summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-25 11:07:45 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-25 11:07:45 +0000
commit9371f3c245e64e9556ddf7203142fd315a5a982a (patch)
treecc59e4f4476474cf37a1aa1d7b27b60f5d2076d6 /crawl-ref/source/item_use.cc
parentbbfe87d892a69f1d841ce84375993417a7e4b4c8 (diff)
downloadcrawl-ref-9371f3c245e64e9556ddf7203142fd315a5a982a.tar.gz
crawl-ref-9371f3c245e64e9556ddf7203142fd315a5a982a.zip
Tiles:
* Fix cursed wielded weapons being throwable. (Whoops!) * Improve logic for mouse-over information in inventory. Add Confusing Touch ("Touch") and Sure Blade ("Blade") to the status output. I've moved BWpn into line 3 to make space for the others. Still, the status can get positively cluttered. Apply coding convention to static methods in output.cc. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3872 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc16
1 files changed, 11 insertions, 5 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index a0db7dc46a..9cd3474857 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -1497,7 +1497,15 @@ static bool _fire_choose_item_and_target(int& item, dist& target)
const bool was_chosen = (item != -1);
if (was_chosen)
+ {
+ if (you.equip[EQ_WEAPON] == item
+ && item_cursed(you.inv[item]))
+ {
+ mpr("You can't fire a cursed item!");
+ return false;
+ }
beh.item = item; // force item to be the prechosen one
+ }
beh.message_ammo_prompt();
message_current_target(); // XXX: this stuff should be done by direction()
@@ -3511,10 +3519,8 @@ void inscribe_item()
mpr("You don't have anything to inscribe.");
return;
}
- item_slot = prompt_invent_item(
- "Inscribe which item? ",
- MT_INVLIST,
- OSEL_ANY );
+ item_slot = prompt_invent_item("Inscribe which item? ",
+ MT_INVLIST, OSEL_ANY );
if (item_slot == PROMPT_ABORT)
{
canned_msg( MSG_OK );
@@ -3534,7 +3540,7 @@ void inscribe_item()
}
you.inv[item_slot].inscription = std::string(buf);
- you.wield_change = true;
+ you.wield_change = true;
you.quiver_change = true;
}
else