From 11e526df04a2b9affcb3109a0298b841686eb8f6 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 14 Dec 2023 14:38:20 -0500 Subject: [PATCH] v2.3.0: fixed wrong damage icon when sniper ranges an adjacent target --- .../shatteredpixel/shatteredpixeldungeon/actors/Char.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java index 34169c82d..fc868e5c9 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java @@ -804,7 +804,10 @@ public abstract class Char extends Actor { if (src instanceof Pickaxe) icon = FloatingText.PICK_DMG; //special case for sniper when using ranged attacks - if (src == Dungeon.hero && Dungeon.hero.subClass == HeroSubClass.SNIPER && Dungeon.hero.belongings.attackingWeapon() instanceof MissileWeapon){ + if (src == Dungeon.hero + && Dungeon.hero.subClass == HeroSubClass.SNIPER + && !Dungeon.level.adjacent(Dungeon.hero.pos, pos) + && Dungeon.hero.belongings.attackingWeapon() instanceof MissileWeapon){ icon = FloatingText.PHYS_DMG_NO_BLOCK; }