v0.7.4: implement battlemage fx and staff vfx for new wands
This commit is contained in:
parent
c174e998bc
commit
99d47f3825
|
@ -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 {
|
||||
|
|
|
@ -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){
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user