diff options
author | syeyoung <cyougn06@naver.com> | 2022-01-12 00:00:32 +0900 |
---|---|---|
committer | syeyoung <cyougn06@naver.com> | 2022-01-12 00:00:32 +0900 |
commit | 2948cbdc1863d53438704b2497ce99abc754e3ea (patch) | |
tree | b0ee4695c56b653a89f34c1c6ee5f76d639186ae /src | |
parent | 97ad0ab478e7ab75ab8e78c9235961d2f2df6553 (diff) | |
download | Skyblock-Dungeons-Guide-2948cbdc1863d53438704b2497ce99abc754e3ea.tar.gz Skyblock-Dungeons-Guide-2948cbdc1863d53438704b2497ce99abc754e3ea.tar.bz2 Skyblock-Dungeons-Guide-2948cbdc1863d53438704b2497ce99abc754e3ea.zip |
- Fix time score going over 100
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonScore.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonScore.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonScore.java index 6f3189e6..533e3dfe 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonScore.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonScore.java @@ -274,12 +274,13 @@ public class FeatureDungeonScore extends TextHUDFeature { int time = 0; { int maxTime = context.getMaxSpeed(); - int timeSec = FeatureRegistry.DUNGEON_SBTIME.getTimeElapsed() / 1000; + int timeSec = FeatureRegistry.DUNGEON_SBTIME.getTimeElapsed() / 1000 - maxTime + 480; - if (timeSec <= maxTime) time = 100; - else if (timeSec <= maxTime+100) time = (int) Math.ceil(232 - 0.1 * timeSec); - else if (timeSec <= maxTime+500) time = (int) Math.ceil(161 - 0.05 * timeSec); - else if (timeSec < maxTime+2600) time = (int) Math.ceil(392/3.0 - (1/30.0) * timeSec); + if (timeSec <= 480) time = 100; + else if (timeSec <= 580) time = (int) Math.ceil(148 - 0.1 * timeSec); + else if (timeSec <= 980) time = (int) Math.ceil(119 - 0.05 * timeSec); + else if (timeSec < 3060) time = (int) Math.ceil(3102 - (1/30.0) * timeSec); + time = MathHelper.clamp_int(time, 0, 100); // just in case. } int bonus = 0; int tombs; |