turn on the native scoring modes that exist

This commit is contained in:
Flameshadowxeroshin
2012-05-06 15:09:37 +00:00
parent dae0d0cdd8
commit 9628d03810
@@ -37,7 +37,7 @@ update mode: all are valid.
finalize mode: JudgementCommand invalid. finalize mode: JudgementCommand invalid.
This is designed to let you give score bonuses. This is designed to let you give score bonuses.
]] ]]
--[[
ScoringModes["Oldschool"]=function(judg,pss,player,mode) ScoringModes["Oldschool"]=function(judg,pss,player,mode)
local tscore = 0 local tscore = 0
local tmaxscore = 1000000000 local tmaxscore = 1000000000
@@ -65,8 +65,10 @@ ScoringModes["Oldschool"]=function(judg,pss,player,mode)
end end
ScoringModes['DDRMAX']=function(judge,pss,player,mode) ScoringModes['DDRMAX']=function(judge,pss,player,mode)
--If you know Japanese and English, and can translate these comments, please help.
--日本のコメントは、機械解釈されました。 あなたが彼らを人間を翻訳されたコメントと入れ替えるのを手伝うことができるならば、どうぞ。
--[en] in init mode, you start here. judge will be nil. --[en] in init mode, you start here. judge will be nil.
--[jp] --[jp] initモードで、あなたがここに出発すること。judgeが、nilです
local multLookup = { local multLookup = {
TapNoteScore_W1=10, TapNoteScore_W1=10,
TapNoteScore_W2=10, TapNoteScore_W2=10,
@@ -91,34 +93,32 @@ ScoringModes['DDRMAX']=function(judge,pss,player,mode)
local bestscore = 0 local bestscore = 0
local s = numNoteObjects<1 and 0 or ((numNoteObjects/2)*(1+numNoteObjects)) local s = numNoteObjects<1 and 0 or ((numNoteObjects/2)*(1+numNoteObjects))
--[en] coroutine.yield() acts somewhat like return, but when the function is run by UpdateScoreKeepers() it will start here. --[en] coroutine.yield() acts somewhat like return, but when the function is run by UpdateScoreKeepers() it will start here.
--[jp] xxx --[jp] coroutine.yield()はいくぶん「return」のようなふりをします、しかし、機能がUpdateScoreKeepers()に通されるとき、それはここで始まります。
judge,pss,player,mode = coroutine.yield() judge,pss,player,mode = coroutine.yield()
--[en] a while loop is only one way to make the mode selection system, but it's probably the easiest. --[en] a while loop is only one way to make the mode selection system, but it's probably the easiest.
--ideally, this would just be 'while mode=="update" do', with finalize stuff after it, --[jp]「while」ループはモード選択システムを行う1つの方法だけです、しかし、それは多分最も簡単でしょう。
--but I had written the code already when I thought of that.
--[jp] xxx
while true do while true do
--update mode code --update mode code
if mode == "update" then if mode == "update" then
--[en] this filters out holds and spurious judgments. DDRMAX ignores holds for scoring purposes. --[en] this filters out holds and spurious judgments. DDRMAX ignores holds for scoring purposes.
--[jp] xxx --[jp] これは、holdともっともらしい判断を除去します。 DDRMAXは、目的を記録するために、holdを無視します。
if (not notesToIgnore[judge.TapNoteScore]) and judge.HoldNoteScore==nil then if (not notesToIgnore[judge.TapNoteScore]) and judge.HoldNoteScore==nil then
curstep=curstep+1 curstep=curstep+1
if curstep>numNoteObjects then error "is bery bad" end if curstep>numNoteObjects then error "Got some things we shouldn't have" end
score=score+(pss:GetFailed() and 1 or (multLookup[judge.TapNoteScore]*math.floor(base/s)*curstep))+((curstep==numNoteObjects and pss:FullComboOfScore('TapNoteScore_W2')) and (10*(base-(math.floor(base/s)*numNoteObjects))) or 0) score=score+(pss:GetFailed() and 1 or (multLookup[judge.TapNoteScore]*math.floor(base/s)*curstep))+((curstep==numNoteObjects and pss:FullComboOfScore('TapNoteScore_W2')) and (10*(base-(math.floor(base/s)*numNoteObjects))) or 0)
bestscore = (curstep==numNoteObjects and 50000000 or bestscore+(10*math.floor(base/s)*curstep)) bestscore = (curstep==numNoteObjects and 50000000 or bestscore+(10*math.floor(base/s)*curstep))
end end
judge,pss,player,mode=coroutine.yield(score,bestscore) judge,pss,player,mode=coroutine.yield(score,bestscore)
end end
if mode == "finalize" then if mode == "finalize" then
--[en] this code would work, but SM5 behavior prevents it from doing anything. it should give the groove radar bonuses. --[en] this code isn't accurate, but it's good enough
--[jp] xyz --[jp] このコードは正確でありません、しかし、それは十分によいです
local actradar = pss:GetRadarActual() local actradar = pss:GetRadarActual()
local possradar = pss:GetRadarPossible() local possradar = pss:GetRadarPossible()
for k,v in pairs(radarCategoriesAndBonuses) do for k,v in pairs(radarCategoriesAndBonuses) do
local thispossradar=possradar:GetValue(k) local thispossradar=possradar:GetValue(k)
if thispossradar>0 then if thispossradar>0 then
score=score+math.floor((actradar:GetValue(k)/thispossradar)*thispossradar*v) score=score+math.floor((actradar:GetValue(k)/thispossradar)*(thispossradar*v))
bestscore=bestscore+(thispossradar*v) bestscore=bestscore+(thispossradar*v)
end end
end end
@@ -126,7 +126,7 @@ ScoringModes['DDRMAX']=function(judge,pss,player,mode)
end end
end end
return score,bestscore return score,bestscore
end]] end
for k,v in pairs(Scoring) do for k,v in pairs(Scoring) do
if ScoringModes[k] == nil then if ScoringModes[k] == nil then