aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/dungeon
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/dungeon')
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionChangeState.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionChangeState.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionChangeState.java
index 08246c2a..0a897ddd 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionChangeState.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionChangeState.java
@@ -1,6 +1,7 @@
package kr.syeyoung.dungeonsguide.dungeon.actions;
import kr.syeyoung.dungeonsguide.dungeon.mechanics.DungeonMechanic;
+import kr.syeyoung.dungeonsguide.dungeon.mechanics.DungeonSecret;
import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom;
import lombok.Data;
import lombok.EqualsAndHashCode;
@@ -40,6 +41,8 @@ public class ActionChangeState extends AbstractAction{
DungeonMechanic mechanic = dungeonRoom.getDungeonRoomInfo().getMechanics().get(mechanicName);
if (mechanic== null)
return false;
+ if (mechanic instanceof DungeonSecret && ((DungeonSecret) mechanic).getSecretType() != DungeonSecret.SecretType.CHEST)
+ return true;
return mechanic.getCurrentState(dungeonRoom).equalsIgnoreCase(state);
}
}