From 44c11c4b5068da05c86fea66199f60b0cbb46b3c Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sat, 23 Jan 2021 21:18:49 -0500 Subject: [PATCH] v0.9.2: implement the point blank talent --- core/src/main/assets/messages/actors/actors.properties | 2 ++ .../shatteredpixeldungeon/actors/hero/Hero.java | 2 +- .../shatteredpixeldungeon/actors/hero/Talent.java | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/src/main/assets/messages/actors/actors.properties b/core/src/main/assets/messages/actors/actors.properties index 591278e98..84debdf26 100644 --- a/core/src/main/assets/messages/actors/actors.properties +++ b/core/src/main/assets/messages/actors/actors.properties @@ -391,6 +391,8 @@ actors.hero.talent.heightened_senses.title=heightened senses actors.hero.talent.heightened_senses.desc=_+1:_ The Huntress gains mind vision on any enemy within _2 tiles of her position_.\n\n_+2:_ The Huntress gains mind vision on any enemy within _3 tiles of her position_. actors.hero.talent.durable_projectiles.title=durable projectiles actors.hero.talent.durable_projectiles.desc=_+1:_ Thrown weapons have _+50% durability_ when used by the Huntress.\n\n_+2:_ Thrown weapons have _+75% durability_ when used by the Huntress. +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.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 b58fa8e46..5cc7a24b2 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 @@ -400,7 +400,7 @@ public class Hero extends Char { if (wep instanceof MissileWeapon){ if (Dungeon.level.adjacent( pos, target.pos )) { - accuracy *= 0.5f; + accuracy *= (0.5f + 0.2f*pointsInTalent(Talent.POINT_BLANK)); } else { accuracy *= 1.5f; } 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 83d74ae73..6ad4d94d0 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 @@ -104,7 +104,7 @@ public enum Talent { //Huntress T2 INVIGORATING_MEAL(100), RESTORED_NATURE(101), REJUVENATING_STEPS(102), HEIGHTENED_SENSES(103), DURABLE_PROJECTILES(104), //Huntress T3 - HUNTRESS_T3_1(105, 3), HUNTRESS_T3_2(106, 3), + POINT_BLANK(105, 3), HUNTRESS_T3_2(106, 3), //Sniper T3 SNIPER_T3_1(107, 3), SNIPER_T3_2(108, 3), SNIPER_T3_3(109, 3), //Warden T3 @@ -424,7 +424,7 @@ public enum Talent { Collections.addAll(tierTalents, ROGUE_T3_1, ROGUE_T3_2); break; case HUNTRESS: - Collections.addAll(tierTalents, HUNTRESS_T3_1, HUNTRESS_T3_2); + Collections.addAll(tierTalents, POINT_BLANK, HUNTRESS_T3_2); break; } for (Talent talent : tierTalents){