From e4a21e4eca1e8e7293b847dcd1746bc0e9c12954 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 20 May 2021 23:52:18 -0400 Subject: [PATCH] v0.9.3: polish pass on remaining implemented abilities --- .../assets/messages/actors/actors.properties | 10 +++++---- .../actors/hero/Hero.java | 2 +- .../actors/hero/abilities/Ratmogrify.java | 4 ++++ .../hero/abilities/huntress/NaturesPower.java | 21 ++++++++++++++++--- .../abilities/huntress/SpectralBlades.java | 4 ++++ .../items/weapon/SpiritBow.java | 8 +++---- 6 files changed, 37 insertions(+), 12 deletions(-) diff --git a/core/src/main/assets/messages/actors/actors.properties b/core/src/main/assets/messages/actors/actors.properties index 4b9c32f40..69d659f12 100644 --- a/core/src/main/assets/messages/actors/actors.properties +++ b/core/src/main/assets/messages/actors/actors.properties @@ -385,10 +385,12 @@ actors.hero.abilities.rogue.shadowclone.short_desc=The Rogue summons a _Shadow C actors.hero.abilities.rogue.shadowclone.desc=TODO actors.hero.abilities.huntress.spectralblades.name=spectral blades actors.hero.abilities.huntress.spectralblades.short_desc=The Huntress throws _Spectral Blades_ at a target, inflicting damage depending on her currently equipped melee weapon. -actors.hero.abilities.huntress.spectralblades.desc=TODO +actors.hero.abilities.huntress.spectralblades.desc=The Huntress throws out a spectral blade at an enemy, which acts like a ranged strike from her melee weapon. All of the normal effects of a melee weapon will activate, including enchantments.\n\nThis ability costs 25 charge. actors.hero.abilities.huntress.naturespower.name=nature's power +actors.hero.abilities.huntress.naturespower$naturespowertracker.name=nature's power +actors.hero.abilities.huntress.naturespower$naturespowertracker.desc=The Huntress is briefly empowered, increasing her movement speed and attack speed with her bow.\n\nTurns Left: %s. actors.hero.abilities.huntress.naturespower.short_desc=The Huntress calls upon _Nature's Power_, increasing her movement speed and her bow's rate of fire for a short time. -actors.hero.abilities.huntress.naturespower.desc=TODO +actors.hero.abilities.huntress.naturespower.desc=The Huntress temporarily empowers herself and her bow with the power of nature! This lasts for 8 turns.\n\nDuring this time, the huntress moves at 2x speed, and attacks 33% faster with her bow.\n\nThis ability costs 35 charge. actors.hero.abilities.huntress.spirithawk.name=spirit hawk actors.hero.abilities.huntress.spirithawk.short_desc=The Huntress summons a _Spirit Hawk_ familiar, which can help her scout locations and distract enemies. actors.hero.abilities.huntress.spirithawk.desc=TODO @@ -397,9 +399,9 @@ actors.hero.abilities.ratmogrify.name=ratmogrify actors.hero.abilities.ratmogrify.cant_transform=You can't ratmogrify that! actors.hero.abilities.ratmogrify.too_strong=That enemy is too strong to ratmogrify! actors.hero.abilities.ratmogrify.short_desc=The hero _Ratmogrifies_ an enemy! This turns them into a rat with no abilities, but also no loot. -actors.hero.abilities.ratmogrify.desc=TODO +actors.hero.abilities.ratmogrify.desc=The hero permanently transforms an enemy into a rat! Bosses, allies, and rats cannot be ratmogrified.\n\nRatmogrified enemies retain their original stats, but do not have any abilities, and award no exp or loot when they die.\n\nThis ability costs 35 charge. actors.hero.abilities.ratmogrify$transmograt.name=ratmogrified %s -actors.hero.abilities.ratmogrify$transmograt.desc=TODO +actors.hero.abilities.ratmogrify$transmograt.desc=This enemy has been transformed into a rat. A big improvement, if you ask me! - Rat King actors.hero.hero.name=you actors.hero.hero.leave=You can't leave yet, the rest of the dungeon awaits below! diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java index 8bacb8c6f..1fbed9d77 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java @@ -536,7 +536,7 @@ public class Hero extends Char { ((HeroSprite)sprite).sprint( 1f ); } - NaturesPower.NaturesStrengthTracker natStrength = buff(NaturesPower.NaturesStrengthTracker.class); + NaturesPower.naturesPowerTracker natStrength = buff(NaturesPower.naturesPowerTracker.class); if (natStrength != null){ speed *= (2f + 0.25f*pointsInTalent(Talent.GROWING_POWER)); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/Ratmogrify.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/Ratmogrify.java index f1cc753bf..6ee0b1d9b 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/Ratmogrify.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/Ratmogrify.java @@ -29,6 +29,10 @@ import java.util.ArrayList; public class Ratmogrify extends ArmorAbility { + { + baseChargeUse = 35f; + } + @Override protected String targetingPrompt() { return Messages.get(this, "prompt"); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/huntress/NaturesPower.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/huntress/NaturesPower.java index ee7839c4d..c9c976095 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/huntress/NaturesPower.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/huntress/NaturesPower.java @@ -30,16 +30,21 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.ArmorAbility; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.LeafParticle; import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClassArmor; +import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; import com.watabou.noosa.audio.Sample; public class NaturesPower extends ArmorAbility { + { + baseChargeUse = 35f; + } + @Override protected void activate(ClassArmor armor, Hero hero, Integer target) { - Buff.prolong(hero, NaturesStrengthTracker.class, NaturesStrengthTracker.DURATION); - hero.buff(NaturesStrengthTracker.class).extensionsLeft = 2; + Buff.prolong(hero, naturesPowerTracker.class, naturesPowerTracker.DURATION); + hero.buff(naturesPowerTracker.class).extensionsLeft = 2; hero.sprite.operate(hero.pos); Sample.INSTANCE.play(Assets.Sounds.CHARGEUP); hero.sprite.emitter().burst(LeafParticle.GENERAL, 10); @@ -52,7 +57,7 @@ public class NaturesPower extends ArmorAbility { return new Talent[]{Talent.GROWING_POWER, Talent.NATURES_WRATH, Talent.WILD_MOMENTUM, Talent.HEROIC_ENERGY}; } - public static class NaturesStrengthTracker extends FlavourBuff{ + public static class naturesPowerTracker extends FlavourBuff{ public static final float DURATION = 8f; @@ -75,6 +80,16 @@ public class NaturesPower extends ArmorAbility { return Math.max(0, (DURATION - visualcooldown()) / DURATION); } + @Override + public String toString() { + return Messages.get(this, "name"); + } + + @Override + public String desc() { + return Messages.get(this, "desc", dispTurns(visualcooldown())); + } + //TODO name/desc } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/huntress/SpectralBlades.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/huntress/SpectralBlades.java index a8665b87d..d25f3e095 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/huntress/SpectralBlades.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/huntress/SpectralBlades.java @@ -44,6 +44,10 @@ import java.util.HashSet; public class SpectralBlades extends ArmorAbility { + { + baseChargeUse = 25f; + } + @Override protected String targetingPrompt() { return Messages.get(this, "prompt"); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/SpiritBow.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/SpiritBow.java index f08c0aa22..b399b997a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/SpiritBow.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/SpiritBow.java @@ -101,7 +101,7 @@ public class SpiritBow extends Weapon { @Override public int proc(Char attacker, Char defender, int damage) { - if (attacker.buff(NaturesPower.NaturesStrengthTracker.class) != null){ + if (attacker.buff(NaturesPower.naturesPowerTracker.class) != null){ Actor.add(new Actor() { { @@ -118,7 +118,7 @@ public class SpiritBow extends Weapon { } if (!defender.isAlive()){ - NaturesPower.NaturesStrengthTracker tracker = attacker.buff(NaturesPower.NaturesStrengthTracker.class); + NaturesPower.naturesPowerTracker tracker = attacker.buff(NaturesPower.naturesPowerTracker.class); if (tracker != null){ tracker.extend(((Hero) attacker).pointsInTalent(Talent.WILD_MOMENTUM)); } @@ -252,7 +252,7 @@ public class SpiritBow extends Weapon { float speed = super.speedFactor(owner); - if (owner.buff(NaturesPower.NaturesStrengthTracker.class) != null){ + if (owner.buff(NaturesPower.naturesPowerTracker.class) != null){ // 1.33x speed to 1.5x speed, depending on talent points speed /= ((32 + ((Hero)owner).pointsInTalent(Talent.GROWING_POWER)) / 24f); } @@ -291,7 +291,7 @@ public class SpiritBow extends Weapon { @Override public Emitter emitter() { - if (Dungeon.hero.buff(NaturesPower.NaturesStrengthTracker.class) != null){ + if (Dungeon.hero.buff(NaturesPower.naturesPowerTracker.class) != null){ Emitter e = new Emitter(); e.pos(5, 5); e.fillTarget = false;