Skip to content

Commit d11d20b

Browse files
Fix decay rate issues in Master Graded, close #1092
1 parent 288a6ba commit d11d20b

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

parts/eventsets/master_g.lua

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
1-
-- local regretDelay=-1
2-
-- local int_grade=0
3-
-- local grade_points=0
41
local _igb={0,1,2,3,4,5,5,6,6,7,7,7,8,8,8,9,9,9,10,11,12,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26}
52
local function getInternalGradeBoosts(internal_grade)
63
return _igb[MATH.clamp(internal_grade+1,1,#_igb)]
74
end
8-
-- local spd_lvl=0
9-
-- local cools=0
10-
-- local regrets=0
11-
-- local prevSectTime=0
12-
-- local isInRoll=false
13-
-- local rollGrades=0
5+
6+
local decayRate={125,80,80,50,45,45,45,40,40,40,40,40,30,30,30,20,20,20,20,20,15,15,15,15,15,15,15,15,15,15,10,10,10,9,9,9,8,8,8,7,7,7,6}
7+
148
local cool_time={3120,3120,2940,2700,2700,2520,2520,2280,2280,0}
159
local regret_time= {5400,4500,4500,4080,3600,3600,3000,3000,3000,3000}
1610
local function getGrav(l)
@@ -91,6 +85,7 @@ local function addGrade(D,row,cmb,lvl) -- IGS = internal grade system
9185
if D.grade_points>=100 then
9286
D.grade_points=0
9387
D.internal_grade=D.internal_grade+1
88+
D.decayTimer=0
9489
end
9590
end
9691
local function getRollGoal(D,isGreenLine)
@@ -294,6 +289,7 @@ return {
294289
D.target=100
295290
D.int_grade=0
296291
D.grade_points=0
292+
D.decayTimer=0
297293
D.rollGrades=0
298294
D.spd_lvl=0
299295
D.cools=0
@@ -304,8 +300,6 @@ return {
304300
D.prevDrop70=false
305301
D.nextSpeedUp=false
306302
D.coolList,D.regretList=TABLE.new(false,9),TABLE.new(false,10)
307-
local decayRate={125,80,80,50,45,45,45,40,40,40,40,40,30,30,30,20,20,20,20,20,15,15,15,15,15,15,15,15,15,15,10,10,10,9,9,9,8,8,8,7,7,7,6}
308-
local decayTimer=0
309303

310304
while true do
311305
coroutine.yield()
@@ -344,10 +338,10 @@ return {
344338
D.prevSectTime=P.stat.frame
345339
end
346340
end
347-
if P.waiting<=0 and D.grade_points>0 and not D.isInRoll then
348-
decayTimer=decayTimer+1
349-
if decayTimer>=decayRate[math.min(D.internal_grade+1,#decayRate)] then
350-
decayTimer=0
341+
if P.waiting<=0 and D.grade_points>0 and P.combo<1 and not D.isInRoll then
342+
D.decayTimer=D.decayTimer+1
343+
if D.decayTimer>=decayRate[math.min(D.internal_grade+1,#decayRate)] then
344+
D.decayTimer=0
351345
D.grade_points=D.grade_points-1
352346
end
353347
elseif D.isInRoll and P.stat.frame>=D.prevSectTime+3599 then

0 commit comments

Comments
 (0)