v2.3.0: fixed wrong damage icon when sniper ranges an adjacent target

This commit is contained in:
Evan Debenham
2023-12-14 14:38:20 -05:00
parent bfd365a2b0
commit 11e526df04
@@ -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;
}