v2.0.0: red sentries now roll accuracy like other enemies

This commit is contained in:
Evan Debenham
2023-03-01 13:49:30 -05:00
parent c0645309a5
commit 4522765224

View File

@@ -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;