From 8f0abdb7d2b6af2a796c619a5b8803b8841b46e9 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 27 Apr 2020 14:11:09 -0400 Subject: [PATCH] v0.8.0a: buffed sniper shot ability by 20-40%, depending on distance --- .../shatteredpixeldungeon/items/weapon/SpiritBow.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 84502a88e..b3406f9cb 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 @@ -166,8 +166,11 @@ public class SpiritBow extends Weapon { damage = Math.round(damage * 0.5f); break; case DAMAGE: + //as distance increases so does damage, capping at 2.5x: + //1.20x|1.32x|1.45x|1.59x|1.76x|1.93x|2.13x|2.34x|2.50x int distance = Dungeon.level.distance(owner.pos, targetPos) - 1; - damage = Math.round(damage * (1f + 0.1f * distance)); + float multiplier = Math.min(2.5f, 1.2f * (float)Math.pow(1.1f, distance)); + damage = Math.round(damage * multiplier); break; } }