diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/SentryRoom.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/SentryRoom.java index b4d0615e3..0a2f07b36 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/SentryRoom.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/SentryRoom.java @@ -42,6 +42,7 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.EmptyRoom; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; +import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.MobSprite; import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; @@ -276,14 +277,23 @@ public class SentryRoom extends SpecialRoom { } public void onZapComplete(){ - Dungeon.hero.damage(Random.NormalIntRange(2+Dungeon.depth/2, 4+Dungeon.depth), new Eye.DeathGaze()); - if (!Dungeon.hero.isAlive()){ - Badges.validateDeathFromEnemyMagic(); - Dungeon.fail( getClass() ); - GLog.n( Messages.capitalize(Messages.get(Char.class, "kill", name())) ); + if (hit(this, Dungeon.hero, true)) { + Dungeon.hero.damage(Random.NormalIntRange(2 + Dungeon.depth / 2, 4 + Dungeon.depth), new Eye.DeathGaze()); + if (!Dungeon.hero.isAlive()) { + Badges.validateDeathFromEnemyMagic(); + Dungeon.fail(getClass()); + GLog.n(Messages.capitalize(Messages.get(Char.class, "kill", name()))); + } + } else { + Dungeon.hero.sprite.showStatus( CharSprite.NEUTRAL, Dungeon.hero.defenseVerb() ); } } + @Override + public int attackSkill(Char target) { + return 20 + Dungeon.depth * 2; + } + @Override public int defenseSkill( Char enemy ) { return INFINITE_EVASION;