Search in sources :

Example 1 with PotionOfLiquidFlame

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;
    }
}
Also used : Item(com.shatteredpixel.shatteredpixeldungeon.items.Item) Gold(com.shatteredpixel.shatteredpixeldungeon.items.Gold) PotionOfLiquidFlame(com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLiquidFlame) ArrayList(java.util.ArrayList) Skeleton(com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Skeleton) Heap(com.shatteredpixel.shatteredpixeldungeon.items.Heap) CorpseDust(com.shatteredpixel.shatteredpixeldungeon.items.quest.CorpseDust)

Example 2 with PotionOfLiquidFlame

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());
}
Also used : PotionOfLiquidFlame(com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLiquidFlame) Honeypot(com.shatteredpixel.shatteredpixeldungeon.items.Honeypot)

Example 3 with 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);
}
Also used : StoneOfEnchantment(com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfEnchantment) PotionOfLiquidFlame(com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLiquidFlame) Point(com.watabou.utils.Point) Point(com.watabou.utils.Point)

Aggregations

PotionOfLiquidFlame (com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLiquidFlame)3 Skeleton (com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Skeleton)1 Gold (com.shatteredpixel.shatteredpixeldungeon.items.Gold)1 Heap (com.shatteredpixel.shatteredpixeldungeon.items.Heap)1 Honeypot (com.shatteredpixel.shatteredpixeldungeon.items.Honeypot)1 Item (com.shatteredpixel.shatteredpixeldungeon.items.Item)1 CorpseDust (com.shatteredpixel.shatteredpixeldungeon.items.quest.CorpseDust)1 StoneOfEnchantment (com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfEnchantment)1 Point (com.watabou.utils.Point)1 ArrayList (java.util.ArrayList)1