Fix MODIFY_DAMAGE for LR2 Hard Gauge for TotalNotes<1000 #628
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this affect?
This only matters for songs with <1000 notes.
Issue
In LR2 Hard Gauge, damage is increased when total notes < 1000.
This code is present in beatoraja, but there are some errors, so it does not currently work.
This means the LR2 dan gauge for courses currently does incorrect damage for songs with low note count.
Error 1
This is the current code. There is a mistake in this line:
It should be
&&
, not||
. Currently, because||
is used,fix2
is almost always a negative value, so this code will do nothing.Error 2
Suppose that we fixed the existing code by using
&&
instead:This is close to LR2 hard gauge's damage increase, but it is not exactly the same.
The existing code follows the notes written here: https://web.archive.org/web/20190210133959/http://2nd.geocities.jp/yoshi_65c816/bms/LR2.html
However, this rule is only correct for
125 <= totalnotes < 1000
.For
totalnotes < 125
, the rule changes.Correct Damage Algorithm (for totalnotes)
From extensive testing on LR2, I believe these are the correct calculations. Test data and explanations will be given below.
Note: Damage is also increased when TOTAL<240. But this code is not covered here. Final damage increase is a MAX of the two damage increases.
Default damage is 1.000x (for totalnotes>=1000).
Damage values:
For <20 notes, damage is exactly 10.0x (not more).
Final damage calculation formula (Python):
LR2 Damage Test Data and Explanations
All experiments were done in LR2, on a chart with TOTAL=240.
Below are the raw numbers from the test.
Note: the LR2 Gauge UI only displays remaining HP rounded down to the nearest multiple of 2.
84% <= hp < 86%
.Note 1
For
totalnotes<20
, BAD/空POOR judgement was tested.1<=totalnotes<=20
, BAD always does -60%, and 空POOR always does -20%. So the damage multiplier does not increase beyond 10.0x.Note 2
For
20<=totalnotes<=125
, because the numbers are subtle (1/65 and 1/15 especially), BAD/空POOR damage numbers were also tested and compared to the above algorithm. The damage numbers are consistent, so I believe 1/65 and 1/15 are correct.Note 3
I did some tests with TOTAL<240 charts too. I believe
max(fix1, fix2)
is correct.