git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6528 c06c8d41-db1a-0410-9941-cceddc491573
XNSBXTNKIHKTFUAAVT2H6Y2DCJVVS57CN4E7645OSSC5SKAI2QHAC
LBIXGRQC64MEHG7L74PCGU3EXD3WVUCDR7DHEHCI5OCOJAXSA7PQC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
CIPVRZGLOZHCERK6YPOBV3P2E4IAB4H6D5EHLRQE2O5E4P4VCBUAC
RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC
mprf("%s glows for a moment.", wand.name(DESC_CAP_YOUR).c_str());
wand.plus += 1 + random2avg( ((charge_gain - 1) * 3) + 1, 3 );
const int new_charges = std::max<int>( wand.plus, std::min(charge_gain * 3, wand.plus + 1 + random2avg( ((charge_gain - 1) * 3) + 1, 3 )));
const int new_charges =
std::max<int>(
wand.plus,
std::min(charge_gain * 3,
wand.plus +
1 + random2avg( ((charge_gain - 1) * 3) + 1, 3 )));
if (wand.plus > charge_gain * 3) wand.plus = charge_gain * 3;
if (wand.plus > charge_gain * 3)
wand.plus = charge_gain * 3;
const bool charged = new_charges > wand.plus; mprf("%s %s for a moment.", wand.name(DESC_CAP_YOUR).c_str(), charged? "glows" : "flickers"); wand.plus = new_charges;
const bool charged = new_charges > wand.plus;
mprf("%s %s for a moment.",
wand.name(DESC_CAP_YOUR).c_str(),
charged? "glows" : "flickers");
wand.plus = new_charges;