Skip to content

Commit

Permalink
Show wand max charges in the inventory (coledot)
Browse files Browse the repository at this point in the history
  • Loading branch information
PleasingFungus committed Dec 19, 2015
1 parent 9229740 commit c59c8fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
13 changes: 3 additions & 10 deletions crawl-ref/source/describe.cc
Expand Up @@ -1792,17 +1792,10 @@ string get_item_description(const item_def &item, bool verbose,
}


if (item_type_known(item))
if (item_type_known(item) && !item_ident(item, ISFLAG_KNOW_PLUSES))
{
const int max_charges = wand_max_charges(item);
if (item.charges < max_charges
|| !item_ident(item, ISFLAG_KNOW_PLUSES))
{
description << "\nIt can have at most " << max_charges
<< " charges.";
}
else
description << "\nIt is fully charged.";
description << "\nIt can have at most " << wand_max_charges(item)
<< " charges.";
}

if (known_empty)
Expand Down
2 changes: 1 addition & 1 deletion crawl-ref/source/itemname.cc
Expand Up @@ -1767,7 +1767,7 @@ string item_def::name_aux(description_level_type desc, bool terse, bool ident,
}

if (know_pluses)
buff << " (" << charges << ")";
buff << " (" << charges << "/" << wand_max_charges(*this) << ")";
else if (!dbname && with_inscription)
{
if (used_count == ZAPCOUNT_EMPTY)
Expand Down

0 comments on commit c59c8fa

Please sign in to comment.