v0.3.0c: reworked wand of magic missile staff effect, now charges all wands.
This commit is contained in:
committed by
Evan Debenham
parent
976ff5cb96
commit
df60335c0d
@@ -19,7 +19,9 @@ package com.shatteredpixel.shatteredpixeldungeon.items.wands;
|
|||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.SpellSprite;
|
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.items.weapon.melee.MagesStaff;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
@@ -49,9 +51,11 @@ public class WandOfMagicMissile extends Wand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onHit(MagesStaff staff, Char attacker, Char defender, int damage) {
|
public void onHit(MagesStaff staff, Char attacker, Char defender, int damage) {
|
||||||
//regains lvl*5% of total missing charge
|
//gain 1 turn of recharging buff per level of the wand.
|
||||||
partialCharge += ((maxCharges - curCharges)/20f)*staff.level;
|
if (level > 0) {
|
||||||
SpellSprite.show(attacker, SpellSprite.CHARGE);
|
Buff.prolong( attacker, ScrollOfRecharging.Recharging.class, (float)staff.level);
|
||||||
|
SpellSprite.show(attacker, SpellSprite.CHARGE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected int initialCharges() {
|
protected int initialCharges() {
|
||||||
|
|||||||
Reference in New Issue
Block a user