Search in sources :

Example 1 with AzuterronNPC

use of com.nyrds.pixeldungeon.mobs.npc.AzuterronNPC 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;
            }
        }
    }
}
Also used : Mob(com.watabou.pixeldungeon.actors.mobs.Mob) AzuterronNPC(com.nyrds.pixeldungeon.mobs.npc.AzuterronNPC) Shopkeeper(com.watabou.pixeldungeon.actors.mobs.npcs.Shopkeeper) ImpShopkeeper(com.watabou.pixeldungeon.actors.mobs.npcs.ImpShopkeeper) ImpShopkeeper(com.watabou.pixeldungeon.actors.mobs.npcs.ImpShopkeeper) LastShopLevel(com.watabou.pixeldungeon.levels.LastShopLevel) Point(com.watabou.utils.Point)

Aggregations

AzuterronNPC (com.nyrds.pixeldungeon.mobs.npc.AzuterronNPC)1 Mob (com.watabou.pixeldungeon.actors.mobs.Mob)1 ImpShopkeeper (com.watabou.pixeldungeon.actors.mobs.npcs.ImpShopkeeper)1 Shopkeeper (com.watabou.pixeldungeon.actors.mobs.npcs.Shopkeeper)1 LastShopLevel (com.watabou.pixeldungeon.levels.LastShopLevel)1 Point (com.watabou.utils.Point)1