From 2e5c80c5f2690bb4ef929c6c1a6d0c309afe55e5 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Thu, 30 Aug 2007 14:40:48 +0000 Subject: Several bugfixes. In no particular order: + Beogh shouldn't care about you attacking non-orc friends. + Mummies don't get "Food" listed as ability costs. + corrected order of invis flickering + modified (and tidied) you_can_wear checks and output + added ']' command to list currently worn equipment (inv) + wielded cursed items can no longer be fired + Wanderers no longer get inappropriate armour + Fixed "bad item" message for confirm-inscribed items + copied "Discharge" to "Static Discharge" in spells.txt (Maybe we should remove the first, but I was unsure about that, so I left it for now.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2035 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/command.cc | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'crawl-ref/source/command.cc') diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc index ac2bdecbdb..61f53d29a5 100644 --- a/crawl-ref/source/command.cc +++ b/crawl-ref/source/command.cc @@ -374,21 +374,12 @@ void list_armour() if (armour_id != -1) estr << you.inv[armour_id].name(DESC_INVENTORY); - - if (!you_can_wear(i)) - { - if (i == EQ_BODY_ARMOUR || i == EQ_HELMET) - { - if (!you_tran_can_wear(i)) - estr << " (currently unavailable)"; - else - estr << " (ill-fitting)"; - } - else - estr << " (unavailable)"; - } + else if (!you_can_wear(i,true)) + estr << " (unavailable)"; else if (!you_tran_can_wear(i)) estr << " (currently unavailable)"; + else if (!you_can_wear(i)) + estr << " (ill-fitting)"; else estr << " none"; @@ -463,10 +454,13 @@ void list_weapons(void) else wstring = "Secondary : "; - if (is_valid_item( you.inv[i] )) + if (is_valid_item( you.inv[i]) && + (you.inv[i].base_type == OBJ_WEAPONS + || you.inv[i].base_type == OBJ_STAVES + || you.inv[i].base_type == OBJ_MISCELLANY)) + { wstring += you.inv[i].name(DESC_INVENTORY_EQUIP); - else if (!you_tran_can_wear(EQ_WEAPON)) - wstring += " (currently unavailable)"; + } else wstring += " none"; -- cgit v1.2.3-54-g00ecf