Search in sources :

Example 26 with Item

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

the class SewerBossLevel method createItems.

@Override
protected void createItems() {
    Item item = Bones.get();
    if (item != null) {
        int pos;
        do {
            pos = pointToCell(roomEntrance.random());
        } while (pos == entrance || solid[pos]);
        drop(item, pos).type = Heap.Type.REMAINS;
    }
}
Also used : Item(com.shatteredpixel.shatteredpixeldungeon.items.Item)

Example 27 with Item

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

the class CavesBossLevel method createItems.

@Override
protected void createItems() {
    Item item = Bones.get();
    if (item != null) {
        int pos;
        do {
            pos = Random.IntRange(ROOM_LEFT, ROOM_RIGHT) + Random.IntRange(ROOM_TOP + 1, ROOM_BOTTOM) * width();
        } while (pos == entrance);
        drop(item, pos).type = Heap.Type.REMAINS;
    }
}
Also used : Item(com.shatteredpixel.shatteredpixeldungeon.items.Item)

Example 28 with Item

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

the class CityBossLevel method createItems.

@Override
protected void createItems() {
    Item item = Bones.get();
    if (item != null) {
        int pos;
        do {
            pos = Random.IntRange(LEFT + 1, LEFT + HALL_WIDTH - 2) + Random.IntRange(TOP + HALL_HEIGHT + 1, TOP + HALL_HEIGHT + CHAMBER_HEIGHT) * width();
        } while (pos == entrance);
        drop(item, pos).type = Heap.Type.REMAINS;
    }
}
Also used : Item(com.shatteredpixel.shatteredpixeldungeon.items.Item)

Example 29 with Item

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

the class LastShopLevel method createItems.

@Override
protected void createItems() {
    Item item = Bones.get();
    if (item != null) {
        int pos;
        do {
            pos = pointToCell(roomEntrance.random());
        } while (pos == entrance);
        drop(item, pos).type = Heap.Type.REMAINS;
    }
}
Also used : Item(com.shatteredpixel.shatteredpixeldungeon.items.Item)

Example 30 with Item

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

the class VaultRoom method paint.

public void paint(Level level) {
    Painter.fill(level, this, Terrain.WALL);
    Painter.fill(level, this, 1, Terrain.EMPTY_SP);
    Painter.fill(level, this, 2, Terrain.EMPTY);
    int cx = (left + right) / 2;
    int cy = (top + bottom) / 2;
    int c = cx + cy * level.width();
    Random.shuffle(prizeClasses);
    Item i1, i2;
    i1 = prize(level);
    i2 = prize(level);
    level.drop(i1, c).type = Heap.Type.CRYSTAL_CHEST;
    level.drop(i2, c + PathFinder.NEIGHBOURS8[Random.Int(8)]).type = Heap.Type.CRYSTAL_CHEST;
    level.addItemToSpawn(new CrystalKey(Dungeon.depth));
    entrance().set(Door.Type.LOCKED);
    level.addItemToSpawn(new IronKey(Dungeon.depth));
}
Also used : Item(com.shatteredpixel.shatteredpixeldungeon.items.Item) CrystalKey(com.shatteredpixel.shatteredpixeldungeon.items.keys.CrystalKey) IronKey(com.shatteredpixel.shatteredpixeldungeon.items.keys.IronKey)

Aggregations

Item (com.shatteredpixel.shatteredpixeldungeon.items.Item)67 Heap (com.shatteredpixel.shatteredpixeldungeon.items.Heap)14 ArrayList (java.util.ArrayList)14 Hero (com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero)9 Char (com.shatteredpixel.shatteredpixeldungeon.actors.Char)7 Mob (com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob)7 Gold (com.shatteredpixel.shatteredpixeldungeon.items.Gold)7 Point (com.watabou.utils.Point)7 IronKey (com.shatteredpixel.shatteredpixeldungeon.items.keys.IronKey)6 EquipableItem (com.shatteredpixel.shatteredpixeldungeon.items.EquipableItem)5 Flare (com.shatteredpixel.shatteredpixeldungeon.effects.Flare)4 Honeypot (com.shatteredpixel.shatteredpixeldungeon.items.Honeypot)4 WndTradeItem (com.shatteredpixel.shatteredpixeldungeon.windows.WndTradeItem)4 Dewdrop (com.shatteredpixel.shatteredpixeldungeon.items.Dewdrop)3 Armor (com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor)3 Potion (com.shatteredpixel.shatteredpixeldungeon.items.potions.Potion)3 Fire (com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Fire)2 Belongings (com.shatteredpixel.shatteredpixeldungeon.actors.hero.Belongings)2 Thief (com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Thief)2 Ankh (com.shatteredpixel.shatteredpixeldungeon.items.Ankh)2