diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfLivingEarth.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfLivingEarth.java index 60c5bf407..4f88a667d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfLivingEarth.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfLivingEarth.java @@ -40,6 +40,7 @@ import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; import com.watabou.noosa.audio.Sample; import com.watabou.utils.Bundle; import com.watabou.utils.Callback; +import com.watabou.utils.ColorMath; import com.watabou.utils.PathFinder; import com.watabou.utils.Random; @@ -188,8 +189,18 @@ public class WandOfLivingEarth extends DamageWand { @Override public void staffFx(MagesStaff.StaffParticle particle) { - //TODO - super.staffFx(particle); + if (Random.Int(10) == 0){ + particle.color(ColorMath.random(0xFFF568, 0x80791A)); + } else { + particle.color(ColorMath.random(0x805500, 0x332500)); + } + particle.am = 1f; + particle.setLifespan(2f); + particle.setSize( 1f, 2f); + particle.shuffleXY(0.5f); + float dst = Random.Float(11f); + particle.x -= dst; + particle.y += dst; } public static class RockArmor extends Buff { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfWarding.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfWarding.java index 074b01f1b..9a815c9af 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfWarding.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfWarding.java @@ -21,6 +21,7 @@ import com.watabou.noosa.audio.Sample; import com.watabou.utils.Bundle; import com.watabou.utils.Callback; import com.watabou.utils.PathFinder; +import com.watabou.utils.PointF; import com.watabou.utils.Random; public class WandOfWarding extends Wand { @@ -86,13 +87,30 @@ public class WandOfWarding extends Wand { @Override public void onHit(MagesStaff staff, Char attacker, Char defender, int damage) { - //TODO + + int level = Math.max( 0, staff.level() ); + + // lvl 0 - 20% + // lvl 1 - 33% + // lvl 2 - 43% + if (Random.Int( level + 5 ) >= 4) { + for (Char ch : Actor.chars()){ + if (ch instanceof Ward){ + ((Ward) ch).wandHeal(staff.level()); + ch.sprite.emitter().burst(MagicMissile.WardParticle.UP, ((Ward) ch).tier); + } + } + } } @Override public void staffFx(MagesStaff.StaffParticle particle) { - //TODO - super.staffFx(particle); + particle.color( 0x8822FF ); + particle.am = 0.3f; + particle.setLifespan(3f); + particle.speed.polar(Random.Float(PointF.PI2), 0.3f); + particle.setSize( 1f, 2f); + particle.radiateXY(2.5f); } public static boolean canPlaceWard(int pos){ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MagesStaff.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MagesStaff.java index 1f269a533..59c994763 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MagesStaff.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MagesStaff.java @@ -35,6 +35,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfCorrosion; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfCorruption; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfDisintegration; +import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfLivingEarth; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfRegrowth; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; @@ -378,7 +379,8 @@ public class MagesStaff extends MeleeWeapon { return !((wand instanceof WandOfDisintegration) || (wand instanceof WandOfCorruption) || (wand instanceof WandOfCorrosion) - || (wand instanceof WandOfRegrowth)); + || (wand instanceof WandOfRegrowth) + || (wand instanceof WandOfLivingEarth)); } };