summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/itemname.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-04 23:57:21 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-04 23:57:21 +0000
commit288e44e2590d8791f0841a70ef50108582990278 (patch)
tree558d104f241393407765b96b89e6ac69b726af50 /crawl-ref/source/itemname.cc
parent763ef75bd1f9c97c9f1ebee467bde287f156f483 (diff)
downloadcrawl-ref-288e44e2590d8791f0841a70ef50108582990278.tar.gz
crawl-ref-288e44e2590d8791f0841a70ef50108582990278.zip
Another one with a multitude of (smallish) changes.
- Fixed 1788033, 1787436, 1782862. - Modified basename, so it's a bit more useful and it's seeing use when not switching back during butcher. - Mummy Wanderers won't get a potion. - NOTE_XP_LEVEL_CHANGE notes "real" hp/mp. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2055 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/itemname.cc')
-rw-r--r--crawl-ref/source/itemname.cc40
1 files changed, 32 insertions, 8 deletions
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc
index 400a77da24..1c13c750ae 100644
--- a/crawl-ref/source/itemname.cc
+++ b/crawl-ref/source/itemname.cc
@@ -1019,8 +1019,11 @@ std::string item_def::name_aux( description_level_type desc,
if (know_type && !terse &&
(get_weapon_brand(*this) == SPWPN_VAMPIRICISM))
buff << "vampiric ";
-
- buff << item_base_name(*this);
+ }
+ buff << item_base_name(*this);
+
+ if (!basename)
+ {
if ( know_type )
buff << weapon_brand_name(*this, terse);
@@ -1152,6 +1155,11 @@ std::string item_def::name_aux( description_level_type desc,
break;
case OBJ_WANDS:
+ if (basename)
+ {
+ buff << "wand";
+ break;
+ }
if (know_type)
{
buff << "wand of " << wand_type_name(item_typ);
@@ -1174,6 +1182,11 @@ std::string item_def::name_aux( description_level_type desc,
break;
case OBJ_POTIONS:
+ if (basename)
+ {
+ buff << "potion";
+ break;
+ }
if (know_type)
{
buff << "potion of " << potion_type_name(item_typ);
@@ -1248,7 +1261,11 @@ std::string item_def::name_aux( description_level_type desc,
break;
case OBJ_SCROLLS:
- buff << "scroll ";
+ buff << "scroll";
+ if (basename)
+ break;
+ else
+ buff << " ";
if (know_type)
{
@@ -1268,9 +1285,9 @@ std::string item_def::name_aux( description_level_type desc,
if (basename)
{
if ( jewellery_is_amulet(*this) )
- buff << " amulet";
+ buff << "amulet";
else // i.e., an amulet
- buff << " ring";
+ buff << "ring";
break;
}
@@ -1343,6 +1360,11 @@ std::string item_def::name_aux( description_level_type desc,
{
if ( is_deck(*this) )
{
+ if (basename)
+ {
+ buff << "deck of cards";
+ break;
+ }
buff << deck_rarity_name(deck_rarity(*this)) << ' ';
}
buff << misc_type_name(item_typ, know_type);
@@ -1380,15 +1402,17 @@ std::string item_def::name_aux( description_level_type desc,
case OBJ_STAVES:
if (!know_type)
{
- buff << staff_primary_string(this->special) << " "
- << (item_is_rod( *this ) ? "rod" : "staff");
+ if (!basename)
+ buff << staff_primary_string(this->special) << " ";
+
+ buff << (item_is_rod( *this ) ? "rod" : "staff");
}
else
{
buff << (item_is_rod( *this ) ? "rod" : "staff")
<< " of " << staff_type_name(item_typ);
- if (item_is_rod(*this))
+ if (item_is_rod(*this) && !basename)
{
buff << " (" << (this->plus / ROD_CHARGE_MULT)
<< "/" << (this->plus2 / ROD_CHARGE_MULT)