use of com.shatteredpixel.shatteredpixeldungeon.actors.mobs.DM300 in project shattered-pixel-dungeon-gdx by 00-Evan.
the class CavesBossLevel method press.
@Override
public void press(int cell, Char hero) {
super.press(cell, hero);
if (!enteredArena && outsideEntraceRoom(cell) && hero == Dungeon.hero) {
enteredArena = true;
seal();
for (Mob m : mobs) {
// bring the first ally with you
if (m.alignment == Char.Alignment.ALLY) {
m.pos = Dungeon.hero.pos + (Random.Int(2) == 0 ? +1 : -1);
m.sprite.place(m.pos);
break;
}
}
DM300 boss = new DM300();
boss.state = boss.WANDERING;
do {
boss.pos = Random.Int(length());
} while (!passable[boss.pos] || !outsideEntraceRoom(boss.pos) || heroFOV[boss.pos]);
GameScene.add(boss);
set(arenaDoor, Terrain.WALL);
GameScene.updateMap(arenaDoor);
Dungeon.observe();
CellEmitter.get(arenaDoor).start(Speck.factory(Speck.ROCK), 0.07f, 10);
Camera.main.shake(3, 0.7f);
Sample.INSTANCE.play(Assets.SND_ROCKS);
}
}