use of com.shatteredpixel.shatteredpixeldungeon.items.Honeypot in project shattered-pixel-dungeon-gdx by 00-Evan.
the class SecretHoneypotRoom method paint.
@Override
public void paint(Level level) {
Painter.fill(level, this, Terrain.WALL);
Painter.fill(level, this, 1, Terrain.EMPTY);
Point brokenPotPos = center();
brokenPotPos.x = (brokenPotPos.x + entrance().x) / 2;
brokenPotPos.y = (brokenPotPos.y + entrance().y) / 2;
Honeypot.ShatteredPot pot = new Honeypot.ShatteredPot();
level.drop(pot, level.pointToCell(brokenPotPos));
Bee bee = new Bee();
bee.spawn(Dungeon.depth);
bee.HP = bee.HT;
bee.pos = level.pointToCell(brokenPotPos);
level.mobs.add(bee);
pot.setBee(bee);
bee.setPotInfo(level.pointToCell(brokenPotPos), null);
placeItem(new Honeypot(), level);
placeItem(Random.Int(3) == 0 ? new Bomb.DoubleBomb() : new Bomb(), level);
if (Random.Int(2) == 0) {
placeItem(new Bomb(), level);
}
entrance().set(Door.Type.HIDDEN);
}
use of com.shatteredpixel.shatteredpixeldungeon.items.Honeypot 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());
}
Aggregations