use of com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLiquidFlame in project shattered-pixel-dungeon-gdx by 00-Evan.
the class MassGraveRoom method paint.
public void paint(Level level) {
Door entrance = entrance();
entrance.set(Door.Type.BARRICADE);
level.addItemToSpawn(new PotionOfLiquidFlame());
Painter.fill(level, this, Terrain.WALL);
Painter.fill(level, this, 1, Terrain.EMPTY_SP);
Bones b = new Bones();
b.setRect(left + 1, top, width() - 2, height() - 1);
level.customTiles.add(b);
// 50% 1 skeleton, 50% 2 skeletons
for (int i = 0; i <= Random.Int(2); i++) {
Skeleton skele = new Skeleton();
int pos;
do {
pos = level.pointToCell(random());
} while (level.map[pos] != Terrain.EMPTY_SP || level.findMob(pos) != null);
skele.pos = pos;
level.mobs.add(skele);
}
ArrayList<Item> items = new ArrayList<>();
// 100% corpse dust, 2x100% 1 coin, 2x30% coins, 1x60% random item, 1x30% armor
items.add(new CorpseDust());
items.add(new Gold(1));
items.add(new Gold(1));
if (Random.Float() <= 0.3f)
items.add(new Gold());
if (Random.Float() <= 0.3f)
items.add(new Gold());
if (Random.Float() <= 0.6f)
items.add(Generator.random());
if (Random.Float() <= 0.3f)
items.add(Generator.randomArmor());
for (Item item : items) {
int pos;
do {
pos = level.pointToCell(random());
} while (level.map[pos] != Terrain.EMPTY_SP || level.heaps.get(pos) != null);
Heap h = level.drop(item, pos);
h.type = Heap.Type.SKELETON;
}
}
use of com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLiquidFlame in project shattered-pixel-dungeon-gdx by 00-Evan.
the class StorageRoom method paint.
public void paint(Level level) {
final int floor = Terrain.EMPTY_SP;
Painter.fill(level, this, Terrain.WALL);
Painter.fill(level, this, 1, floor);
boolean honeyPot = Random.Int(2) == 0;
int n = Random.IntRange(3, 4);
for (int i = 0; i < n; i++) {
int pos;
do {
pos = level.pointToCell(random());
} while (level.map[pos] != floor);
if (honeyPot) {
level.drop(new Honeypot(), pos);
honeyPot = false;
} else
level.drop(prize(level), pos);
}
entrance().set(Door.Type.BARRICADE);
level.addItemToSpawn(new PotionOfLiquidFlame());
}
use of com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLiquidFlame in project shattered-pixel-dungeon-gdx by 00-Evan.
the class SecretRunestoneRoom method paint.
@Override
public void paint(Level level) {
Painter.fill(level, this, Terrain.WALL);
Painter.fill(level, this, 1, Terrain.EMPTY);
Door entrance = entrance();
Point center = center();
if (entrance.x == left || entrance.x == right) {
Painter.drawLine(level, new Point(center.x, top + 1), new Point(center.x, bottom - 1), Terrain.BOOKSHELF);
if (entrance.x == left) {
Painter.fill(level, center.x + 1, top + 1, right - center.x - 1, height() - 2, Terrain.EMPTY_SP);
} else {
Painter.fill(level, left + 1, top + 1, center.x - left - 1, height() - 2, Terrain.EMPTY_SP);
}
} else {
Painter.drawLine(level, new Point(left + 1, center.y), new Point(right - 1, center.y), Terrain.BOOKSHELF);
if (entrance.y == top) {
Painter.fill(level, left + 1, center.y + 1, width() - 2, bottom - center.y - 1, Terrain.EMPTY_SP);
} else {
Painter.fill(level, left + 1, top + 1, width() - 2, center.y - top - 1, Terrain.EMPTY_SP);
}
}
level.addItemToSpawn(new PotionOfLiquidFlame());
int dropPos;
do {
dropPos = level.pointToCell(random());
} while (level.map[dropPos] != Terrain.EMPTY_SP);
level.drop(new StoneOfEnchantment(), dropPos);
entrance.set(Door.Type.HIDDEN);
}
Aggregations