v3.0.0: added some simple vfx to the recally glyph spell

This commit is contained in:
Evan Debenham
2024-11-18 15:22:35 -05:00
parent 5be44cdfae
commit 6b721f8e88
2 changed files with 12 additions and 2 deletions

View File

@@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
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.Enchanting;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HolyTome;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll;
@@ -67,6 +68,9 @@ public class RecallGlyph extends ClericSpell {
item.setCurrent(hero);
hero.sprite.operate(hero.pos);
Enchanting.show(hero, item);
if (item instanceof Scroll){
((Scroll) item).anonymize();
((Scroll) item).doRead();

View File

@@ -50,7 +50,11 @@ public class Enchanting extends ItemSprite {
super( item.image(), null );
originToCenter();
color = item.glowing().color;
if (item.glowing() != null) {
color = item.glowing().color;
} else {
color = -1;
}
phase = Phase.FADE_IN;
duration = FADE_IN_TIME;
@@ -72,7 +76,9 @@ public class Enchanting extends ItemSprite {
scale.set( passed / duration );
break;
case STATIC:
tint( color, passed / duration * 0.8f );
if (color != -1) {
tint(color, passed / duration * 0.8f);
}
break;
case FADE_OUT:
alpha( (1 - passed / duration) * ALPHA );