v3.1.0: guiding light spell icon is now brightened when casting is free

This commit is contained in:
Evan Debenham
2025-05-20 13:12:58 -04:00
parent 7a2c2e2321
commit cdaa1b8619
3 changed files with 26 additions and 1 deletions

View File

@@ -36,6 +36,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand;
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
import com.shatteredpixel.shatteredpixeldungeon.ui.ActionIndicator;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon;
import com.shatteredpixel.shatteredpixeldungeon.ui.QuickSlotButton;
@@ -99,6 +100,7 @@ public class GuidingLight extends TargetedClericSpell {
onSpellCast(tome, hero);
if (hero.subClass == HeroSubClass.PRIEST && hero.buff(GuidingLightPriestCooldown.class) == null) {
Buff.prolong(hero, GuidingLightPriestCooldown.class, 100f);
ActionIndicator.refresh();
}
}
@@ -137,6 +139,11 @@ public class GuidingLight extends TargetedClericSpell {
public float iconFadePercent() { return Math.max(0, visualcooldown() / 100); }
@Override
public void detach() {
super.detach();
ActionIndicator.refresh();
}
}
public static class Illuminated extends Buff {

View File

@@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Regeneration;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.ClericSpell;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.GuidingLight;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.bags.Bag;
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEnergy;
@@ -329,7 +330,11 @@ public class HolyTome extends Artifact {
@Override
public int indicatorColor() {
return 0x002157;
if (quickSpell == GuidingLight.INSTANCE && quickSpell.chargeUse(Dungeon.hero) == 0){
return 0x0063ff;
} else {
return 0x002157;
}
}
@Override

View File

@@ -27,6 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.SPDSettings;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.ClericSpell;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.spells.GuidingLight;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HolyTome;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
@@ -145,17 +146,29 @@ public class WndClericSpells extends Window {
if (!tome.canCast(Dungeon.hero, spell)){
icon.alpha( 0.3f );
} else if (spell == GuidingLight.INSTANCE && spell.chargeUse(Dungeon.hero) == 0){
icon.brightness(3);
}
bg = Chrome.get(Chrome.Type.TOAST);
addToBack(bg);
}
@Override
protected void onPointerDown() {
super.onPointerDown();
if (spell == GuidingLight.INSTANCE && spell.chargeUse(Dungeon.hero) == 0){
icon.brightness(4);
}
}
@Override
protected void onPointerUp() {
super.onPointerUp();
if (!tome.canCast(Dungeon.hero, spell)){
icon.alpha( 0.3f );
} else if (spell == GuidingLight.INSTANCE && spell.chargeUse(Dungeon.hero) == 0){
icon.brightness(3);
}
}