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 066d823c6..e8e067a39 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java @@ -238,8 +238,18 @@ public abstract class Char extends Actor { if (enemy == null) return false; boolean visibleFight = Dungeon.level.heroFOV[pos] || Dungeon.level.heroFOV[enemy.pos]; - - if (hit( this, enemy, false )) { + + if (enemy.isInvulnerable(getClass())) { + + if (visibleFight) { + enemy.sprite.showStatus( CharSprite.POSITIVE, Messages.get(this, "invulnerable") ); + + Sample.INSTANCE.play(Assets.SND_MISS); + } + + return false; + + } else if (hit( this, enemy, false )) { int dr = enemy.drRoll(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Combo.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Combo.java index 00f358bf3..3ea8b2599 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Combo.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Combo.java @@ -74,8 +74,7 @@ public class Combo extends Buff implements ActionIndicator.Action { public void hit( Char enemy ) { - //doesn't increment combo count if enemy invulnerable - if (!enemy.isInvulnerable(target.getClass())) count++; + count++; comboTime = 4f; misses = 0; BuffIndicator.refreshHero(); @@ -216,6 +215,13 @@ public class Combo extends Buff implements ActionIndicator.Action { ActionIndicator.clearAction(Combo.this); ((Hero)target).spendAndNext(((Hero)target).attackDelay()); return; + } else if (enemy.isInvulnerable(target.getClass())){ + enemy.sprite.showStatus( CharSprite.POSITIVE, Messages.get(Char.class, "invulnerable") ); + Sample.INSTANCE.play(Assets.SND_MISS); + detach(); + ActionIndicator.clearAction(Combo.this); + ((Hero)target).spendAndNext(((Hero)target).attackDelay()); + return; } int dmg = target.damageRoll(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DemonSpawner.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DemonSpawner.java index da65c53ef..6da7f6253 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DemonSpawner.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DemonSpawner.java @@ -105,7 +105,7 @@ public class DemonSpawner extends Mob { Dungeon.level.occupyCell(spawn); - GameScene.add( spawn ); + GameScene.add( spawn, 1 ); if (sprite.visible) { Actor.addDelayed(new Pushing(spawn, pos, spawn.pos), -1); }