v3.0.0: added better vfx to T1 Cleric spells

This commit is contained in:
Evan Debenham
2024-11-13 19:45:10 -05:00
parent 8f45080d93
commit 6173b6ead0
6 changed files with 33 additions and 2 deletions
@@ -24,6 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells;
import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.effects.Identification;
import com.shatteredpixel.shatteredpixeldungeon.items.EquipableItem; import com.shatteredpixel.shatteredpixeldungeon.items.EquipableItem;
import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HolyTome; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HolyTome;
@@ -68,8 +69,9 @@ public class DetectCurse extends InventoryClericSpell {
hero.spend( 1f ); hero.spend( 1f );
hero.busy(); hero.busy();
hero.sprite.operate(hero.pos); hero.sprite.operate(hero.pos);
hero.sprite.parent.add( new Identification( hero.sprite.center().offset( 0, -16 ) ) );
Sample.INSTANCE.play( Assets.Sounds.SCAN ); Sample.INSTANCE.play( Assets.Sounds.READ );
onSpellCast(tome, hero); onSpellCast(tome, hero);
} }
@@ -63,7 +63,7 @@ public class GuidingLight extends TargetedClericSpell {
hero.busy(); hero.busy();
Sample.INSTANCE.play( Assets.Sounds.ZAP ); Sample.INSTANCE.play( Assets.Sounds.ZAP );
hero.sprite.zap(target); hero.sprite.zap(target);
MagicMissile.boltFromChar(hero.sprite.parent, MagicMissile.MAGIC_MISSILE, hero.sprite, aim.collisionPos, new Callback() { MagicMissile.boltFromChar(hero.sprite.parent, MagicMissile.LIGHT_MISSILE, hero.sprite, aim.collisionPos, new Callback() {
@Override @Override
public void call() { public void call() {
@@ -71,6 +71,7 @@ public class GuidingLight extends TargetedClericSpell {
if (ch != null) { if (ch != null) {
ch.damage(Random.NormalIntRange(2, 6), GuidingLight.this); ch.damage(Random.NormalIntRange(2, 6), GuidingLight.this);
Sample.INSTANCE.play(Assets.Sounds.HIT_MAGIC, 1, Random.Float(0.87f, 1.15f)); Sample.INSTANCE.play(Assets.Sounds.HIT_MAGIC, 1, Random.Float(0.87f, 1.15f));
ch.sprite.burst(0xFFFFFF44, 3);
if (ch.isAlive()){ if (ch.isAlive()){
Buff.affect(ch, GuidingLightDebuff.class); Buff.affect(ch, GuidingLightDebuff.class);
} }
@@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.effects.Enchanting;
import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HolyTome; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HolyTome;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
@@ -51,6 +52,7 @@ public class HolyWard extends ClericSpell {
hero.spend( 1f ); hero.spend( 1f );
hero.busy(); hero.busy();
hero.sprite.operate(hero.pos); hero.sprite.operate(hero.pos);
if (hero.belongings.armor() != null) Enchanting.show(hero, hero.belongings.armor());
onSpellCast(tome, hero); onSpellCast(tome, hero);
} }
@@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.effects.Enchanting;
import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HolyTome; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HolyTome;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
@@ -56,6 +57,7 @@ public class HolyWeapon extends ClericSpell {
hero.spend( 1f ); hero.spend( 1f );
hero.busy(); hero.busy();
hero.sprite.operate(hero.pos); hero.sprite.operate(hero.pos);
if (hero.belongings.weapon() != null) Enchanting.show(hero, hero.belongings.weapon());
onSpellCast(tome, hero); onSpellCast(tome, hero);
} }
@@ -29,6 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HolyTome; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HolyTome;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
@@ -67,6 +68,7 @@ public class ShieldOfLight extends TargetedClericSpell {
hero.busy(); hero.busy();
hero.sprite.operate(hero.pos); hero.sprite.operate(hero.pos);
hero.sprite.emitter().start(Speck.factory(Speck.LIGHT), 0.15f, 6);
onSpellCast(tome, hero); onSpellCast(tome, hero);
@@ -72,6 +72,7 @@ public class MagicMissile extends Emitter {
public static final int SHAMAN_PURPLE = 13; public static final int SHAMAN_PURPLE = 13;
public static final int ELMO = 14; public static final int ELMO = 14;
public static final int POISON = 15; public static final int POISON = 15;
public static final int LIGHT_MISSILE = 16;
public static final int MAGIC_MISS_CONE = 100; public static final int MAGIC_MISS_CONE = 100;
public static final int FROST_CONE = 101; public static final int FROST_CONE = 101;
@@ -197,6 +198,10 @@ public class MagicMissile extends Emitter {
size( 3 ); size( 3 );
pour( PoisonParticle.MISSILE, 0.01f ); pour( PoisonParticle.MISSILE, 0.01f );
break; break;
case LIGHT_MISSILE:
size( 4 );
pour( WhiteParticle.YELLOW, 0.01f );
break;
case MAGIC_MISS_CONE: case MAGIC_MISS_CONE:
size( 10 ); size( 10 );
@@ -493,6 +498,17 @@ public class MagicMissile extends Emitter {
return true; return true;
} }
}; };
public static final Emitter.Factory YELLOW = new Factory() {
@Override
public void emit( Emitter emitter, int index, float x, float y ) {
((WhiteParticle)emitter.recycle( WhiteParticle.class )).reset( x, y, 1f, 1f, 0.25f );
}
@Override
public boolean lightMode() {
return true;
}
};
public WhiteParticle() { public WhiteParticle() {
super(); super();
@@ -509,6 +525,12 @@ public class MagicMissile extends Emitter {
this.y = y; this.y = y;
left = lifespan; left = lifespan;
hardlight(1, 1, 1);
}
public void reset( float x, float y, float r, float g, float b ) {
reset(x, y);
hardlight(r, g, b);
} }
@Override @Override