aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonContext.java
diff options
context:
space:
mode:
authorsyeyoung <cyougn06@naver.com>2021-12-19 02:29:11 +0900
committersyeyoung <cyougn06@naver.com>2021-12-19 02:29:11 +0900
commit5fd8d7844b5a77f2a85c9a92aaea967dd2a8932d (patch)
treec12e07dc3dbc21516e44127b3be14b16203274c2 /src/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonContext.java
parent7b7d13ede25aa3022cfbd03763ca9ee82ca12656 (diff)
downloadSkyblock-Dungeons-Guide-5fd8d7844b5a77f2a85c9a92aaea967dd2a8932d.tar.gz
Skyblock-Dungeons-Guide-5fd8d7844b5a77f2a85c9a92aaea967dd2a8932d.tar.bz2
Skyblock-Dungeons-Guide-5fd8d7844b5a77f2a85c9a92aaea967dd2a8932d.zip
- Collect Score
- New Score Update
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonContext.java')
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonContext.java15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonContext.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonContext.java
index 026be921..c037ec78 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonContext.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonContext.java
@@ -88,6 +88,11 @@ public class DungeonContext {
private int latestTotalSecret = 0;
private int latestCrypts = 0;
+ @Getter
+ private int maxSpeed = 600;
+ @Getter
+ private double secretPercentage = 1.0;
+
public void setGotMimic(boolean gotMimic) {
this.gotMimic = gotMimic;
createEvent(new DungeonNodataEvent("MIMIC_KILLED"));
@@ -108,9 +113,12 @@ public class DungeonContext {
createEvent(new DungeonNodataEvent("DUNGEON_CONTEXT_CREATION"));
mapProcessor = new MapProcessor(this);
DungeonSpecificDataProvider doorFinder = DungeonSpecificDataProviderRegistry.getDoorFinder(DungeonsGuide.getDungeonsGuide().getSkyblockStatus().getDungeonName());
- if (doorFinder != null)
+ if (doorFinder != null) {
trapRoomGen = doorFinder.isTrapSpawn(DungeonsGuide.getDungeonsGuide().getSkyblockStatus().getDungeonName());
- else mapProcessor.setBugged(true);
+
+ secretPercentage = doorFinder.secretPercentage(DungeonsGuide.getDungeonsGuide().getSkyblockStatus().getDungeonName());
+ maxSpeed = doorFinder.speedSecond(DungeonsGuide.getDungeonsGuide().getSkyblockStatus().getDungeonName());
+ } else mapProcessor.setBugged(true);
init = System.currentTimeMillis();
}
@@ -162,6 +170,8 @@ public class DungeonContext {
}
}
+ @Getter
+ private boolean ended = false;
public void onChat(ClientChatReceivedEvent event) {
IChatComponent component = event.message;
String formatted = component.getFormattedText();
@@ -186,6 +196,7 @@ public class DungeonContext {
createEvent(new DungeonPuzzleFailureEvent(TextUtils.stripColor(formatted.split(" ")[2]), formatted));
} else if (formatted.contains("§6> §e§lEXTRA STATS §6<")) {
createEvent(new DungeonNodataEvent("DUNGEON_END"));
+ ended = true;
}
}
}