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

View File

@@ -24,6 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.effects.Identification;
import com.shatteredpixel.shatteredpixeldungeon.items.EquipableItem;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HolyTome;
@@ -68,8 +69,9 @@ public class DetectCurse extends InventoryClericSpell {
hero.spend( 1f );
hero.busy();
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);
}

View File

@@ -63,7 +63,7 @@ public class GuidingLight extends TargetedClericSpell {
hero.busy();
Sample.INSTANCE.play( Assets.Sounds.ZAP );
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
public void call() {
@@ -71,6 +71,7 @@ public class GuidingLight extends TargetedClericSpell {
if (ch != null) {
ch.damage(Random.NormalIntRange(2, 6), GuidingLight.this);
Sample.INSTANCE.play(Assets.Sounds.HIT_MAGIC, 1, Random.Float(0.87f, 1.15f));
ch.sprite.burst(0xFFFFFF44, 3);
if (ch.isAlive()){
Buff.affect(ch, GuidingLightDebuff.class);
}

View File

@@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.effects.Enchanting;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HolyTome;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
@@ -51,6 +52,7 @@ public class HolyWard extends ClericSpell {
hero.spend( 1f );
hero.busy();
hero.sprite.operate(hero.pos);
if (hero.belongings.armor() != null) Enchanting.show(hero, hero.belongings.armor());
onSpellCast(tome, hero);
}

View File

@@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.effects.Enchanting;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HolyTome;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
@@ -56,6 +57,7 @@ public class HolyWeapon extends ClericSpell {
hero.spend( 1f );
hero.busy();
hero.sprite.operate(hero.pos);
if (hero.belongings.weapon() != null) Enchanting.show(hero, hero.belongings.weapon());
onSpellCast(tome, hero);
}

View File

@@ -29,6 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HolyTome;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
@@ -67,6 +68,7 @@ public class ShieldOfLight extends TargetedClericSpell {
hero.busy();
hero.sprite.operate(hero.pos);
hero.sprite.emitter().start(Speck.factory(Speck.LIGHT), 0.15f, 6);
onSpellCast(tome, hero);

View File

@@ -72,6 +72,7 @@ public class MagicMissile extends Emitter {
public static final int SHAMAN_PURPLE = 13;
public static final int ELMO = 14;
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 FROST_CONE = 101;
@@ -197,6 +198,10 @@ public class MagicMissile extends Emitter {
size( 3 );
pour( PoisonParticle.MISSILE, 0.01f );
break;
case LIGHT_MISSILE:
size( 4 );
pour( WhiteParticle.YELLOW, 0.01f );
break;
case MAGIC_MISS_CONE:
size( 10 );
@@ -493,6 +498,17 @@ public class MagicMissile extends Emitter {
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() {
super();
@@ -509,6 +525,12 @@ public class MagicMissile extends Emitter {
this.y = y;
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