summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/describe.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-05 22:31:20 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-05 22:31:20 +0000
commite84562b1b71f7d9c094d1da7f4e8753ab37550d8 (patch)
treeeba64c2fd0af673c07db2e631e16c9a1f8d03fb2 /crawl-ref/source/describe.cc
parent73aba681ac5121241c2d7363e180878c462892e7 (diff)
downloadcrawl-ref-e84562b1b71f7d9c094d1da7f4e8753ab37550d8.tar.gz
crawl-ref-e84562b1b71f7d9c094d1da7f4e8753ab37550d8.zip
Fix buggy charge descriptions of rods [2566892]. I'm still not too happy
with the description, but such is life. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8914 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/describe.cc')
-rw-r--r--crawl-ref/source/describe.cc16
1 files changed, 12 insertions, 4 deletions
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index 9d9ece2880..f5ebbfa8a4 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -2068,11 +2068,19 @@ std::string get_item_description( const item_def &item, bool verbose,
"recharges automatically by channeling mana from its "
"wielder.";
- const int max_charges = MAX_ROD_CHARGE * ROD_CHARGE_MULT;
- if (item_ident(item, ISFLAG_KNOW_PLUSES)
- && item.plus2 >= max_charges && item.plus >= item.plus2)
+ const int max_charges = MAX_ROD_CHARGE;
+ if (item_ident(item, ISFLAG_KNOW_PLUSES))
{
- description << "$It is fully charged.";
+ const int num_charges = item.plus2 / ROD_CHARGE_MULT;
+ if (max_charges > num_charges)
+ {
+ description << "$It can currently hold " << num_charges
+ << " charges. It can be magically recharged "
+ << "to contain up to " << max_charges
+ << " charges.";
+ }
+ else
+ description << "$It is fully charged.";
}
else
{