summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/effects.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-05-14 13:44:12 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-05-14 13:44:12 +0000
commit4153ebb74a9cbcdb20f904f61ec3f77e8438c507 (patch)
tree7b903c14b232df34cd2c2f9c11f25faabedb37bd /crawl-ref/source/effects.cc
parent4759bd486654762763a6d480f9d911881bbfdabd (diff)
downloadcrawl-ref-4153ebb74a9cbcdb20f904f61ec3f77e8438c507.tar.gz
crawl-ref-4153ebb74a9cbcdb20f904f61ec3f77e8438c507.zip
Fix pluralization problem when recharging a wand only gives it 1 charge.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9764 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r--crawl-ref/source/effects.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index f7afc95f16..74ca4db599 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -1941,19 +1941,22 @@ bool recharge_wand(int item_slot)
wand.plus,
std::min(charge_gain * 3,
wand.plus +
- 1 + random2avg( ((charge_gain - 1) * 3) + 1, 3 )));
+ 1 + random2avg(((charge_gain - 1) * 3) + 1, 3)));
const bool charged = (new_charges > wand.plus);
std::string desc;
+
if (charged && item_ident(wand, ISFLAG_KNOW_PLUSES))
{
- snprintf(info, INFO_SIZE, " and now has %d charges", new_charges);
+ snprintf(info, INFO_SIZE, " and now has %d charge%s",
+ new_charges, new_charges == 1 ? "" : "s");
desc = info;
}
+
mprf("%s %s for a moment%s.",
wand.name(DESC_CAP_YOUR).c_str(),
- charged? "glows" : "flickers",
+ charged ? "glows" : "flickers",
desc.c_str());
wand.plus = new_charges;