From 6ceab003bb46f769b5f4d1c0d7429f5032f3c017 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Fri, 26 Dec 2008 22:21:16 +0000 Subject: Fix 2448686: some jewellery properties not working properly while transformed. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7983 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/output.cc | 47 +++++++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 21 deletions(-) (limited to 'crawl-ref/source/output.cc') diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc index 78539a2abe..ec6343346b 100644 --- a/crawl-ref/source/output.cc +++ b/crawl-ref/source/output.cc @@ -1646,26 +1646,15 @@ static void _print_overview_screen_equip(column_composer& cols, int eqslot = e_order[i]; char slot_name_lwr[15]; - snprintf(slot_name_lwr, sizeof slot_name_lwr, "%s", equip_slot_to_name(eqslot)); + snprintf(slot_name_lwr, sizeof slot_name_lwr, "%s", + equip_slot_to_name(eqslot)); strlwr(slot_name_lwr); char slot[15] = ""; // uncomment (and change 42 to 33) to bring back slot names // snprintf(slot, sizeof slot, "%-7s: ", equip_slot_to_name(eqslot); - if (!you_can_wear(e_order[i], true)) - { - snprintf(buf, sizeof buf, - "%s(%s unavailable)", - slot, slot_name_lwr); - } - else if (!you_tran_can_wear(e_order[i], true)) - { - snprintf(buf, sizeof buf, - "%s(%s currently unavailable)", - slot, slot_name_lwr); - } - else if (you.equip[ e_order[i] ] != -1) + if (you.equip[ e_order[i] ] != -1) { const int item_idx = you.equip[e_order[i]]; const item_def& item = you.inv[item_idx]; @@ -1681,21 +1670,37 @@ static void _print_overview_screen_equip(column_composer& cols, colname); equip_chars.push_back(equip_char); } - else if (!you_can_wear(e_order[i])) + else if (e_order[i] == EQ_WEAPON + && you.skills[SK_UNARMED_COMBAT]) { - snprintf(buf, sizeof buf, - "%s(%s restricted)", - slot, slot_name_lwr); + snprintf(buf, sizeof buf, "%s - Unarmed", slot); } else if (e_order[i] == EQ_WEAPON && you.attribute[ATTR_TRANSFORMATION] == TRAN_BLADE_HANDS) { snprintf(buf, sizeof buf, "%s - Blade Hands", slot); } - else if (e_order[i] == EQ_WEAPON - && you.skills[SK_UNARMED_COMBAT]) + else if (e_order[i] == EQ_BOOTS + && (you.species == SP_NAGA || you.species == SP_CENTAUR)) { - snprintf(buf, sizeof buf, "%s - Unarmed", slot); + snprintf(buf, sizeof buf, + "(no %s)", slot_name_lwr); + } + else if (!you_can_wear(e_order[i], true)) + { + snprintf(buf, sizeof buf, + "(%s unavailable)", slot_name_lwr); + } + else if (!you_tran_can_wear(e_order[i], true)) + { + snprintf(buf, sizeof buf, + "(%s currently unavailable)", + slot_name_lwr); + } + else if (!you_can_wear(e_order[i])) + { + snprintf(buf, sizeof buf, + "(%s restricted)", slot_name_lwr); } else { -- cgit v1.2.3-54-g00ecf