From df60335c0db15d7115f650d529a8d356009b56a5 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 5 Jun 2015 11:43:02 -0400 Subject: [PATCH] v0.3.0c: reworked wand of magic missile staff effect, now charges all wands. --- .../items/wands/WandOfMagicMissile.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfMagicMissile.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfMagicMissile.java index 5e0ef4eb6..d2f19a560 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfMagicMissile.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfMagicMissile.java @@ -19,7 +19,9 @@ package com.shatteredpixel.shatteredpixeldungeon.items.wands; import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.effects.SpellSprite; +import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRecharging; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff; import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; @@ -49,9 +51,11 @@ public class WandOfMagicMissile extends Wand { @Override public void onHit(MagesStaff staff, Char attacker, Char defender, int damage) { - //regains lvl*5% of total missing charge - partialCharge += ((maxCharges - curCharges)/20f)*staff.level; - SpellSprite.show(attacker, SpellSprite.CHARGE); + //gain 1 turn of recharging buff per level of the wand. + if (level > 0) { + Buff.prolong( attacker, ScrollOfRecharging.Recharging.class, (float)staff.level); + SpellSprite.show(attacker, SpellSprite.CHARGE); + } } protected int initialCharges() {