summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/effects.cc13
-rw-r--r--crawl-ref/source/itemprop.cc4
2 files changed, 15 insertions, 2 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index 49702e489c..ac6938ceac 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -2478,7 +2478,7 @@ bool recharge_wand(int item_slot)
if (wand.plus2 < MAX_ROD_CHARGE * ROD_CHARGE_MULT)
{
- wand.plus2 += ROD_CHARGE_MULT;
+ wand.plus2 += ROD_CHARGE_MULT * random_range(1,2);
if (wand.plus2 > MAX_ROD_CHARGE * ROD_CHARGE_MULT)
wand.plus2 = MAX_ROD_CHARGE * ROD_CHARGE_MULT;
@@ -2492,6 +2492,17 @@ bool recharge_wand(int item_slot)
work = true;
}
+ if (short(wand.props["rod_enchantment"]) < MAX_WPN_ENCHANT)
+ {
+ static_cast<short&>(wand.props["rod_enchantment"])
+ += random_range(1,2);
+
+ if (short(wand.props["rod_enchantment"]) > MAX_WPN_ENCHANT)
+ wand.props["rod_enchantment"] = short(MAX_WPN_ENCHANT);
+
+ work = true;
+ }
+
if (!work)
return (false);
diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc
index 9856f7260d..f19bea28f1 100644
--- a/crawl-ref/source/itemprop.cc
+++ b/crawl-ref/source/itemprop.cc
@@ -1096,7 +1096,9 @@ bool item_is_rechargeable(const item_def &it, bool hide_charged, bool weapons)
if (item_ident(it, ISFLAG_KNOW_PLUSES))
{
return (it.plus2 < MAX_ROD_CHARGE * ROD_CHARGE_MULT
- || it.plus < it.plus2);
+ || it.plus < it.plus2
+ || !it.props.exists("rod_enchantment")
+ || short(it.props["rod_enchantment"]) < MAX_WPN_ENCHANT);
}
return (true);
}