reimplement beta 1's scoring mode in Lua

This commit is contained in:
Flameshadowxeroshin
2012-12-28 12:02:12 -06:00
parent e1b2222336
commit 825886729c
@@ -235,4 +235,28 @@ t[#t+1] = StandardDecorationFromFileOptional("BPMDisplay","BPMDisplay");
t[#t+1] = StandardDecorationFromFileOptional("StageDisplay","StageDisplay");
t[#t+1] = StandardDecorationFromFileOptional("SongTitle","SongTitle");
do
local pointLookup={
['TapNoteScore_W1']=5,
['TapNoteScore_W2']=4,
['TapNoteScore_W3']=3,
['TapNoteScore_W4']=2,
['TapNoteScore_W5']=1,
['TapNoteScore_HitMine']=-1}
local ignorableTapNoteScores = {
['TapNoteScore_HitMine']=true,
['TapNoteScore_AvoidMine']=true,
['TapNoteScore_CheckpointHit']=true,
['TapNoteScore_CheckpointMiss']=true
}
setmetatable(pointLookup,{__index=0})
t[#t+1] = {Class="Actor",
JudgmentMessageCommand=function(self,params)
local PSS = STATSMAN:GetCurStageStats():GetPlayerStageStats(params.Player)
local holdNoteInfo = params.HoldNoteScore == nil and nil or params.HoldNoteScore == 'HoldNoteScore_Held' and true or false
PSS:SetScore(PSS:GetScore()+pointLookup[params.TapNoteScore]+(holdNoteInfo and 5 or 0))
PSS:SetCurMaxScore(PSS:GetCurMaxScore()+(holdNoteInfo~=nil and 5 or 0)+(ignorableTapNoteScores[params.TapNoteScore] and 0 or 5))
end
}
end
return t