Search in sources :

Example 6 with IronKey

use of com.shatteredpixel.shatteredpixeldungeon.items.keys.IronKey in project shattered-pixel-dungeon-gdx by 00-Evan.

the class PrisonBossLevel method createItems.

@Override
protected void createItems() {
    Item item = Bones.get();
    if (item != null) {
        drop(item, randomRespawnCell()).type = Heap.Type.REMAINS;
    }
    drop(new IronKey(10), randomPrisonCell());
}
Also used : Item(com.shatteredpixel.shatteredpixeldungeon.items.Item) IronKey(com.shatteredpixel.shatteredpixeldungeon.items.keys.IronKey)

Example 7 with IronKey

use of com.shatteredpixel.shatteredpixeldungeon.items.keys.IronKey in project shattered-pixel-dungeon-gdx by 00-Evan.

the class LibraryRoom method paint.

public void paint(Level level) {
    Painter.fill(level, this, Terrain.WALL);
    Painter.fill(level, this, 1, Terrain.EMPTY_SP);
    Door entrance = entrance();
    Painter.fill(level, left + 1, top + 1, width() - 2, 1, Terrain.BOOKSHELF);
    Painter.drawInside(level, this, entrance, 1, Terrain.EMPTY_SP);
    int n = Random.IntRange(2, 3);
    for (int i = 0; i < n; i++) {
        int pos;
        do {
            pos = level.pointToCell(random());
        } while (level.map[pos] != Terrain.EMPTY_SP || level.heaps.get(pos) != null);
        Item item;
        if (i == 0)
            item = Random.Int(2) == 0 ? new ScrollOfIdentify() : new ScrollOfRemoveCurse();
        else
            item = prize(level);
        level.drop(item, pos);
    }
    entrance.set(Door.Type.LOCKED);
    level.addItemToSpawn(new IronKey(Dungeon.depth));
}
Also used : Item(com.shatteredpixel.shatteredpixeldungeon.items.Item) ScrollOfIdentify(com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfIdentify) IronKey(com.shatteredpixel.shatteredpixeldungeon.items.keys.IronKey) ScrollOfRemoveCurse(com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRemoveCurse)

Example 8 with IronKey

use of com.shatteredpixel.shatteredpixeldungeon.items.keys.IronKey in project shattered-pixel-dungeon-gdx by 00-Evan.

the class LaboratoryRoom method paint.

public void paint(Level level) {
    Painter.fill(level, this, Terrain.WALL);
    Painter.fill(level, this, 1, Terrain.EMPTY_SP);
    Door entrance = entrance();
    Point pot = null;
    if (entrance.x == left) {
        pot = new Point(right - 1, Random.Int(2) == 0 ? top + 1 : bottom - 1);
    } else if (entrance.x == right) {
        pot = new Point(left + 1, Random.Int(2) == 0 ? top + 1 : bottom - 1);
    } else if (entrance.y == top) {
        pot = new Point(Random.Int(2) == 0 ? left + 1 : right - 1, bottom - 1);
    } else if (entrance.y == bottom) {
        pot = new Point(Random.Int(2) == 0 ? left + 1 : right - 1, top + 1);
    }
    Painter.set(level, pot, Terrain.ALCHEMY);
    Alchemy alchemy = new Alchemy();
    alchemy.seed(level, pot.x + level.width() * pot.y, Random.IntRange(25, 50));
    level.blobs.put(Alchemy.class, alchemy);
    int n = Random.IntRange(2, 3);
    for (int i = 0; i < n; i++) {
        int pos;
        do {
            pos = level.pointToCell(random());
        } while (level.map[pos] != Terrain.EMPTY_SP || level.heaps.get(pos) != null);
        level.drop(prize(level), pos);
    }
    entrance.set(Door.Type.LOCKED);
    level.addItemToSpawn(new IronKey(Dungeon.depth));
}
Also used : Alchemy(com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Alchemy) IronKey(com.shatteredpixel.shatteredpixeldungeon.items.keys.IronKey) Point(com.watabou.utils.Point) Point(com.watabou.utils.Point)

Example 9 with IronKey

use of com.shatteredpixel.shatteredpixeldungeon.items.keys.IronKey in project shattered-pixel-dungeon-gdx by 00-Evan.

the class TreasuryRoom method paint.

