Search in sources :

Example 6 with Honeypot

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);
}
Also used : Bee(com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Bee) Point(com.watabou.utils.Point) Bomb(com.shatteredpixel.shatteredpixeldungeon.items.Bomb) Honeypot(com.shatteredpixel.shatteredpixeldungeon.items.Honeypot)

Example 7 with Honeypot

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

Aggregations

Honeypot (com.shatteredpixel.shatteredpixeldungeon.items.Honeypot)7 Item (com.shatteredpixel.shatteredpixeldungeon.items.Item)4 Bomb (com.shatteredpixel.shatteredpixeldungeon.items.Bomb)3 Ankh (com.shatteredpixel.shatteredpixeldungeon.items.Ankh)2 Stylus (com.shatteredpixel.shatteredpixeldungeon.items.Stylus)2 Torch (com.shatteredpixel.shatteredpixeldungeon.items.Torch)2 PlateArmor (com.shatteredpixel.shatteredpixeldungeon.items.armor.PlateArmor)2 TimekeepersHourglass (com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TimekeepersHourglass)2 PotionOfHealing (com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing)2 Longsword (com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Longsword)2 ArrayList (java.util.ArrayList)2 IntMap (com.badlogic.gdx.utils.IntMap)1 Blob (com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob)1 Bee (com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Bee)1 Mob (com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob)1 Flare (com.shatteredpixel.shatteredpixeldungeon.effects.Flare)1 DewVial (com.shatteredpixel.shatteredpixeldungeon.items.DewVial)1 Gold (com.shatteredpixel.shatteredpixeldungeon.items.Gold)1 Heap (com.shatteredpixel.shatteredpixeldungeon.items.Heap)1 MerchantsBeacon (com.shatteredpixel.shatteredpixeldungeon.items.MerchantsBeacon)1