From 6df80d2b3b11cdeed2c77ca418f450a6992b585d Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 26 Jan 2021 23:06:44 -0500 Subject: [PATCH] v0.9.2: implemented the durable tips talent --- .../src/main/assets/messages/actors/actors.properties | 2 ++ .../shatteredpixeldungeon/actors/hero/Talent.java | 4 ++-- .../items/weapon/missiles/darts/TippedDart.java | 11 ++++------- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/core/src/main/assets/messages/actors/actors.properties b/core/src/main/assets/messages/actors/actors.properties index 0f4a72e86..2d222558d 100644 --- a/core/src/main/assets/messages/actors/actors.properties +++ b/core/src/main/assets/messages/actors/actors.properties @@ -401,6 +401,8 @@ actors.hero.talent.point_blank.title=point blank actors.hero.talent.point_blank.desc=_+1:_ When the Huntress uses a thrown weapon at melee range it has _-30% accuracy,_ instead of -50%.\n\n_+2:_ When the Huntress uses a thrown weapon at melee range it has _-10% accuracy,_ instead of -50%.\n\n_+3:_ When the Huntress uses a thrown weapon at melee range it has _+10% accuracy,_ instead of -50%.\n\nNote that thrown weapons always have +50% accuracy when used at a distance. actors.hero.talent.farsight.title=farsight actors.hero.talent.farsight.desc=_+1:_ The Sniper's vision range is _increased by 25%_\n\n_+2:_ The Sniper's vision range is _increased by 50%_\n\n_+3:_ The Sniper's vision range is _increased by 75%_ +actors.hero.talent.durable_tips.title=durable tips +actors.hero.talent.durable_tips.desc=_+1:_ Tipped darts have _2x durability_ when the Warden uses them.\n\n_+2:_ Tipped darts have _3x durability_ when the Warden uses them.\n\n_+3:_ Tipped darts have _4x durability_ when the Warden uses them. 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 175d3341b..1631f75fe 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 @@ -108,7 +108,7 @@ public enum Talent { //Sniper T3 FARSIGHT(107, 3), SNIPER_T3_2(108, 3), SNIPER_T3_3(109, 3), //Warden T3 - WARDEN_T3_1(110, 3), WARDEN_T3_2(111, 3), WARDEN_T3_3(112, 3); + DURABLE_TIPS(110, 3), WARDEN_T3_2(111, 3), WARDEN_T3_3(112, 3); public static class ImprovisedProjectileCooldown extends FlavourBuff{}; public static class LethalMomentumTracker extends FlavourBuff{}; @@ -477,7 +477,7 @@ public enum Talent { Collections.addAll(tierTalents, FARSIGHT, SNIPER_T3_2, SNIPER_T3_3); break; case WARDEN: - Collections.addAll(tierTalents, WARDEN_T3_1, WARDEN_T3_2, WARDEN_T3_3); + Collections.addAll(tierTalents, DURABLE_TIPS, WARDEN_T3_2, WARDEN_T3_3); break; } for (Talent talent : tierTalents){ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/darts/TippedDart.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/darts/TippedDart.java index f3dfe9a96..3bb014964 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/darts/TippedDart.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/missiles/darts/TippedDart.java @@ -27,7 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.PinCushion; 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.items.Generator; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfRegrowth; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; @@ -55,9 +55,8 @@ public abstract class TippedDart extends Dart { { tier = 2; - - //so that 1.5x durability is needed for 2 uses - baseUses = 0.67f; + + baseUses = 1f; } private static final String AC_CLEAN = "CLEAN"; @@ -131,9 +130,7 @@ public abstract class TippedDart extends Dart { protected float durabilityPerUse() { float use = super.durabilityPerUse(); - if (Dungeon.hero.subClass == HeroSubClass.WARDEN){ - use /= 2f; - } + use /= (1 + Dungeon.hero.pointsInTalent(Talent.DURABLE_TIPS)); //checks both destination and source position float lotusPreserve = 0f;