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

Fix crit not always being 0.33 crit per luk but 0.3 in some cases #3252

Merged
merged 1 commit into from
Nov 23, 2023

Conversation

skyleo
Copy link
Contributor

@skyleo skyleo commented Nov 13, 2023

Pull Request Prelude

Changes Proposed

Always let 1 luk be 0.33 crit (meaning 3 luk = 1 crit) just like on officials.

Basically when luk changed due to status effects such as Gloria and other cases, the crit difference was calculated via 0.3 crit per luk instead of 0.33.

Also only adding the difference on top can result in edge cases where integer arithmetic will round down to less than one should get, to prevent this we remove the old luk from our current crit first and recalculate with the new luk.

Verified in pre-re 11.2 and re 14.0

Inspired by rathena/rathena#7938

Issues addressed: #3094

Basically when luk changed due to status effects such as Gloria and
other cases, the crit difference was calculated via 0.3 crit per luk
instead of 0.33.

Also only adding the difference on top can result in edge cases where
integer arithmetic will round down to less than one should get,
to prevent this we remove the old luk from our current crit first and
recalculate with the new luk.

Verified in pre-re 11.2 and re 14.0
@skyleo skyleo added type:bug Issue is a bug or describes an incorrect behavior that should be fixed component:mechanics Affecting the game mechanics in general labels Nov 13, 2023
@MishimaHaruna MishimaHaruna added this to the Release v2023.11 milestone Nov 19, 2023
@MishimaHaruna MishimaHaruna merged commit 5fc5e14 into HerculesWS:master Nov 23, 2023
240 of 255 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:mechanics Affecting the game mechanics in general type:bug Issue is a bug or describes an incorrect behavior that should be fixed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants