Skip to content

Commit

Permalink
Update GaugeIncrementsAsm.cpp
Browse files Browse the repository at this point in the history
Fixed hard gauge's behavior to accurately reflect how LR2 behaves by adding additional checks for when the gauge goes below 32 and if the total is at a certain value.

The changes made are based on exch-bms2/beatoraja#628
  • Loading branch information
veliusiidx authored Jan 4, 2023
1 parent 0003589 commit 3b34695
Showing 1 changed file with 84 additions and 18 deletions.
102 changes: 84 additions & 18 deletions LR2GAS/GaugeIncrementsAsm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,37 +365,93 @@ void GetIncrements::HookIncrements()

double GetIncrements::Total()
{
if (notesNum < 20)

double f1;
double f2;

if (magicNumber >= 240)
{
f1 = 1.0;
}
else if (magicNumber >= 230)
{
f1 = 1.11;
}
else if (magicNumber >= 210)
{
f1 = 1.25;
}
else if (magicNumber >= 200)
{
f1 = 1.5;
}
else if (magicNumber >= 180)
{
f1 = 1.666;
}
else if (magicNumber >= 160)
{
f1 = 2.0;
}
else if (magicNumber >= 150)
{
return 10.0;
f1 = 2.5;
}
if (notesNum < 30)
else if (magicNumber >= 130)
{
return 14.0 - (notesNum / 5.0);
f1 = 3.333;
}
if (notesNum < 60)
else if (magicNumber >= 120)
{
return 9.0 - (notesNum / 15.0);
f1 = 5.0;
}
if (notesNum < 125)
else
{
f1 = 10.0;
}


if (notesNum <= 20)
{
return 5.0 - ((notesNum - 60.0) / 65.0);
f2 = 10.0;
}
if (notesNum < 250)
else if (notesNum < 30)
{
return 5.0 - (notesNum / 125.0);
f2 = 14.0 - (notesNum / 5.0);
}
if (notesNum < 500)
else if (notesNum < 60)
{
return 4.0 - (notesNum / 250.0);
f2 = 9.0 - (notesNum / 15.0);
}
if (notesNum < 1000)
else if (notesNum < 125)
{
return 3.0 - (notesNum / 500.0);
f2 = 5.0 - ((notesNum - 60.0) / 65.0);
}
return 1;
else if (notesNum < 250)
{
f2 = 5.0 - (notesNum / 125.0);
}
else if (notesNum < 500)
{
f2 = 4.0 - (notesNum / 250.0);
}
else if (notesNum < 1000)
{
f2 = 3.0 - (notesNum / 500.0);
}
else
{
f2 = 1.0;
}

if (f1 > f2)
{
return f1;
}
return f2;
}


GaugeIncrements GetIncrements::Easy()
{
constexpr double easyConst = 1.2;
Expand Down Expand Up @@ -432,9 +488,19 @@ GaugeIncrements GetIncrements::Hard()
result.pgreat = 0.1;
result.great = 0.1;
result.good = 0.05;
result.mashPoor = total * -2.0;
result.bad = total * -6.0;
result.missPoor = total * -10.0;

if (*hkGauge < 32)
{
result.mashPoor = (total * -2.0) * 0.6;
result.bad = (total * -6.0) * 0.6;
result.missPoor = (total * -10.0) * 0.6;
}
else
{
result.mashPoor = total * -2.0;
result.bad = total * -6.0;
result.missPoor = total * -10.0;
}
return result;
}

0 comments on commit 3b34695

Please sign in to comment.