diff --git a/core/src/main/assets/messages/actors/actors.properties b/core/src/main/assets/messages/actors/actors.properties index 8cf5ba0ef..1e540db72 100644 --- a/core/src/main/assets/messages/actors/actors.properties +++ b/core/src/main/assets/messages/actors/actors.properties @@ -318,16 +318,16 @@ actors.hero.talent.thiefs_intuition.title=thief's intuition actors.hero.talent.thiefs_intuition.desc=_+1:_ The Rogue identifies rings _2x faster_, and identifies the type of a ring _when he equips it_.\n\n_+2:_ The Rogue identifies rings _when he equips them_, and identifies the type of a ring _when he picks it up_. actors.hero.talent.test_rogue_3.title=test talent actors.hero.talent.test_rogue_3.desc=TODO -actors.hero.talent.test_rogue_4.title=test talent -actors.hero.talent.test_rogue_4.desc=TODO +actors.hero.talent.mending_shadows.title=mending shadows +actors.hero.talent.mending_shadows.desc=_+1:_ The Rogue heals for 1 HP every _3 consecutive turns_ that he is hidden by his cloak.\n\n_+2:_ The Rogue heals for 1 HP every _2 consecutive turns_ that he is hidden by his cloak. actors.hero.talent.invigorating_meal.title=invigorating meal actors.hero.talent.invigorating_meal.desc=_+1:_ Eating at below 50% health takes 1 turn and grants the Huntress _2 turns of haste_.\n\n_+2:_ Eating at below 50% health takes 1 turn and grants the Huntress _3 turns of haste_. actors.hero.talent.survivalists_intuition.title=survivalist's intuition actors.hero.talent.survivalists_intuition.desc=_+1:_ The Huntress identifies all equipment _1.5x faster_.\n\n_+2:_ The Huntress identifies all equipment _2x faster_. actors.hero.talent.test_huntress_3.title=test talent actors.hero.talent.test_huntress_3.desc=TODO -actors.hero.talent.test_huntress_4.title=test talent -actors.hero.talent.test_huntress_4.desc=TODO +actors.hero.talent.natures_aid.title=nature's aid +actors.hero.talent.natures_aid.desc=_+1:_ The Huntress gains 2 armor of barkskin for _4 turns_ when a plant is trampled in her vision.\n\n_+2:_ The Huntress gains 2 armor of barkskin for _6 turns_ when a plant is trampled in her vision. 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/Talent.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java index 49842f045..66c5bc489 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java @@ -56,12 +56,12 @@ public enum Talent { RATIONED_MEAL(32), THIEFS_INTUITION(33), TEST_ROGUE_3(34), - TEST_ROGUE_4(35), + MENDING_SHADOWS(35), INVIGORATING_MEAL(48), SURVIVALISTS_INTUITION(49), TEST_HUNTRESS_3(50), - TEST_HUNTRESS_4(51); + NATURES_AID(51); int icon; @@ -185,10 +185,10 @@ public enum Talent { Collections.addAll(tierTalents, ENERGIZING_MEAL, SCHOLARS_INTUITION, TESTED_HYPOTHESIS, ENERGIZING_UPGRADE); break; case ROGUE: - Collections.addAll(tierTalents, RATIONED_MEAL, THIEFS_INTUITION, TEST_ROGUE_3, TEST_ROGUE_4); + Collections.addAll(tierTalents, RATIONED_MEAL, THIEFS_INTUITION, TEST_ROGUE_3, MENDING_SHADOWS); break; case HUNTRESS: - Collections.addAll(tierTalents, INVIGORATING_MEAL, SURVIVALISTS_INTUITION, TEST_HUNTRESS_3, TEST_HUNTRESS_4); + Collections.addAll(tierTalents, INVIGORATING_MEAL, SURVIVALISTS_INTUITION, TEST_HUNTRESS_3, NATURES_AID); break; } for (Talent talent : tierTalents){ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CloakOfShadows.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CloakOfShadows.java index 472c8c159..047eb69eb 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CloakOfShadows.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CloakOfShadows.java @@ -29,6 +29,8 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Preparation; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; +import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEnergy; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; @@ -240,9 +242,22 @@ public class CloakOfShadows extends Artifact { } } + //starts at -1 to account for turn cloak was activated + float healInc = -1; + @Override public boolean act(){ turnsToCost--; + + if (((Hero)target).hasTalent(Talent.MENDING_SHADOWS)){ + healInc++; + // 3/2 turns to heal + if (healInc >= 4 - ((Hero) target).pointsInTalent(Talent.MENDING_SHADOWS)){ + healInc = 0; + target.HP = Math.min(target.HT, target.HP+1); + target.sprite.emitter().burst( Speck.factory( Speck.HEALING ), 1 ); + } + } if (turnsToCost <= 0){ charge--; @@ -312,12 +327,14 @@ public class CloakOfShadows extends Artifact { } private static final String TURNSTOCOST = "turnsToCost"; + private static final String HEAL_INC = "heal_inc"; @Override public void storeInBundle(Bundle bundle) { super.storeInBundle(bundle); bundle.put( TURNSTOCOST , turnsToCost); + bundle.put( HEAL_INC, healInc); } @Override @@ -325,6 +342,7 @@ public class CloakOfShadows extends Artifact { super.restoreFromBundle(bundle); turnsToCost = bundle.getInt( TURNSTOCOST ); + healInc = bundle.getFloat( HEAL_INC ); } } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Plant.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Plant.java index 7103becfc..d5d253631 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Plant.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Plant.java @@ -26,8 +26,11 @@ import com.shatteredpixel.shatteredpixeldungeon.Challenges; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Barkskin; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.LeafParticle; import com.shatteredpixel.shatteredpixeldungeon.items.Item; @@ -65,6 +68,11 @@ public abstract class Plant implements Bundlable { wither(); activate( ch ); + + if (Dungeon.level.heroFOV[pos] && Dungeon.hero.hasTalent(Talent.NATURES_AID)){ + // 4/6 turns based on talent points spent + Buff.affect(Dungeon.hero, Barkskin.class).set(2, 2*(1+Dungeon.hero.pointsInTalent(Talent.NATURES_AID))); + } } public abstract void activate( Char ch );