Search in sources :

Example 1 with WeakFloorRoom

use of com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.WeakFloorRoom in project shattered-pixel-dungeon-gdx by 00-Evan.

the class Chasm method heroFall.

public static void heroFall(int pos) {
    jumpConfirmed = false;
    Sample.INSTANCE.play(Assets.SND_FALLING);
    Buff buff = Dungeon.hero.buff(TimekeepersHourglass.timeFreeze.class);
    if (buff != null)
        buff.detach();
    if (Dungeon.hero.isAlive()) {
        Dungeon.hero.interrupt();
        InterlevelScene.mode = InterlevelScene.Mode.FALL;
        if (Dungeon.level instanceof RegularLevel) {
            Room room = ((RegularLevel) Dungeon.level).room(pos);
            InterlevelScene.fallIntoPit = room != null && room instanceof WeakFloorRoom;
        } else {
            InterlevelScene.fallIntoPit = false;
        }
        Game.switchScene(InterlevelScene.class);
    } else {
        Dungeon.hero.sprite.visible = false;
    }
}
Also used : TimekeepersHourglass(com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TimekeepersHourglass) WeakFloorRoom(com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.WeakFloorRoom) Buff(com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff) Room(com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room) WeakFloorRoom(com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.WeakFloorRoom) RegularLevel(com.shatteredpixel.shatteredpixeldungeon.levels.RegularLevel)

Aggregations

Buff (com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff)1 TimekeepersHourglass (com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TimekeepersHourglass)1 RegularLevel (com.shatteredpixel.shatteredpixeldungeon.levels.RegularLevel)1 Room (com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room)1 WeakFloorRoom (com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.WeakFloorRoom)1