add Radar Master scoring
This commit is contained in:
@@ -240,7 +240,7 @@ function UserPrefSpecialScoringMode()
|
|||||||
SelectType = "SelectOne";
|
SelectType = "SelectOne";
|
||||||
OneChoiceForAllPlayers = true;
|
OneChoiceForAllPlayers = true;
|
||||||
ExportOnChange = false;
|
ExportOnChange = false;
|
||||||
Choices = { 'DDR 1stMIX', 'DDR 4thMIX', 'DDR SuperNOVA', 'DDR SuperNOVA 2' };
|
Choices = { 'DDR 1stMIX', 'DDR 4thMIX', 'DDR SuperNOVA', 'DDR SuperNOVA 2', '[SSC] Radar Master' };
|
||||||
LoadSelections = function(self, list, pn)
|
LoadSelections = function(self, list, pn)
|
||||||
if ReadPrefFromFile("UserPrefSpecialScoringMode") ~= nil then
|
if ReadPrefFromFile("UserPrefSpecialScoringMode") ~= nil then
|
||||||
local theValue = ReadPrefFromFile("UserPrefSpecialScoringMode");
|
local theValue = ReadPrefFromFile("UserPrefSpecialScoringMode");
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ local ZeroIfNotFound = { __index = function() return 0 end; };
|
|||||||
--DDR 1st Mix and 2nd Mix Scoring
|
--DDR 1st Mix and 2nd Mix Scoring
|
||||||
-----------------------------------------------------------
|
-----------------------------------------------------------
|
||||||
r['DDR 1stMIX'] = function(params, pss)
|
r['DDR 1stMIX'] = function(params, pss)
|
||||||
local dCombo = math.floor(pss:GetCurrentCombo()/4);
|
local dCombo = math.floor((pss:GetCurrentCombo()+1)/4);
|
||||||
local bScore = (dCombo^2+1) * 100;
|
local bScore = (dCombo^2+1) * 100;
|
||||||
local multLookup = { ['TapNoteScore_W1']=3, ['TapNoteScore_W2']=3, ['TapNoteScore_W3']=1 };
|
local multLookup = { ['TapNoteScore_W1']=3, ['TapNoteScore_W2']=3, ['TapNoteScore_W3']=1 };
|
||||||
setmetatable(multLookup, ZeroIfNotFound);
|
setmetatable(multLookup, ZeroIfNotFound);
|
||||||
@@ -18,7 +18,7 @@ end;
|
|||||||
r['DDR 4thMIX'] = function(params, pss)
|
r['DDR 4thMIX'] = function(params, pss)
|
||||||
local scoreLookupTable = { ['TapNoteScore_W1']=777, ['TapNoteScore_W2']=777, ['TapNoteScore_W3']=555 };
|
local scoreLookupTable = { ['TapNoteScore_W1']=777, ['TapNoteScore_W2']=777, ['TapNoteScore_W3']=555 };
|
||||||
setmetatable(scoreLookupTable, ZeroIfNotFound);
|
setmetatable(scoreLookupTable, ZeroIfNotFound);
|
||||||
local comboBonusForThisStep = pss:GetCurrentCombo()*333;
|
local comboBonusForThisStep = (pss:GetCurrentCombo()+1)*333;
|
||||||
pss:SetScore(pss:GetScore()+scoreLookupTable[params.TapNoteScore]+comboBonusForThisStep);
|
pss:SetScore(pss:GetScore()+scoreLookupTable[params.TapNoteScore]+comboBonusForThisStep);
|
||||||
end;
|
end;
|
||||||
-----------------------------------------------------------
|
-----------------------------------------------------------
|
||||||
@@ -37,4 +37,31 @@ r['DDR SuperNOVA 2'] = function(params, pss)
|
|||||||
if dp == 0 then pss:SetScore(0) return nil end
|
if dp == 0 then pss:SetScore(0) return nil end
|
||||||
pss:SetScore(math.round((pss:GetActualDancePoints()/dp)*100000)*10);
|
pss:SetScore(math.round((pss:GetActualDancePoints()/dp)*100000)*10);
|
||||||
end;
|
end;
|
||||||
|
-----------------------------------------------------------
|
||||||
|
--Radar Master
|
||||||
|
-----------------------------------------------------------
|
||||||
|
r['[SSC] Radar Master'] = function(params, pss)
|
||||||
|
local masterTable = {
|
||||||
|
['RadarCategory_Stream'] = 0,
|
||||||
|
['RadarCategory_Voltage'] = 0,
|
||||||
|
['RadarCategory_Air'] = 0,
|
||||||
|
['RadarCategory_Freeze'] = 0,
|
||||||
|
['RadarCategory_Chaos'] = 0
|
||||||
|
};
|
||||||
|
local totalRadar = 0;
|
||||||
|
local finalScore = 0;
|
||||||
|
for k,v in ipairs(masterTable) do
|
||||||
|
local firstRadar = pss:GetRadarPossible():GetValue(k);
|
||||||
|
if firstRadar == 0 then
|
||||||
|
masterTable[k] = nil;
|
||||||
|
else
|
||||||
|
v = pss:GetRadarPossible():GetValue(k);
|
||||||
|
totalRadar = totalRadar + v[1];
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
for k,v in ipairs(masterTable) do
|
||||||
|
local curPortion = pss:GetRadarActual():GetValue(k) / v;
|
||||||
|
finalScore = finalScore + curPortion*(500000000*(v/totalRadar));
|
||||||
|
end;
|
||||||
|
end;
|
||||||
SpecialScoring = r;
|
SpecialScoring = r;
|
||||||
|
|||||||
Reference in New Issue
Block a user