diff options
author | syeyoung <cyougn06@naver.com> | 2022-01-12 22:17:02 +0900 |
---|---|---|
committer | syeyoung <cyougn06@naver.com> | 2022-01-12 22:17:02 +0900 |
commit | 945eb217de8e304168a0a35b8c5e1011f1f7799a (patch) | |
tree | d78c3f511dc6cdec94814cd1c90572f087dbcc95 /src/main/java/kr/syeyoung/dungeonsguide/features | |
parent | 4cc2746d8c26dc9cf2b9cccdc7aaa51ceaa8c07c (diff) | |
download | Skyblock-Dungeons-Guide-945eb217de8e304168a0a35b8c5e1011f1f7799a.tar.gz Skyblock-Dungeons-Guide-945eb217de8e304168a0a35b8c5e1011f1f7799a.tar.bz2 Skyblock-Dungeons-Guide-945eb217de8e304168a0a35b8c5e1011f1f7799a.zip |
- Fix Timescore approximation with data
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features')
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonScore.java | 16 |
1 files changed, 9 insertions, 7 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 533e3dfe..f10d7262 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 @@ -35,6 +35,7 @@ import kr.syeyoung.dungeonsguide.stomp.StompMessageHandler; import kr.syeyoung.dungeonsguide.stomp.StompPayload; import kr.syeyoung.dungeonsguide.stomp.StompSubscription; import kr.syeyoung.dungeonsguide.utils.TextUtils; +import kr.syeyoung.dungeonsguide.utils.TimeScoreUtil; import kr.syeyoung.dungeonsguide.wsresource.StaticResource; import kr.syeyoung.dungeonsguide.wsresource.StaticResourceCache; import lombok.AllArgsConstructor; @@ -274,13 +275,14 @@ public class FeatureDungeonScore extends TextHUDFeature { int time = 0; { int maxTime = context.getMaxSpeed(); - int timeSec = FeatureRegistry.DUNGEON_SBTIME.getTimeElapsed() / 1000 - maxTime + 480; - - 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 timeSec = FeatureRegistry.DUNGEON_SBTIME.getTimeElapsed() / 1000 - maxTime + 480; +// +// 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. + time = TimeScoreUtil.estimate(FeatureRegistry.DUNGEON_SBTIME.getTimeElapsed(), maxTime); } int bonus = 0; int tombs; |