From 3cb0a65e37b79f23609456cd935ca33333fc6937 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 9 Dec 2024 12:47:08 -0500 Subject: [PATCH] v3.0.0: added names for Cleric armor abilities and glowing sprite state --- .../assets/messages/actors/actors.properties | 20 +++--- .../{Cleric1.java => AscendedForm.java} | 2 +- .../cleric/{Cleric3.java => PowerOfMany.java} | 2 +- .../cleric/{Cleric2.java => Trinity.java} | 2 +- .../effects/GlowBlock.java | 64 +++++++++++++++++++ .../sprites/CharSprite.java | 12 +++- .../windows/WndChooseAbility.java | 8 +-- 7 files changed, 92 insertions(+), 18 deletions(-) rename core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/cleric/{Cleric1.java => AscendedForm.java} (96%) rename core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/cleric/{Cleric3.java => PowerOfMany.java} (96%) rename core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/cleric/{Cleric2.java => Trinity.java} (97%) create mode 100644 core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/GlowBlock.java diff --git a/core/src/main/assets/messages/actors/actors.properties b/core/src/main/assets/messages/actors/actors.properties index 65b61b496..e0747557f 100644 --- a/core/src/main/assets/messages/actors/actors.properties +++ b/core/src/main/assets/messages/actors/actors.properties @@ -523,15 +523,15 @@ actors.hero.abilities.duelist.feint.bad_location=You can't move to that location actors.hero.abilities.duelist.feint.short_desc=The Duelist _Feints_, faking an attack while dashing to an adjacent tile. Enemies will attack her afterimage, leaving them open to a counterattack. actors.hero.abilities.duelist.feint.desc=The Duelist fakes an attack while dashing to an adjacent tile, leaving behind a momentary afterimage of herself. Enemies that were attacking the Duelist will attack her afterimage instead.\n\nEnemies that attack the afterimage become confused, which cancels their next action and leaves them open to a surprise attack. -actors.hero.abilities.cleric.cleric1.name=Unknown -actors.hero.abilities.cleric.cleric1.short_desc=This armor ability hasn't been implemented yet. -actors.hero.abilities.cleric.cleric1.desc=This armor ability hasn't been implemented yet. It is not currently selectable. -actors.hero.abilities.cleric.cleric2.name=Unknown -actors.hero.abilities.cleric.cleric2.short_desc=This armor ability hasn't been implemented yet. -actors.hero.abilities.cleric.cleric2.desc=This armor ability hasn't been implemented yet. It is not currently selectable. -actors.hero.abilities.cleric.cleric3.name=Unknown -actors.hero.abilities.cleric.cleric3.short_desc=This armor ability hasn't been implemented yet. -actors.hero.abilities.cleric.cleric3.desc=This armor ability hasn't been implemented yet. It is not currently selectable. +actors.hero.abilities.cleric.ascendedform.name=ascended form +actors.hero.abilities.cleric.ascendedform.short_desc=_(UNFINISHED)_ The Cleric assumes an _Ascended Form_, gaining bonus shielding when they use spells. +actors.hero.abilities.cleric.ascendedform.desc=_Ascended Form has not been implemented yet, and so is currently unselectable._ +actors.hero.abilities.cleric.trinity.name=trinity +actors.hero.abilities.cleric.trinity.short_desc=_(UNFINISHED)_ The Cleric gains a _Trinity_ of new spells, which each cost tome charges and armor charge. +actors.hero.abilities.cleric.trinity.desc=_Trinity has not been implemented yet, and so is currently unselectable._ +actors.hero.abilities.cleric.powerofmany.name=power of many +actors.hero.abilities.cleric.powerofmany.short_desc=_(UNFINISHED)_ The Cleric channels the _Power of Many_, empowering an existing ally or creating a new one. +actors.hero.abilities.cleric.powerofmany.desc=_Power of Many has not been implemented yet, and so is currently unselectable._ actors.hero.abilities.ratmogrify.name=ratmogrify @@ -703,7 +703,7 @@ actors.hero.herosubclass.priest_short_desc=The _Priest_ gains new long-range spe actors.hero.herosubclass.priest_desc=The Priest gains a variety of new and upgraded spells that emphasize ranged combat and synergy with magical items.\n\nThe Priest can cast _Guiding Light_ for free once every 100 turns, and can trigger the illumination debuff with wands and some artifacts for bonus damage.\n\nThey also gain the _Radiance_ spell, which dispels darkness and illuminates and momentarily stuns all visible enemies at the cost of 2 charges. actors.hero.herosubclass.paladin=paladin actors.hero.herosubclass.paladin_short_desc=_(UNFINISHED)_ The _Paladin_ gains new short-range spells and empowered versions of holy weapon and ward. -actors.hero.herosubclass.paladin_desc=_The Paladin has not been implemented yet, and so is currently unselectable_\n\nThe Paladin gains a variety of new and upgraded spells that emphasize melee combat and synergy with weapons and armor.\n\nThe Paladin's _Holy Weapon_ and _Holy Ward_ spells grant larger bonuses, and no longer override existing enchantments and glyphs.\n\nThey also gain the _Smite_ spell, which lets them perform a guaranteed melee hit with bonus damage and enchantment power. +actors.hero.herosubclass.paladin_desc=_The Paladin has not been implemented yet, and so is currently unselectable._\n\nThe Paladin gains a variety of new and upgraded spells that emphasize melee combat and synergy with weapons and armor.\n\nThe Paladin's _Holy Weapon_ and _Holy Ward_ spells grant larger bonuses, and no longer override existing enchantments and glyphs.\n\nThey also gain the _Smite_ spell, which lets them perform a guaranteed melee hit with bonus damage and enchantment power. ##talents actors.hero.talent$provokedangertracker.name=provoked anger diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/cleric/Cleric1.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/cleric/AscendedForm.java similarity index 96% rename from core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/cleric/Cleric1.java rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/cleric/AscendedForm.java index 452237d89..eda73e713 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/cleric/Cleric1.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/cleric/AscendedForm.java @@ -27,7 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.ArmorAbili import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClassArmor; import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; -public class Cleric1 extends ArmorAbility { +public class AscendedForm extends ArmorAbility { @Override protected void activate(ClassArmor armor, Hero hero, Integer target) { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/cleric/Cleric3.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/cleric/PowerOfMany.java similarity index 96% rename from core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/cleric/Cleric3.java rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/cleric/PowerOfMany.java index 43069f5b7..4780b9db7 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/cleric/Cleric3.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/cleric/PowerOfMany.java @@ -27,7 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.ArmorAbili import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClassArmor; import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; -public class Cleric3 extends ArmorAbility { +public class PowerOfMany extends ArmorAbility { @Override protected void activate(ClassArmor armor, Hero hero, Integer target) { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/cleric/Cleric2.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/cleric/Trinity.java similarity index 97% rename from core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/cleric/Cleric2.java rename to core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/cleric/Trinity.java index e6429c0cd..18fcda30e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/cleric/Cleric2.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/cleric/Trinity.java @@ -27,7 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.ArmorAbili import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClassArmor; import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; -public class Cleric2 extends ArmorAbility { +public class Trinity extends ArmorAbility { @Override protected void activate(ClassArmor armor, Hero hero, Integer target) { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/GlowBlock.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/GlowBlock.java new file mode 100644 index 000000000..a2f6902c0 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/GlowBlock.java @@ -0,0 +1,64 @@ +/* + * Pixel Dungeon + * Copyright (C) 2012-2015 Oleg Dolya + * + * Shattered Pixel Dungeon + * Copyright (C) 2014-2024 Evan Debenham + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + */ + +package com.shatteredpixel.shatteredpixeldungeon.effects; + +import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; +import com.watabou.noosa.Game; +import com.watabou.noosa.Gizmo; + +public class GlowBlock extends Gizmo { + + private CharSprite target; + + public GlowBlock(CharSprite target ) { + super(); + + this.target = target; + } + + @Override + public void update() { + super.update(); + + //wavers between 0.4f and 0.6f once per second + target.tint(1.33f, 1.33f, 0.83f, 0.5f + 0.1f*(float)Math.cos(Math.PI*2*Game.timeTotal)); + + } + + public void darken() { + + target.resetColor(); + killAndErase(); + + } + + public static GlowBlock lighten(CharSprite sprite ) { + + GlowBlock glowBlock = new GlowBlock( sprite ); + if (sprite.parent != null) { + sprite.parent.add(glowBlock); + } + + return glowBlock; + } + +} diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/CharSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/CharSprite.java index 313fcbc56..260449ca7 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/CharSprite.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/CharSprite.java @@ -29,6 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.EmoIcon; import com.shatteredpixel.shatteredpixeldungeon.effects.Flare; import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText; import com.shatteredpixel.shatteredpixeldungeon.effects.IceBlock; +import com.shatteredpixel.shatteredpixeldungeon.effects.GlowBlock; import com.shatteredpixel.shatteredpixeldungeon.effects.ShieldHalo; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.effects.Splash; @@ -82,7 +83,7 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip protected float shadowOffset = 0.25f; public enum State { - BURNING, LEVITATING, INVISIBLE, PARALYSED, FROZEN, ILLUMINATED, CHILLED, DARKENED, MARKED, HEALING, SHIELDED, HEARTS + BURNING, LEVITATING, INVISIBLE, PARALYSED, FROZEN, ILLUMINATED, CHILLED, DARKENED, MARKED, HEALING, SHIELDED, HEARTS, GLOWING } private int stunStates = 0; @@ -106,6 +107,7 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip protected IceBlock iceBlock; protected DarkBlock darkBlock; + protected GlowBlock glowBlock; protected TorchHalo light; protected ShieldHalo shield; protected AlphaTweener invisible; @@ -414,6 +416,9 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip hearts = emitter(); hearts.pour(Speck.factory(Speck.HEART), 0.5f); break; + case GLOWING: + glowBlock = GlowBlock.lighten(this); + break; } } } @@ -489,6 +494,11 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip hearts = null; } break; + case GLOWING: + if (glowBlock != null){ + glowBlock.darken(); + glowBlock = null; + } } } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndChooseAbility.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndChooseAbility.java index 38440fdc6..7cbbedd64 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndChooseAbility.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndChooseAbility.java @@ -24,9 +24,9 @@ package com.shatteredpixel.shatteredpixeldungeon.windows; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.ArmorAbility; -import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.cleric.Cleric1; -import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.cleric.Cleric2; -import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.cleric.Cleric3; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.cleric.AscendedForm; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.cleric.Trinity; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.cleric.PowerOfMany; import com.shatteredpixel.shatteredpixeldungeon.items.KingsCrown; import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; @@ -99,7 +99,7 @@ public class WndChooseAbility extends Window { add(abilityButton); //TODO CLERIC no abilities are actually playable atm - if (ability instanceof Cleric1 || ability instanceof Cleric2 || ability instanceof Cleric3){ + if (ability instanceof AscendedForm || ability instanceof Trinity || ability instanceof PowerOfMany){ abilityButton.enable(false); }