use of com.shatteredpixel.shatteredpixeldungeon.windows.WndMessage in project shattered-pixel-dungeon-gdx by 00-Evan.
the class Hero method actAscend.
private boolean actAscend(HeroAction.Ascend action) {
int stairs = action.dst;
if (pos == stairs && pos == Dungeon.level.entrance) {
if (Dungeon.depth == 1) {
if (belongings.getItem(Amulet.class) == null) {
GameScene.show(new WndMessage(Messages.get(this, "leave")));
ready();
} else {
Dungeon.win(Amulet.class);
Dungeon.deleteGame(GamesInProgress.curSlot, true);
Game.switchScene(SurfaceScene.class);
}
} else {
curAction = null;
Buff buff = buff(TimekeepersHourglass.timeFreeze.class);
if (buff != null)
buff.detach();
InterlevelScene.mode = InterlevelScene.Mode.ASCEND;
Game.switchScene(InterlevelScene.class);
}
return false;
} else if (getCloser(stairs)) {
return true;
} else {
ready();
return false;
}
}
Aggregations