v0.4.3: improved visuals for mage's staff
This commit is contained in:
parent
4bc9a0c453
commit
8fc901c985
Binary file not shown.
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
@ -242,8 +242,8 @@ public abstract class Wand extends Item {
|
||||||
particle.color(0xFFFFFF); particle.am = 0.3f;
|
particle.color(0xFFFFFF); particle.am = 0.3f;
|
||||||
particle.setLifespan( 1f);
|
particle.setLifespan( 1f);
|
||||||
particle.speed.polar( Random.Float(PointF.PI2), 2f );
|
particle.speed.polar( Random.Float(PointF.PI2), 2f );
|
||||||
particle.setSize( 1f, 2.5f );
|
particle.setSize( 1f, 2f );
|
||||||
particle.radiateXY(1f);
|
particle.radiateXY(0.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void wandUsed() {
|
protected void wandUsed() {
|
||||||
|
|
|
@ -167,10 +167,10 @@ public class WandOfBlastWave extends DamageWand {
|
||||||
@Override
|
@Override
|
||||||
public void staffFx(MagesStaff.StaffParticle particle) {
|
public void staffFx(MagesStaff.StaffParticle particle) {
|
||||||
particle.color( 0x664422 ); particle.am = 0.6f;
|
particle.color( 0x664422 ); particle.am = 0.6f;
|
||||||
particle.setLifespan(2f);
|
particle.setLifespan(3f);
|
||||||
particle.speed.polar(Random.Float(PointF.PI2), 0.3f);
|
particle.speed.polar(Random.Float(PointF.PI2), 0.3f);
|
||||||
particle.setSize( 1f, 2f);
|
particle.setSize( 1f, 2f);
|
||||||
particle.radiateXY(3f);
|
particle.radiateXY(2.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class BlastWave extends Image {
|
public static class BlastWave extends Image {
|
||||||
|
|
|
@ -111,10 +111,10 @@ public class WandOfCorruption extends Wand {
|
||||||
public void staffFx(MagesStaff.StaffParticle particle) {
|
public void staffFx(MagesStaff.StaffParticle particle) {
|
||||||
particle.color( 0 );
|
particle.color( 0 );
|
||||||
particle.am = 0.6f;
|
particle.am = 0.6f;
|
||||||
particle.setLifespan(0.8f);
|
particle.setLifespan(2f);
|
||||||
particle.acc.set(0, 20);
|
particle.speed.set(0, 5);
|
||||||
particle.setSize( 0f, 3f);
|
particle.setSize( 0.5f, 2f);
|
||||||
particle.shuffleXY(2f);
|
particle.shuffleXY(1f);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,10 +127,10 @@ public class WandOfDisintegration extends DamageWand {
|
||||||
public void staffFx(MagesStaff.StaffParticle particle) {
|
public void staffFx(MagesStaff.StaffParticle particle) {
|
||||||
particle.color(0x220022);
|
particle.color(0x220022);
|
||||||
particle.am = 0.6f;
|
particle.am = 0.6f;
|
||||||
particle.setLifespan(0.6f);
|
particle.setLifespan(1f);
|
||||||
particle.acc.set(40, -40);
|
particle.acc.set(10, -10);
|
||||||
particle.setSize(0f, 3f);
|
particle.setSize( 0.5f, 3f);
|
||||||
particle.shuffleXY(2f);
|
particle.shuffleXY(1f);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -186,7 +186,7 @@ public class WandOfFireblast extends DamageWand {
|
||||||
particle.setLifespan(0.6f);
|
particle.setLifespan(0.6f);
|
||||||
particle.acc.set(0, -40);
|
particle.acc.set(0, -40);
|
||||||
particle.setSize( 0f, 3f);
|
particle.setSize( 0f, 3f);
|
||||||
particle.shuffleXY(2f);
|
particle.shuffleXY( 1.5f );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,12 +114,12 @@ public class WandOfFrost extends DamageWand {
|
||||||
public void staffFx(MagesStaff.StaffParticle particle) {
|
public void staffFx(MagesStaff.StaffParticle particle) {
|
||||||
particle.color(0x88CCFF);
|
particle.color(0x88CCFF);
|
||||||
particle.am = 0.6f;
|
particle.am = 0.6f;
|
||||||
particle.setLifespan(1.5f);
|
particle.setLifespan(2f);
|
||||||
float angle = Random.Float(PointF.PI2);
|
float angle = Random.Float(PointF.PI2);
|
||||||
particle.speed.polar( angle, 2f);
|
particle.speed.polar( angle, 2f);
|
||||||
particle.acc.set( 0f, 1f);
|
particle.acc.set( 0f, 1f);
|
||||||
particle.setSize( 0f, 1.5f);
|
particle.setSize( 0f, 1.5f);
|
||||||
particle.radiateXY(Random.Float(2f));
|
particle.radiateXY(Random.Float(1f));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,8 +147,8 @@ public class WandOfLightning extends DamageWand {
|
||||||
particle.speed.polar(-Random.Float(3.1415926f), 6f);
|
particle.speed.polar(-Random.Float(3.1415926f), 6f);
|
||||||
particle.setSize(0f, 1.5f);
|
particle.setSize(0f, 1.5f);
|
||||||
particle.sizeJitter = 1f;
|
particle.sizeJitter = 1f;
|
||||||
particle.shuffleXY(2f);
|
particle.shuffleXY(1f);
|
||||||
float dst = Random.Float(2f);
|
float dst = Random.Float(1f);
|
||||||
particle.x -= dst;
|
particle.x -= dst;
|
||||||
particle.y += dst;
|
particle.y += dst;
|
||||||
}
|
}
|
||||||
|
|
|
@ -144,11 +144,11 @@ public class WandOfPrismaticLight extends DamageWand {
|
||||||
@Override
|
@Override
|
||||||
public void staffFx(MagesStaff.StaffParticle particle) {
|
public void staffFx(MagesStaff.StaffParticle particle) {
|
||||||
particle.color( Random.Int( 0x1000000 ) );
|
particle.color( Random.Int( 0x1000000 ) );
|
||||||
particle.am = 0.3f;
|
particle.am = 0.5f;
|
||||||
particle.setLifespan(1f);
|
particle.setLifespan(1f);
|
||||||
particle.speed.polar(Random.Float(PointF.PI2), 2f);
|
particle.speed.polar(Random.Float(PointF.PI2), 2f);
|
||||||
particle.setSize( 1f, 2.5f);
|
particle.setSize( 1f, 2f);
|
||||||
particle.radiateXY(1f);
|
particle.radiateXY( 0.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -235,9 +235,9 @@ public class WandOfRegrowth extends Wand {
|
||||||
public void staffFx(MagesStaff.StaffParticle particle) {
|
public void staffFx(MagesStaff.StaffParticle particle) {
|
||||||
particle.color( ColorMath.random(0x004400, 0x88CC44) );
|
particle.color( ColorMath.random(0x004400, 0x88CC44) );
|
||||||
particle.am = 1f;
|
particle.am = 1f;
|
||||||
particle.setLifespan(1.2f);
|
particle.setLifespan(1f);
|
||||||
particle.setSize( 1f, 2f);
|
particle.setSize( 1f, 1.5f);
|
||||||
particle.shuffleXY(1f);
|
particle.shuffleXY(0.5f);
|
||||||
float dst = Random.Float(11f);
|
float dst = Random.Float(11f);
|
||||||
particle.x -= dst;
|
particle.x -= dst;
|
||||||
particle.y += dst;
|
particle.y += dst;
|
||||||
|
|
|
@ -209,10 +209,10 @@ public class WandOfTransfusion extends Wand {
|
||||||
public void staffFx(MagesStaff.StaffParticle particle) {
|
public void staffFx(MagesStaff.StaffParticle particle) {
|
||||||
particle.color( 0xCC0000 );
|
particle.color( 0xCC0000 );
|
||||||
particle.am = 0.6f;
|
particle.am = 0.6f;
|
||||||
particle.setLifespan(0.8f);
|
particle.setLifespan(1f);
|
||||||
particle.speed.polar( Random.Float(PointF.PI2), 2f );
|
particle.speed.polar( Random.Float(PointF.PI2), 2f );
|
||||||
particle.setSize( 1f, 2.5f);
|
particle.setSize( 1f, 2f);
|
||||||
particle.radiateXY(1f);
|
particle.radiateXY(0.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final String FREECHARGE = "freecharge";
|
private static final String FREECHARGE = "freecharge";
|
||||||
|
|
|
@ -34,6 +34,7 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
import com.watabou.noosa.audio.Sample;
|
import com.watabou.noosa.audio.Sample;
|
||||||
import com.watabou.utils.Callback;
|
import com.watabou.utils.Callback;
|
||||||
|
import com.watabou.utils.ColorMath;
|
||||||
import com.watabou.utils.PathFinder;
|
import com.watabou.utils.PathFinder;
|
||||||
|
|
||||||
public class WandOfVenom extends Wand {
|
public class WandOfVenom extends Wand {
|
||||||
|
@ -72,11 +73,12 @@ public class WandOfVenom extends Wand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void staffFx(MagesStaff.StaffParticle particle) {
|
public void staffFx(MagesStaff.StaffParticle particle) {
|
||||||
particle.color( 0x8844FF ); particle.am = 0.6f;
|
particle.color( ColorMath.random( 0x8844FF, 0x00FF00) );
|
||||||
particle.setLifespan(0.6f);
|
particle.am = 0.6f;
|
||||||
particle.acc.set(0, 40);
|
particle.setLifespan( 1f );
|
||||||
particle.setSize( 0f, 3f);
|
particle.acc.set(0, 20);
|
||||||
particle.shuffleXY(2f);
|
particle.setSize( 0.5f, 2f);
|
||||||
|
particle.shuffleXY( 1f );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.QuickSlot;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
||||||
|
@ -37,6 +38,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfRegrowth;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.ui.QuickSlotButton;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
|
import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndItem;
|
import com.shatteredpixel.shatteredpixeldungeon.windows.WndItem;
|
||||||
|
@ -193,7 +195,15 @@ public class MagesStaff extends MeleeWeapon {
|
||||||
|
|
||||||
name = Messages.get(wand, "staff_name");
|
name = Messages.get(wand, "staff_name");
|
||||||
|
|
||||||
updateQuickslot();
|
//This is necessary to reset any particles.
|
||||||
|
//FIXME this is gross, should implement a better way to fully reset quickslot visuals
|
||||||
|
int slot = Dungeon.quickslot.getSlot(this);
|
||||||
|
if (slot != -1){
|
||||||
|
Dungeon.quickslot.clearSlot(slot);
|
||||||
|
updateQuickslot();
|
||||||
|
Dungeon.quickslot.setSlot( slot, this );
|
||||||
|
updateQuickslot();
|
||||||
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -257,9 +267,9 @@ public class MagesStaff extends MeleeWeapon {
|
||||||
public Emitter emitter() {
|
public Emitter emitter() {
|
||||||
if (wand == null) return null;
|
if (wand == null) return null;
|
||||||
Emitter emitter = new Emitter();
|
Emitter emitter = new Emitter();
|
||||||
emitter.pos(12.5f, 2.5f);
|
emitter.pos(12.5f, 3);
|
||||||
emitter.fillTarget = false;
|
emitter.fillTarget = false;
|
||||||
emitter.pour(StaffParticleFactory, 0.06f);
|
emitter.pour(StaffParticleFactory, 0.1f);
|
||||||
return emitter;
|
return emitter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user