v2.0.0: red sentries now roll accuracy like other enemies
This commit is contained in:
+14
-4
@@ -42,6 +42,7 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.EmptyRoom;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.EmptyRoom;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.MobSprite;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.MobSprite;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap;
|
import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
@@ -276,12 +277,21 @@ public class SentryRoom extends SpecialRoom {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void onZapComplete(){
|
public void onZapComplete(){
|
||||||
Dungeon.hero.damage(Random.NormalIntRange(2+Dungeon.depth/2, 4+Dungeon.depth), new Eye.DeathGaze());
|
if (hit(this, Dungeon.hero, true)) {
|
||||||
if (!Dungeon.hero.isAlive()){
|
Dungeon.hero.damage(Random.NormalIntRange(2 + Dungeon.depth / 2, 4 + Dungeon.depth), new Eye.DeathGaze());
|
||||||
|
if (!Dungeon.hero.isAlive()) {
|
||||||
Badges.validateDeathFromEnemyMagic();
|
Badges.validateDeathFromEnemyMagic();
|
||||||
Dungeon.fail( getClass() );
|
Dungeon.fail(getClass());
|
||||||
GLog.n( Messages.capitalize(Messages.get(Char.class, "kill", name())) );
|
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
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user