From 7c15d593f5f583fc819835f7c0265137beb9c270 Mon Sep 17 00:00:00 2001 From: syeyoung Date: Sat, 20 Feb 2021 01:23:37 +0900 Subject: button solver, some tweaks --- .../syeyoung/dungeonsguide/dungeon/DungeonContext.java | 13 ++++++++++++- .../dungeon/doorfinder/CatacombDataProvider.java | 17 +++++++++++++++++ .../dungeon/doorfinder/DungeonSpecificDataProvider.java | 2 ++ 3 files changed, 31 insertions(+), 1 deletion(-) (limited to 'src/main/java/kr/syeyoung/dungeonsguide/dungeon') diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonContext.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonContext.java index ee4ce4cc..6f162a5c 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonContext.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonContext.java @@ -56,6 +56,14 @@ public class DungeonContext { @Setter private BlockPos bossroomSpawnPos = null; + @Getter + @Setter + private boolean trapRoomGen = false; + + @Getter + @Setter + private boolean gotMimic = false; + @Getter @Setter private BossfightProcessor bossfightProcessor; @@ -66,7 +74,8 @@ public class DungeonContext { public DungeonContext(World world) { this.world = world; mapProcessor = new MapProcessor(this); - + DungeonSpecificDataProvider doorFinder = DungeonSpecificDataProviderRegistry.getDoorFinder(((SkyblockStatus) e.getDungeonsGuide().getSkyblockStatus()).getDungeonName()); + trapRoomGen = doorFinder.isTrapSpawn(e.getDungeonsGuide().getSkyblockStatus().getDungeonName()); } @@ -115,6 +124,8 @@ public class DungeonContext { if (dr != null) { dr.setTotalSecrets(secrets2); } + } else if (component.getFormattedText().contains("$DG-Mimic")) { + gotMimic = true; } } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/CatacombDataProvider.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/CatacombDataProvider.java index d39418bd..0c874458 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/CatacombDataProvider.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/CatacombDataProvider.java @@ -92,4 +92,21 @@ public class CatacombDataProvider implements DungeonSpecificDataProvider { } return null; } + + @Override + public boolean isTrapSpawn(String dungeonName) { + String floor = dungeonName.substring(14).trim(); + if (floor.equals("F3")) { + return true; + } else if (floor.equals("F4")) { + return true; + } else if (floor.equals("F5")) { + return true; + } else if (floor.equals("F6")) { + return true; + } else if (floor.equals("F7")) { + return true; + } + return false; + } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/DungeonSpecificDataProvider.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/DungeonSpecificDataProvider.java index 3103adf0..4cc0e677 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/DungeonSpecificDataProvider.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/doorfinder/DungeonSpecificDataProvider.java @@ -12,4 +12,6 @@ public interface DungeonSpecificDataProvider { Vector2d findDoorOffset(World w, String dungeonName); BossfightProcessor createBossfightProcessor(World w, String dungeonName); + + boolean isTrapSpawn(String dungeonName); } \ No newline at end of file -- cgit