From 9371f3c245e64e9556ddf7203142fd315a5a982a Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Tue, 25 Mar 2008 11:07:45 +0000 Subject: 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 --- crawl-ref/source/item_use.cc | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/item_use.cc') 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 -- cgit v1.2.3-54-g00ecf