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