Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dungeon score calc slightly broken #958

Open
x-yingcan-x opened this issue Aug 25, 2024 · 7 comments
Open

Dungeon score calc slightly broken #958

x-yingcan-x opened this issue Aug 25, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@x-yingcan-x
Copy link
Contributor

What happened?

the accurate score is 314, but skyblocker says 321, i played many times, i think its caused by this, maybe wrong.

Screenshots

took from a normal run. ill pay at my own risk, dont ask
impossiblescore

Log output

latest.log

Minecraft Version

1.21.0/1.21.1

Skyblocker Version

skyblocker-1.22.0-alpha-pr-934-c6447b6+1.21.1

Additional context

No response

@x-yingcan-x x-yingcan-x added the bug Something isn't working label Aug 25, 2024
@Emirlol
Copy link
Collaborator

Emirlol commented Aug 25, 2024

Mimic kills can't be calculated twice, since it's either set to 0 or 2. There's no addition or anything like that. Secrets can't be calculated twice either, otherwise the gap would be much bigger than 7.
This is golden btw:

Party > [VIP+] Pqwq: [Skyblocker] 270 Score Reached! They call me 007, 0 secret found 0 room cleared 7 deaths.

That aside, perhaps DungeonScore#reset failed to be called on world change. We could call it on dungeon start to clear it again.

@x-yingcan-x x-yingcan-x changed the title Secrets and Mimic count TWICE Dungeon score calc slightly broken Aug 25, 2024
@x-yingcan-x
Copy link
Contributor Author

miss typed. secret->crypt, but still cant understand how this happens

btw whats ur ign(

@Emirlol
Copy link
Collaborator

Emirlol commented Aug 25, 2024

miss typed. secret->crypt, but still cant understand how this happens

Crypts are limited to 5 via a Math.max call between crypts count and 5, so this can't be it either.

btw whats ur ign(

It's Lumiafk, but idk why you would need that.

@x-yingcan-x
Copy link
Contributor Author

x-yingcan-x commented Aug 25, 2024

i took a look at the code, everything looks good, brain dead, bug caused by magic

btw its Math.min, Math.max -> Ultimate Wisdom VI, Pqwq is me, so i think i played with u.

@Emirlol
Copy link
Collaborator

Emirlol commented Aug 25, 2024

btw its Math.min

Yeah, I forgot what it was after I changed it to clamp on my branch and didn't think too much about it. This only goes to show how much more readable clamp is. I don't know what you mean with the rest of that sentence, though.

Also, how often does this happen? Like, can you reproduce it whenever you do a few runs in a row or is it up to luck?

@Khotul
Copy link

Khotul commented Sep 15, 2024

Had the same thing happen today. We had a person ready at the blood door, they entered as soon as my Skyblocker broadcast "300 score reached" in chat. We rushed the boss fight and our final score was 294.

270 Score broadcast was accurate (I believe) cause it was sent at the same time as another party member's Skytils did.

I assumed it's maybe some bug related to Paul, but at the time OP posted Paul wasn't a mayor.

I have death messages turned on and use default dungeon settings.

(I changed my score multiplier in settings to 0.9 afterwards cause my party members were a bit angry at me lmao)

@Emirlol
Copy link
Collaborator

Emirlol commented Oct 27, 2024

I think I found a possible reason as for why this might be happening:
image
Hypixel just broke and stopped updating tab info, but not scoreboard. This might be due to me being a spectator after dying, I'm not sure but it happened.

Scoreboard contains clear %, which is parsed and the completed room count is divided by it. 1/0.52 is just 1 when cast to an int, and this room count is used for skill score calculation like so:

80.0 * (getCompletedRooms() + getExtraCompletedRooms()) / totalRooms

Which becomes 3/1 and 240 extra score.

I'll clamp it to their max values, so while this might not be fixed it'll at least be alleviated a little.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants