use of com.watabou.pixeldungeon.actors.mobs.npcs.Shopkeeper in project pixel-dungeon by watabou.
the class ShopPainter method placeShopkeeper.
private static void placeShopkeeper(Level level, Room room) {
int pos;
do {
pos = room.random();
} while (level.heaps.get(pos) != null);
Mob shopkeeper = level instanceof LastShopLevel ? new ImpShopkeeper() : new Shopkeeper();
shopkeeper.pos = pos;
level.mobs.add(shopkeeper);
if (level instanceof LastShopLevel) {
for (int i = 0; i < Level.NEIGHBOURS9.length; i++) {
int p = shopkeeper.pos + Level.NEIGHBOURS9[i];
if (level.map[p] == Terrain.EMPTY_SP) {
level.map[p] = Terrain.WATER;
}
}
}
}
use of com.watabou.pixeldungeon.actors.mobs.npcs.Shopkeeper in project pixel-dungeon-remix by NYRDS.
the class ShopPainter method placeShopkeeper.
private static void placeShopkeeper(Level level, Room room) {
int pos;
do {
pos = room.random(level);
} while (level.getHeap(pos) != null);
Mob shopkeeper = level instanceof LastShopLevel ? new ImpShopkeeper() : new Shopkeeper();
if (Dungeon.depth == 27) {
shopkeeper = new AzuterronNPC();
}
shopkeeper.setPos(pos);
level.mobs.add(shopkeeper);
if (level instanceof LastShopLevel) {
for (int i = 0; i < Level.NEIGHBOURS9.length; i++) {
int p = shopkeeper.getPos() + Level.NEIGHBOURS9[i];
if (level.map[p] == Terrain.EMPTY_SP) {
level.map[p] = Terrain.WATER;
}
}
}
}
Aggregations