use of com.watabou.pixeldungeon.windows.WndResurrect in project pixel-dungeon by watabou.
the class Hero method die.
@Override
public void die(Object cause) {
curAction = null;
DewVial.autoDrink(this);
if (isAlive()) {
new Flare(8, 32).color(0xFFFF66, true).show(sprite, 2f);
return;
}
Actor.fixTime();
super.die(cause);
Ankh ankh = (Ankh) belongings.getItem(Ankh.class);
if (ankh == null) {
reallyDie(cause);
} else {
Dungeon.deleteGame(Dungeon.hero.heroClass, false);
GameScene.show(new WndResurrect(ankh, cause));
}
}
use of com.watabou.pixeldungeon.windows.WndResurrect in project pixel-dungeon-remix by NYRDS.
the class Hero method die.
@Override
public void die(Object cause) {
clearActions();
DewVial.autoDrink(this);
if (isAlive()) {
new Flare(8, 32).color(0xFFFF66, true).show(getSprite(), 2f);
return;
}
Actor.fixTime();
super.die(cause);
Ankh ankh = belongings.getItem(Ankh.class);
if (ankh == null) {
if (this.subClass == HeroSubClass.LICH && this.getSoulPoints() == this.getSoulPointsMax()) {
this.setSoulPoints(0);
Dungeon.deleteGame(false);
GameScene.show(new WndResurrect(null, cause));
} else {
reallyDie(cause);
}
} else {
Dungeon.deleteGame(false);
while (belongings.removeItem(ankh)) {
}
GameScene.show(new WndResurrect(ankh, cause));
}
}
Aggregations