v1.4.0: hero now pauses before ascend/descend if there are enemies near

This commit is contained in:
Evan Debenham
2022-09-12 16:07:35 -04:00
parent 442aebeae8
commit 38f3ace6ca

View File

@@ -1478,7 +1478,7 @@ public class Hero extends Char {
} else if (heap != null
//moving to an item doesn't auto-pickup when enemies are near...
&& (visibleEnemies.size() == 0 || cell == pos ||
//...but only for standard heaps, chests and similar open as normal.
//...but only for standard heaps. Chests and similar open as normal.
(heap.type != Type.HEAP && heap.type != Type.FOR_SALE))) {
switch (heap.type) {
@@ -1499,6 +1499,8 @@ public class Hero extends Char {
curAction = new HeroAction.Unlock( cell );
} else if (Dungeon.level.getTransition(cell) != null
//moving to a transition doesn't automatically trigger it when enemies are near
&& (visibleEnemies.size() == 0 || cell == pos)
&& !Dungeon.level.locked
&& (Dungeon.depth < 26 || Dungeon.level.getTransition(cell).type == LevelTransition.Type.REGULAR_ENTRANCE) ) {