v1.1.0: fixed unblessed ankh revival rarely placing the hero on traps
This commit is contained in:
parent
65d8bfffe3
commit
1eff353254
|
@ -462,8 +462,9 @@ public class InterlevelScene extends PixelScene {
|
||||||
do {
|
do {
|
||||||
Dungeon.hero.pos = level.randomRespawnCell(Dungeon.hero);
|
Dungeon.hero.pos = level.randomRespawnCell(Dungeon.hero);
|
||||||
tries++;
|
tries++;
|
||||||
} while (level.trueDistance(invPos, Dungeon.hero.pos) <= 30 - (tries/10));
|
} while (level.traps.get(Dungeon.hero.pos) != null
|
||||||
level.plants.remove(Dungeon.hero.pos); //so the hero does not spawn on a plant
|
|| (level.plants.get(Dungeon.hero.pos) != null && tries < 500)
|
||||||
|
|| level.trueDistance(invPos, Dungeon.hero.pos) <= 30 - (tries/10));
|
||||||
Dungeon.hero.resurrect();
|
Dungeon.hero.resurrect();
|
||||||
level.drop(new LostBackpack(), invPos);
|
level.drop(new LostBackpack(), invPos);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user