diff --git a/core/src/main/assets/messages/actors/actors.properties b/core/src/main/assets/messages/actors/actors.properties index 3f2b2d75a..0c24f7e94 100644 --- a/core/src/main/assets/messages/actors/actors.properties +++ b/core/src/main/assets/messages/actors/actors.properties @@ -339,14 +339,16 @@ actors.hero.abilities.armorability.prompt=Choose a location to target actors.hero.abilities.warrior.heroicleap.name=heroic leap actors.hero.abilities.warrior.heroicleap.prompt=Choose direction to leap -actors.hero.abilities.warrior.heroicleap.short_desc=The Warrior performs a _Heroic Leap_ towards a targeted location, slamming down to stun all neighbouring enemies. -actors.hero.abilities.warrior.heroicleap.desc=TODO +actors.hero.abilities.warrior.heroicleap.short_desc=The Warrior performs a _Heroic Leap_ towards a targeted location, sailing above enemies and hazards. +actors.hero.abilities.warrior.heroicleap.desc=The Warrior leaps toward a targeted location, going over any enemies or hazards in the way. He cannot leap over walls or other solid terrain however.\n\nThis ability costs 25 charge. actors.hero.abilities.warrior.shockwave.name=shockwave actors.hero.abilities.warrior.shockwave.short_desc=The Warrior releases a _Shockwave_ in a conical AOE by slamming the ground. Enemies caught in the shockwave are damaged and crippled. -actors.hero.abilities.warrior.shockwave.desc=TODO +actors.hero.abilities.warrior.shockwave.desc=The warrior slams the ground, producing a shockwave that travels up to 5 tiles in a 60 degree cone.\n\nEnemies caught in this shockwave are crippled for 5 turns. They also take 5-10 damage, plus an additional 1-2 damage for every point of strength the warrior has above 10.\n\nThis ability costs 35 charge. actors.hero.abilities.warrior.endure.name=endure +actors.hero.abilities.warrior.endure$enduretracker.name=Endurance +actors.hero.abilities.warrior.endure$enduretracker.desc=The Warrior is now dealing bonus damage based on the damage he endured.\n\nBonus Damage: %1$d\nHits Left: %2$d actors.hero.abilities.warrior.endure.short_desc=The Warrior _Endures_, skipping several turns but gaining high damage resistance. He then deals bonus damage based on what he endured. -actors.hero.abilities.warrior.endure.desc=TODO +actors.hero.abilities.warrior.endure.desc=The Warrior endures for 3 turns, taking half damage from all sources. This reduction is applied before damage resisting effects like armor.\n\nAfter enduring, the warrior's next hit within 10 turns gains bonus damage. This bonus damage is equal to one fourth of all the damage inflicted on him while enduring, before any damage reduction effects!\n\nIf the warrior has any combo, using this ability increases its remaining time by 3 turns.\n\nThis ability costs 50 charge. actors.hero.abilities.mage.elementalblast.name=elemental blast actors.hero.abilities.mage.elementalblast.short_desc=The Mage emits an _Elemental Blast_ from his staff, covering a large area around him in an effect that varies based on the wand in his staff. actors.hero.abilities.mage.elementalblast.desc=TODO diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Combo.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Combo.java index 358510adf..81781ab4d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Combo.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Combo.java @@ -106,6 +106,10 @@ public class Combo extends Buff implements ActionIndicator.Action { } + public void addTime( float time ){ + comboTime += time; + } + @Override public void detach() { super.detach(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/ArmorAbility.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/ArmorAbility.java index 1a221a9c3..4d057a604 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/ArmorAbility.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/ArmorAbility.java @@ -32,6 +32,8 @@ import com.watabou.utils.Bundle; public abstract class ArmorAbility implements Bundlable { + protected float baseChargeUse = 35; + public void use( ClassArmor armor, Hero hero ){ if (targetingPrompt() == null){ activate(armor, hero, hero.pos); @@ -56,7 +58,7 @@ public abstract class ArmorAbility implements Bundlable { } public float chargeUse( Hero hero ){ - float chargeUse = 35; + float chargeUse = baseChargeUse; if (hero.hasTalent(Talent.HEROIC_ENERGY)){ //reduced charge use by 13%/24%/34%/43% chargeUse *= Math.pow( 0.869, hero.pointsInTalent(Talent.HEROIC_ENERGY)); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/Endure.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/Endure.java index 3c195f1eb..35c05f211 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/Endure.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/Endure.java @@ -21,27 +21,40 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.warrior; +import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Combo; 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.actors.hero.abilities.ArmorAbility; +import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; +import com.shatteredpixel.shatteredpixeldungeon.effects.SpellSprite; 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; import com.watabou.utils.Bundle; public class Endure extends ArmorAbility { + { + baseChargeUse = 50f; + } + @Override protected void activate(ClassArmor armor, Hero hero, Integer target) { Buff.prolong(hero, EndureTracker.class, 13f).setup(hero); - //TODO extend combo maybe? + + Combo combo = hero.buff(Combo.class); + if (combo != null){ + combo.addTime(3f); + } hero.sprite.operate(hero.pos); - //TODO vfx/sfx? armor.charge -= chargeUse(hero); armor.updateQuickslot(); @@ -68,6 +81,16 @@ public class Endure extends ArmorAbility { return Math.max(0, (10f - visualcooldown()) / 10f); } + @Override + public String toString() { + return Messages.get(this, "name"); + } + + @Override + public String desc() { + return Messages.get(this, "desc", damageBonus, hitsLeft); + } + public void setup(Hero hero){ enduring = true; maxDmgTaken = (int) (hero.HT * Math.pow(0.76f, hero.pointsInTalent(Talent.SHRUG_IT_OFF))); @@ -111,6 +134,13 @@ public class Endure extends ArmorAbility { hitsLeft = 1+Dungeon.hero.pointsInTalent(Talent.SUSTAINED_RETRIBUTION); damageBonus /= hitsLeft; + + if (damageBonus > 0) { + target.sprite.centerEmitter().start( Speck.factory( Speck.SCREAM ), 0.3f, 3 ); + Sample.INSTANCE.play(Assets.Sounds.CHALLENGE); + } else { + detach(); + } } public int damageFactor(int damage){ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/HeroicLeap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/HeroicLeap.java index 2455be5fd..d52b4b27e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/HeroicLeap.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/HeroicLeap.java @@ -41,7 +41,9 @@ import com.watabou.utils.PathFinder; public class HeroicLeap extends ArmorAbility { - private static int LEAP_TIME = 1; + { + baseChargeUse = 25f; + } @Override protected String targetingPrompt() { @@ -62,12 +64,14 @@ public class HeroicLeap extends ArmorAbility { public void activate( ClassArmor armor, Hero hero, Integer target ) { if (target != null) { - Ballistica route = new Ballistica(hero.pos, target, Ballistica.PROJECTILE); + Ballistica route = new Ballistica(hero.pos, target, Ballistica.STOP_TARGET | Ballistica.STOP_SOLID); int cell = route.collisionPos; //can't occupy the same cell as another char, so move back one. - if (Actor.findChar( cell ) != null && cell != hero.pos) { - cell = route.path.get(route.dist - 1); + int backTrace = route.dist-1; + while (Actor.findChar( cell ) != null && cell != hero.pos) { + cell = route.path.get(backTrace); + backTrace--; } armor.charge -= chargeUse( hero ); @@ -103,7 +107,7 @@ public class HeroicLeap extends ArmorAbility { Camera.main.shake(2, 0.5f); Invisibility.dispel(); - hero.spendAndNext(LEAP_TIME); + hero.spendAndNext(Actor.TICK); if (hero.buff(DoubleJumpTracker.class) != null){ hero.buff(DoubleJumpTracker.class).detach(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/Shockwave.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/Shockwave.java index ff4218e03..169b5f602 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/Shockwave.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/warrior/Shockwave.java @@ -46,6 +46,10 @@ import com.watabou.utils.Random; public class Shockwave extends ArmorAbility { + { + baseChargeUse = 35f; + } + @Override protected String targetingPrompt() { return Messages.get(this, "prompt");