diff options
author | syeyoung <cyong06@naver.com> | 2021-02-12 01:43:20 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-02-12 01:43:20 +0900 |
commit | 92c8d9cec9fcc3a53ad95ff0212d77bf87becab7 (patch) | |
tree | 269ec202ecc2426ff0d6d73fab95af1fea57042a /src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonDummy.java | |
parent | 89c82ad1fea9fd0a8e32a5e818c6c01856cdd660 (diff) | |
download | Skyblock-Dungeons-Guide-92c8d9cec9fcc3a53ad95ff0212d77bf87becab7.tar.gz Skyblock-Dungeons-Guide-92c8d9cec9fcc3a53ad95ff0212d77bf87becab7.tar.bz2 Skyblock-Dungeons-Guide-92c8d9cec9fcc3a53ad95ff0212d77bf87becab7.zip |
pathfinder go brrrr
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonDummy.java')
-rwxr-xr-x | src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonDummy.java | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonDummy.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonDummy.java index 6cd7238a..41e591c1 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonDummy.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/DungeonDummy.java @@ -1,10 +1,7 @@ package kr.syeyoung.dungeonsguide.dungeon.mechanics; import com.google.common.collect.Sets; -import kr.syeyoung.dungeonsguide.dungeon.actions.Action; -import kr.syeyoung.dungeonsguide.dungeon.actions.ActionChangeState; -import kr.syeyoung.dungeonsguide.dungeon.actions.ActionInteract; -import kr.syeyoung.dungeonsguide.dungeon.actions.ActionMove; +import kr.syeyoung.dungeonsguide.dungeon.actions.*; import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint; import kr.syeyoung.dungeonsguide.dungeon.mechanics.predicates.PredicateArmorStand; import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom; @@ -26,13 +23,17 @@ public class DungeonDummy implements DungeonMechanic { @Override public Set<Action> getAction(String state, DungeonRoom dungeonRoom) { - if (!"navigate".equalsIgnoreCase(state)) throw new IllegalArgumentException(state+" is not valid state for secret"); +// if (!"navigate".equalsIgnoreCase(state)) throw new IllegalArgumentException(state+" is not valid state for secret"); Set<Action> base; Set<Action> preRequisites = base = new HashSet<Action>(); - { + if (state.equalsIgnoreCase("navigate")){ ActionMove actionMove = new ActionMove(secretPoint); preRequisites.add(actionMove); preRequisites = actionMove.getPreRequisite(); + } else if (state.equalsIgnoreCase("click")) { + ActionClick actionMove = new ActionClick(secretPoint); + preRequisites.add(actionMove); + preRequisites = actionMove.getPreRequisite(); } { for (String str : preRequisite) { @@ -68,11 +69,11 @@ public class DungeonDummy implements DungeonMechanic { @Override public Set<String> getPossibleStates(DungeonRoom dungeonRoom) { - return Sets.newHashSet("navigate"); + return Sets.newHashSet("navigate", "click"); } @Override public Set<String> getTotalPossibleStates(DungeonRoom dungeonRoom) { - return Sets.newHashSet("no-state","navigate"); + return Sets.newHashSet("no-state","navigate,click"); } @Override public OffsetPoint getRepresentingPoint() { |