v3.1.0: guiding light spell icon is now brightened when casting is free
This commit is contained in:
@@ -36,6 +36,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.ui.ActionIndicator;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon;
|
import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.ui.QuickSlotButton;
|
import com.shatteredpixel.shatteredpixeldungeon.ui.QuickSlotButton;
|
||||||
@@ -99,6 +100,7 @@ public class GuidingLight extends TargetedClericSpell {
|
|||||||
onSpellCast(tome, hero);
|
onSpellCast(tome, hero);
|
||||||
if (hero.subClass == HeroSubClass.PRIEST && hero.buff(GuidingLightPriestCooldown.class) == null) {
|
if (hero.subClass == HeroSubClass.PRIEST && hero.buff(GuidingLightPriestCooldown.class) == null) {
|
||||||
Buff.prolong(hero, GuidingLightPriestCooldown.class, 100f);
|
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); }
|
public float iconFadePercent() { return Math.max(0, visualcooldown() / 100); }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void detach() {
|
||||||
|
super.detach();
|
||||||
|
ActionIndicator.refresh();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Illuminated extends Buff {
|
public static class Illuminated extends Buff {
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Regeneration;
|
|||||||
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.actors.hero.spells.ClericSpell;
|
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.Item;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.bags.Bag;
|
import com.shatteredpixel.shatteredpixeldungeon.items.bags.Bag;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEnergy;
|
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEnergy;
|
||||||
@@ -329,8 +330,12 @@ public class HolyTome extends Artifact {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int indicatorColor() {
|
public int indicatorColor() {
|
||||||
|
if (quickSpell == GuidingLight.INSTANCE && quickSpell.chargeUse(Dungeon.hero) == 0){
|
||||||
|
return 0x0063ff;
|
||||||
|
} else {
|
||||||
return 0x002157;
|
return 0x002157;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAction() {
|
public void doAction() {
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.SPDSettings;
|
|||||||
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.actors.hero.spells.ClericSpell;
|
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.items.artifacts.HolyTome;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||||
@@ -145,17 +146,29 @@ public class WndClericSpells extends Window {
|
|||||||
|
|
||||||
if (!tome.canCast(Dungeon.hero, spell)){
|
if (!tome.canCast(Dungeon.hero, spell)){
|
||||||
icon.alpha( 0.3f );
|
icon.alpha( 0.3f );
|
||||||
|
} else if (spell == GuidingLight.INSTANCE && spell.chargeUse(Dungeon.hero) == 0){
|
||||||
|
icon.brightness(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
bg = Chrome.get(Chrome.Type.TOAST);
|
bg = Chrome.get(Chrome.Type.TOAST);
|
||||||
addToBack(bg);
|
addToBack(bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onPointerDown() {
|
||||||
|
super.onPointerDown();
|
||||||
|
if (spell == GuidingLight.INSTANCE && spell.chargeUse(Dungeon.hero) == 0){
|
||||||
|
icon.brightness(4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPointerUp() {
|
protected void onPointerUp() {
|
||||||
super.onPointerUp();
|
super.onPointerUp();
|
||||||
if (!tome.canCast(Dungeon.hero, spell)){
|
if (!tome.canCast(Dungeon.hero, spell)){
|
||||||
icon.alpha( 0.3f );
|
icon.alpha( 0.3f );
|
||||||
|
} else if (spell == GuidingLight.INSTANCE && spell.chargeUse(Dungeon.hero) == 0){
|
||||||
|
icon.brightness(3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user