v2.3.0: fixed wrong damage icon when sniper ranges an adjacent target
This commit is contained in:
@@ -804,7 +804,10 @@ public abstract class Char extends Actor {
|
|||||||
if (src instanceof Pickaxe) icon = FloatingText.PICK_DMG;
|
if (src instanceof Pickaxe) icon = FloatingText.PICK_DMG;
|
||||||
|
|
||||||
//special case for sniper when using ranged attacks
|
//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;
|
icon = FloatingText.PHYS_DMG_NO_BLOCK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user