summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/output.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-26 22:21:16 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-26 22:21:16 +0000
commit6ceab003bb46f769b5f4d1c0d7429f5032f3c017 (patch)
tree26175ebc265af365f2ea144f5740899e7332013d /crawl-ref/source/output.cc
parent3cfe89ce027c008e6fe651b79171afa5da78cd85 (diff)
downloadcrawl-ref-6ceab003bb46f769b5f4d1c0d7429f5032f3c017.tar.gz
crawl-ref-6ceab003bb46f769b5f4d1c0d7429f5032f3c017.zip
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
Diffstat (limited to 'crawl-ref/source/output.cc')
-rw-r--r--crawl-ref/source/output.cc47
1 files changed, 26 insertions, 21 deletions
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<darkgrey>(%s unavailable)</darkgrey>",
- slot, slot_name_lwr);
- }
- else if (!you_tran_can_wear(e_order[i], true))
- {
- snprintf(buf, sizeof buf,
- "%s<darkgrey>(%s currently unavailable)</darkgrey>",
- 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<lightgrey>(%s restricted)</lightgrey>",
- 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,
+ "<darkgrey>(no %s)</darkgrey>", slot_name_lwr);
+ }
+ else if (!you_can_wear(e_order[i], true))
+ {
+ snprintf(buf, sizeof buf,
+ "<darkgrey>(%s unavailable)</darkgrey>", slot_name_lwr);
+ }
+ else if (!you_tran_can_wear(e_order[i], true))
+ {
+ snprintf(buf, sizeof buf,
+ "<darkgrey>(%s currently unavailable)</darkgrey>",
+ slot_name_lwr);
+ }
+ else if (!you_can_wear(e_order[i]))
+ {
+ snprintf(buf, sizeof buf,
+ "<lightgrey>(%s restricted)</lightgrey>", slot_name_lwr);
}
else
{