From e84562b1b71f7d9c094d1da7f4e8753ab37550d8 Mon Sep 17 00:00:00 2001 From: haranp Date: Thu, 5 Feb 2009 22:31:20 +0000 Subject: 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 --- crawl-ref/source/describe.cc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/describe.cc') 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 { -- cgit v1.2.3-54-g00ecf