summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/command.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/command.cc')
-rw-r--r--crawl-ref/source/command.cc22
1 files changed, 12 insertions, 10 deletions
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc
index 735a31adeb..2ab0f6e507 100644
--- a/crawl-ref/source/command.cc
+++ b/crawl-ref/source/command.cc
@@ -1340,16 +1340,7 @@ static bool _do_description(std::string key, std::string footer = "")
{
char name[80];
snprintf(name, 80, key.c_str());
- if (_append_books(desc, mitm[thing_created], key))
- {
- // nothing to be done
- }
- else if (get_item_by_name(&mitm[thing_created], name, OBJ_BOOKS)
- || get_item_by_name(&mitm[thing_created], name, OBJ_STAVES))
- {
- _append_spells(desc, mitm[thing_created]);
- }
- else if (get_item_by_name(&mitm[thing_created], name, OBJ_WEAPONS))
+ if (get_item_by_name(&mitm[thing_created], name, OBJ_WEAPONS))
{
append_weapon_stats(desc, mitm[thing_created]);
desc += "$";
@@ -1359,6 +1350,17 @@ static bool _do_description(std::string key, std::string footer = "")
append_armour_stats(desc, mitm[thing_created]);
desc += "$";
}
+ else if (get_item_by_name(&mitm[thing_created], name, OBJ_MISSILES))
+ {
+ append_missile_info(desc);
+ desc += "$";
+ }
+ else if (get_item_by_name(&mitm[thing_created], name, OBJ_BOOKS)
+ || get_item_by_name(&mitm[thing_created], name, OBJ_STAVES))
+ {
+ if (!_append_books(desc, mitm[thing_created], key))
+ _append_spells(desc, mitm[thing_created]);
+ }
// Now we don't need the item anymore.
destroy_item(thing_created);