diff --git a/core/src/main/assets/messages/actors/actors.properties b/core/src/main/assets/messages/actors/actors.properties index 2d3921d3e..cb7644b49 100644 --- a/core/src/main/assets/messages/actors/actors.properties +++ b/core/src/main/assets/messages/actors/actors.properties @@ -429,6 +429,8 @@ 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.shared_enchantment.title=shared enchantment actors.hero.talent.shared_enchantment.desc=_+1:_ Thrown weapons have a _33% chance_ to use the enchantment on the Sniper's bow.\n\n_+2:_ Thrown weapons have a _67% chance_ to use the enchantment on the Sniper's bow.\n\n_+3:_ Thrown weapons have a _100% chance_ to use the enchantment on the Sniper's bow.\n\nThis talent does not apply to darts shot from an enchanted crossbow, they already trigger the crossbow's enchantment. +actors.hero.talent.shared_upgrades.title=shared upgrades +actors.hero.talent.shared_upgrades.desc=_+1:_ When the Sniper attacks with an upgraded thrown weapon, each level increases the duration of sniper's mark by 1 turn and the damage of her special attack by _7%_.\n\n_+2:_ When the Sniper attacks with an upgraded thrown weapon, each level increases the duration of sniper's mark by 1 turn and the damage of her special attack by _13%_.\n\n_+3:_ When the Sniper attacks with an upgraded thrown weapon, each level increases the duration of sniper's mark by 1 turn and the damage of her special attack by _20%_. 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.talent.barkskin.title=barkskin diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/SnipersMark.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/SnipersMark.java index 79fcc4ad9..f4590db35 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/SnipersMark.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/SnipersMark.java @@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.SpiritBow; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; @@ -38,14 +39,21 @@ import com.watabou.utils.Bundle; public class SnipersMark extends FlavourBuff implements ActionIndicator.Action { public int object = 0; + public int level = 0; private static final String OBJECT = "object"; + private static final String LEVEL = "level"; public static final float DURATION = 4f; { type = buffType.POSITIVE; } + + public void set(int object, int level){ + this.object = object; + this.level = level; + } @Override public boolean attachTo(Char target) { @@ -63,13 +71,14 @@ public class SnipersMark extends FlavourBuff implements ActionIndicator.Action { public void storeInBundle( Bundle bundle ) { super.storeInBundle( bundle ); bundle.put( OBJECT, object ); - + bundle.put( LEVEL, level ); } @Override public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle( bundle ); object = bundle.getInt( OBJECT ); + level = bundle.getInt( LEVEL ); } @Override @@ -116,6 +125,7 @@ public class SnipersMark extends FlavourBuff implements ActionIndicator.Action { if (cell == -1) return; bow.sniperSpecial = true; + bow.sniperSpecialBonusDamage = level*Dungeon.hero.pointsInTalent(Talent.SHARED_UPGRADES)/15f; arrow.cast(hero, cell); detach(); 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 96a7fde3b..53c85cf46 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 @@ -1067,7 +1067,8 @@ public class Hero extends Char { @Override protected boolean act() { if (enemy.isAlive()) { - Buff.prolong(Hero.this, SnipersMark.class, SnipersMark.DURATION).object = enemy.id(); + int bonusTurns = hasTalent(Talent.SHARED_UPGRADES) ? wep.buffedLvl() : 0; + Buff.prolong(Hero.this, SnipersMark.class, SnipersMark.DURATION + bonusTurns).set(enemy.id(), bonusTurns); } Actor.remove(this); return true; 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 e062b4509..52ac0f4a5 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 @@ -106,7 +106,7 @@ public enum Talent { //Huntress T3 POINT_BLANK(105, 3), HUNTRESS_T3_2(106, 3), //Sniper T3 - FARSIGHT(107, 3), SHARED_ENCHANTMENT(108, 3), SNIPER_T3_3(109, 3), + FARSIGHT(107, 3), SHARED_ENCHANTMENT(108, 3), SHARED_UPGRADES(109, 3), //Warden T3 DURABLE_TIPS(110, 3), BARKSKIN(111, 3), SHIELDING_DEW(112, 3); @@ -476,7 +476,7 @@ public enum Talent { Collections.addAll(tierTalents, EVASIVE_ARMOR, PROJECTILE_MOMENTUM, FREERUNNER_T3_3); break; case SNIPER: - Collections.addAll(tierTalents, FARSIGHT, SHARED_ENCHANTMENT, SNIPER_T3_3); + Collections.addAll(tierTalents, FARSIGHT, SHARED_ENCHANTMENT, SHARED_UPGRADES); break; case WARDEN: Collections.addAll(tierTalents, DURABLE_TIPS, BARKSKIN, SHIELDING_DEW); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/SpiritBow.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/SpiritBow.java index 65a05131f..2f2075603 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/SpiritBow.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/SpiritBow.java @@ -57,6 +57,7 @@ public class SpiritBow extends Weapon { } public boolean sniperSpecial = false; + public float sniperSpecialBonusDamage = 0f; @Override public ArrayList actions(Hero hero) { @@ -159,6 +160,8 @@ public class SpiritBow extends Weapon { damage += Random.IntRange( 0, exStr ); } } + + damage = Math.round(damage * (1f + sniperSpecialBonusDamage)); if (sniperSpecial){ switch (augment){