diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java index 3e7860bd6..cfa7b99c8 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java @@ -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) ) {