public void paint(Level level) {
    Painter.fill(level, this, Terrain.WALL);
    Painter.fill(level, this, 1, Terrain.EMPTY);
    Painter.set(level, center(), Terrain.STATUE);
    Heap.Type heapType = Random.Int(2) == 0 ? Heap.Type.CHEST : Heap.Type.HEAP;
    int n = Random.IntRange(2, 3);
    for (int i = 0; i < n; i++) {
        int pos;
        do {
            pos = level.pointToCell(random());
        } while (level.map[pos] != Terrain.EMPTY || level.heaps.get(pos) != null);
        level.drop(new Gold().random(), pos).type = (Random.Int(20) == 0 && heapType == Heap.Type.CHEST ? Heap.Type.MIMIC : heapType);
    }
    if (heapType == Heap.Type.HEAP) {
        for (int i = 0; i < 6; i++) {
            int pos;
            do {
                pos = level.pointToCell(random());
            } while (level.map[pos] != Terrain.EMPTY);
            level.drop(new Gold(Random.IntRange(5, 12)), pos);
        }
    }
    entrance().set(Door.Type.LOCKED);
    level.addItemToSpawn(new IronKey(Dungeon.depth));
}
Also used : Gold(com.shatteredpixel.shatteredpixeldungeon.items.Gold) IronKey(com.shatteredpixel.shatteredpixeldungeon.items.keys.IronKey) Heap(com.shatteredpixel.shatteredpixeldungeon.items.Heap)

Example 10 with IronKey

use of com.shatteredpixel.shatteredpixeldungeon.items.keys.IronKey in project shattered-pixel-dungeon-gdx by 00-Evan.

the class CryptRoom method paint.

public void paint(Level level) {
    Painter.fill(level, this, Terrain.WALL);
    Painter.fill(level, this, 1, Terrain.EMPTY);
    Point c = center();
    int cx = c.x;
    int cy = c.y;
    Door entrance = entrance();
    entrance.set(Door.Type.LOCKED);
    level.addItemToSpawn(new IronKey(Dungeon.depth));
    if (entrance.x == left) {
        Painter.set(level, new Point(right - 1, top + 1), Terrain.STATUE);
        Painter.set(level, new Point(right - 1, bottom - 1), Terrain.STATUE);
        cx = right - 2;
    } else if (entrance.x == right) {
        Painter.set(level, new Point(left + 1, top + 1), Terrain.STATUE);
        Painter.set(level, new Point(left + 1, bottom - 1), Terrain.STATUE);
        cx = left + 2;
    } else if (entrance.y == top) {
        Painter.set(level, new Point(left + 1, bottom - 1), Terrain.STATUE);
        Painter.set(level, new Point(right - 1, bottom - 1), Terrain.STATUE);
        cy = bottom - 2;
    } else if (entrance.y == bottom) {
        Painter.set(level, new Point(left + 1, top + 1), Terrain.STATUE);
        Painter.set(level, new Point(right - 1, top + 1), Terrain.STATUE);
        cy = top + 2;
    }
    level.drop(prize(level), cx + cy * level.width()).type = Heap.Type.TOMB;
}
Also used : IronKey(com.shatteredpixel.shatteredpixeldungeon.items.keys.IronKey) Point(com.watabou.utils.Point) Point(com.watabou.utils.Point)

Aggregations

IronKey (com.shatteredpixel.shatteredpixeldungeon.items.keys.IronKey)13 Point (com.watabou.utils.Point)5 Item (com.shatteredpixel.shatteredpixeldungeon.items.Item)4 SkeletonKey (com.shatteredpixel.shatteredpixeldungeon.items.keys.SkeletonKey)3 Heap (com.shatteredpixel.shatteredpixeldungeon.items.Heap)2 CrystalKey (com.shatteredpixel.shatteredpixeldungeon.items.keys.CrystalKey)2 GoldenKey (com.shatteredpixel.shatteredpixeldungeon.items.keys.GoldenKey)2 Alchemy (com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Alchemy)1 RotHeart (com.shatteredpixel.shatteredpixeldungeon.actors.mobs.RotHeart)1 RotLasher (com.shatteredpixel.shatteredpixeldungeon.actors.mobs.RotLasher)1 Statue (com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Statue)1 Gold (com.shatteredpixel.shatteredpixeldungeon.items.Gold)1 ScrollOfIdentify (com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfIdentify)1 ScrollOfRemoveCurse (com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRemoveCurse)1