From ef37060163f3209ee78f1774b90e4aa1f3dc01f6 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 4 Feb 2021 23:59:35 -0500 Subject: [PATCH] v0.9.2: implemented the bounty hunter talent --- core/src/main/assets/messages/actors/actors.properties | 2 ++ .../shatteredpixeldungeon/actors/buffs/Preparation.java | 6 +++++- .../shatteredpixeldungeon/actors/hero/Talent.java | 5 +++-- .../shatteredpixeldungeon/actors/mobs/Mob.java | 7 +++++++ 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/core/src/main/assets/messages/actors/actors.properties b/core/src/main/assets/messages/actors/actors.properties index 4fbe61eb3..f70d213df 100644 --- a/core/src/main/assets/messages/actors/actors.properties +++ b/core/src/main/assets/messages/actors/actors.properties @@ -384,6 +384,8 @@ actors.hero.talent.rogues_foresight.title=rogue's foresight actors.hero.talent.rogues_foresight.desc=_+1:_ When the Rogue is on a level with a secret room, he has a _50% chance to notice_ that the level contains a secret.\n\n_+2:_ When the Rogue is on a level with a secret room, he has a _75% chance to notice_ that the level contains a secret. actors.hero.talent.enhanced_lethality.title=enhanced lethality actors.hero.talent.enhanced_lethality.desc=_+1:_ The Assassin can assassinate enemies below _4/12/25/60% health_ per level of preparation, up from 3/10/20/40%.\n\n_+2:_ The Assassin can assassinate enemies below _5/14/30/80% health_ per level of preparation, up from 3/10/20/40%.\n\n_+3:_ The Assassin can assassinate enemies below _6/16/35/100% health_ per level of preparation, up from 3/10/20/40%. +actors.hero.talent.bounty_hunter.title=bounty hunter +actors.hero.talent.bounty_hunter.desc=_+1:_ When the Assassin kills an enemy with a prepared strike they drop _10 extra gold_.\n\n_+2:_ When the Assassin kills an enemy with a prepared strike they drop _20 extra gold_.\n\n_+3:_ When the Assassin kills an enemy with a prepared strike they drop _30 extra gold_. actors.hero.talent.evasive_armor.title=evasive armor actors.hero.talent.evasive_armor.desc=_+1:_ While freerunning, the Freerunner gains an additional _+1 evasion_ per excess point of strength on his armor.\n\n_+2:_ While freerunning, the Freerunner gains an additional _+2 evasion_ per excess point of strength on his armor.\n\n_+3:_ While freerunning, the Freerunner gains an additional _+3 evasion_ per excess point of strength on his armor. diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Preparation.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Preparation.java index 32be8e652..35e112568 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Preparation.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Preparation.java @@ -251,7 +251,11 @@ public class Preparation extends Buff implements ActionIndicator.Action { if (enemy == null || Dungeon.hero.isCharmedBy(enemy) || enemy instanceof NPC || !Dungeon.level.heroFOV[cell]){ GLog.w(Messages.get(Preparation.class, "no_target")); } else { - + + if (Dungeon.hero.hasTalent(Talent.BOUNTY_HUNTER)) { + Buff.affect(Dungeon.hero, Talent.BountyHunterTracker.class, 0.0f); + } + //just attack them then! if (Dungeon.hero.canAttack(enemy)){ Dungeon.hero.curAction = new HeroAction.Attack( enemy ); 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 3f74f82cf..647a8e11e 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 @@ -95,7 +95,7 @@ public enum Talent { //Rogue T3 ROGUE_T3_1(73, 3), ROGUE_T3_2(74, 3), //Assassin T3 - ENHANCED_LETHALITY(75, 3), ASSASSIN_T3_2(76, 3), ASSASSIN_T3_3(77, 3), + ENHANCED_LETHALITY(75, 3), ASSASSIN_T3_2(76, 3), BOUNTY_HUNTER(77, 3), //Freerunner T3 EVASIVE_ARMOR(78, 3), FREERUNNER_T3_2(79, 3), FREERUNNER_T3_3(80, 3), @@ -114,6 +114,7 @@ public enum Talent { public static class LethalMomentumTracker extends FlavourBuff{}; public static class WandPreservationCounter extends CounterBuff{}; public static class EmpoweredStrikeTracker extends FlavourBuff{}; + public static class BountyHunterTracker extends FlavourBuff{}; public static class RejuvenatingStepsCooldown extends FlavourBuff{}; int icon; @@ -469,7 +470,7 @@ public enum Talent { Collections.addAll(tierTalents, SOUL_SIPHON, WARLOCK_T3_2, WARLOCK_T3_3); break; case ASSASSIN: - Collections.addAll(tierTalents, ENHANCED_LETHALITY, ASSASSIN_T3_2, ASSASSIN_T3_3); + Collections.addAll(tierTalents, ENHANCED_LETHALITY, ASSASSIN_T3_2, BOUNTY_HUNTER); break; case FREERUNNER: Collections.addAll(tierTalents, EVASIVE_ARMOR, FREERUNNER_T3_2, FREERUNNER_T3_3); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java index d9c4f01b8..0c79a3717 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java @@ -45,6 +45,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.effects.Surprise; import com.shatteredpixel.shatteredpixeldungeon.effects.Wound; import com.shatteredpixel.shatteredpixeldungeon.items.Generator; +import com.shatteredpixel.shatteredpixeldungeon.items.Gold; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.DriedRose; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TimekeepersHourglass; @@ -716,6 +717,12 @@ public abstract class Mob extends Char { Dungeon.level.drop(Lucky.genLoot(), pos).sprite.drop(); Lucky.showFlare(sprite); } + + //bounty hunter talent + if (Dungeon.hero.buff(Talent.BountyHunterTracker.class) != null){ + Dungeon.level.drop(new Gold(10 * Dungeon.hero.pointsInTalent(Talent.BOUNTY_HUNTER)), pos).sprite.drop(); + } + } protected Object loot = null;