Skip to content

Commit

Permalink
work on tune the burst jacks
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed May 14, 2020
1 parent 2f6b808 commit 0072aa5
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions src/Etterna/Globals/MinaCalc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -493,8 +493,7 @@ Calc::SequenceJack(const Finger& f, int track, int mode)
// you actually study debug output while tinkering with numbers, trust me
// you aren't that smart.


bool dbg = true && debugmode && mode == 0;
bool dbg = true && debugmode && mode == 1;
// the 4 -> 5 note jack difficulty spike is well known, we aim to reflect
// this phenomena as best as possible. 500, 50, 50, 50, 50 should end up
// significantly more difficult than 50, 50, 50, 50, 50
Expand All @@ -509,7 +508,7 @@ Calc::SequenceJack(const Finger& f, int track, int mode)
// stuff like mines immediately after shortjacks)
int window_size = 5;
if (mode == 1)
window_size = 3;
window_size = 2;
if (mode == 2)
window_size = 2;
vector<float> window_taps;
Expand Down Expand Up @@ -556,7 +555,7 @@ Calc::SequenceJack(const Finger& f, int track, int mode)
float comp_time = 0.f;
float hit_window_buffer = 260.f;
if (mode == 1)
hit_window_buffer = 115.f;
hit_window_buffer = 160.f;
if (mode == 2)
hit_window_buffer = 90.f;

Expand All @@ -576,12 +575,18 @@ Calc::SequenceJack(const Finger& f, int track, int mode)
// attempt to emulate this by calculating a real and effective
// bpm of each component of a jack sequence and then doing
// wizard magic with them for great justice

float buffer_drain = 0.f;
float base_ms = window_taps[i];
comp_time += window_taps[i];

//if (mode == 1) {
// buffer_drain = base_ms;
// hit_window_buffer =
// max(0.f, hit_window_buffer - buffer_drain);
//}

float eff_ms = comp_time + hit_window_buffer;

float buffer_drain = 0.f;
buffer_drain = base_ms;
hit_window_buffer = max(0.f, hit_window_buffer - buffer_drain);

Expand All @@ -600,6 +605,13 @@ Calc::SequenceJack(const Finger& f, int track, int mode)
comp_diff[i] = base_ms > 180.f ? 1.f
: eff_bpm / 15.f * finalscaler *
basescalers[Skill_JackSpeed];

if (mode == 1)
comp_diff[i] = base_ms > 180.f
? 1.f
: base_bpm / 15.f * finalscaler *
basescalers[Skill_JackSpeed];

eff_scalers[i] = eff_scaler;
if (dbg) {
std::cout << "\nseq component: " << i
Expand All @@ -620,7 +632,7 @@ Calc::SequenceJack(const Finger& f, int track, int mode)
else if (mode == 1)
// more burst oriented jacks, fuzzy math + intuition =
// incomprehensible mess
fdiff = comp_diff.back() * mean(eff_scalers) * 0.85f;
fdiff = comp_diff.back() * mean(eff_scalers) * 1.425f;
else if (mode == 2)
// minijacks, we want them to pop on this pass, thankfully,
// that's easy to accomplish
Expand Down

0 comments on commit 0072aa5

Please sign in to comment.