From 97fe1affe7f3a999b29a7ca932b99b4349b0ea46 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Sun, 26 Oct 2008 19:14:07 +0000 Subject: * Properly deactivate shields during transformations. * Fix a few transformation edge cases: make sure inappropriate equipment is removed when untransforming e.g. if the player was mutated during transformation or wielded a two-handed weapon. * Mention mulching in ammo descriptions. * Fix 2178374: Spell descriptions for items. * FR 2183104: Get rid of training toggle for skills at 27. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7301 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/command.cc | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'crawl-ref/source/command.cc') 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); -- cgit v1.2.3-54-g00ecf