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;
}
}
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;
}
}
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;
}
}
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;
}
}
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));
}
Aggregations