From 4153ebb74a9cbcdb20f904f61ec3f77e8438c507 Mon Sep 17 00:00:00 2001 From: dolorous Date: Thu, 14 May 2009 13:44:12 +0000 Subject: 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 --- crawl-ref/source/effects.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/effects.cc') 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; -- cgit v1.2.3-54-g00ecf