diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GreatCrab.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GreatCrab.java index a8f6501d3..3e4702156 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GreatCrab.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GreatCrab.java @@ -72,8 +72,12 @@ public class GreatCrab extends Crab { public void damage( int dmg, Object src ){ //crab blocks all wand damage from the hero if it sees them. //Direct damage is negated, but add-on effects and environmental effects go through as normal. - if ((enemySeen && state != SLEEPING && paralysed == 0) - && (src instanceof Wand && enemy == Dungeon.hero)){ + if (enemySeen + && state != SLEEPING + && paralysed == 0 + && src instanceof Wand + && enemy == Dungeon.hero + && enemy.invisible == 0){ GLog.n( Messages.get(this, "noticed") ); sprite.showStatus( CharSprite.NEUTRAL, Messages.get(this, "def_verb") ); Sample.INSTANCE.play( Assets.Sounds.HIT_PARRY, 1, Random.Float(0.96f, 1.05f)); @@ -85,7 +89,11 @@ public class GreatCrab extends Crab { @Override public int defenseSkill( Char enemy ) { //crab blocks all melee attacks from its current target - if (enemySeen && state != SLEEPING && paralysed == 0 && enemy == this.enemy){ + if (enemySeen + && state != SLEEPING + && paralysed == 0 + && enemy == this.enemy + && enemy.invisible == 0){ if (sprite != null && sprite.visible) { Sample.INSTANCE.play(Assets.Sounds.HIT_PARRY, 1, Random.Float(0.96f, 1.05f)); GLog.n( Messages.get(this, "noticed") );