From d0821262d1c30d43e83cf968150fa7f5f1a30123 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Wed, 8 Jun 2011 12:38:36 -0500 Subject: [PATCH] add @waiei's changes to SuperNova2 scoring: http://twitpic.com/57wqss --- Themes/_fallback/Scripts/04 Scoring.lua | 40 +++++++++++++++++-------- 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/Themes/_fallback/Scripts/04 Scoring.lua b/Themes/_fallback/Scripts/04 Scoring.lua index 27a1d6155a..75b5733f1a 100644 --- a/Themes/_fallback/Scripts/04 Scoring.lua +++ b/Themes/_fallback/Scripts/04 Scoring.lua @@ -148,23 +148,39 @@ end; r['DDR SuperNOVA 2'] = function(params, pss) local multLookup = { - ['TapNoteScore_W1'] = 1, - ['TapNoteScore_W2'] = 1, - ['TapNoteScore_W3'] = 0.5 + ['TapNoteScore_W1'] = 10, + ['TapNoteScore_W2'] = 10, + ['TapNoteScore_W3'] = 5 }; setmetatable(multLookup, ZeroIfNotFound); local radarValues = GetDirectRadar(params.Player); - local totalItems = GetTotalItems(radarValues); - local base = 100000 / totalItems; - local hold = base * (params.HoldNoteScore == 'HoldNoteScore_Held' and 1 or 0); - local maxScore = (base * multLookup['TapNoteScore_W1']) + hold; - pss:SetCurMaxScore(pss:GetCurMaxScore() + (math.round(maxScore) * 10)); - local preW1 = base * multLookup[params.TapNoteScore]; - local buildScore = (preW1 - (IsW1Allowed(params.TapNoteScore) and 10 or 0)) + hold; - pss:SetScore(pss:GetScore() + (math.round(buildScore) * 10)); + local numLifts = radarValues:GetCategory('RadarCategory_Lifts') + local numFakes = radarValues:GetCategory('RadarCategory_Fakes') + local totalItems = GetTotalItems(radarValues) - (numLifts + numFakes); + + -- handle freezes + local maxAdd = 0 + if params.HoldNoteScore == 'HoldNoteScore_Held' then + maxAdd = 10 + else + if params.HoldNoteScore == 'HoldNoteScore_LetGo' then + maxAdd = 0 + else + maxAdd = multLookup[params.TapNoteScore] + if params.TapNoteScore == 'TapNoteScore_W2' then + pss:SetCurMaxScore( pss:GetCurMaxScore() + 1000000 ) + end + end + end + pss:SetCurMaxScore(pss:GetCurMaxScore() + maxAdd); + + local scoreDiv = pss:GetCurMaxScore() % 1000000 + local w2 = math.floor( pss:GetCurMaxScore()/1000000 ) + + pss:SetScore( math.floor( 1000*(scoreDiv/totalItems) * (1000 - (w2*100)) ) ); end; ----------------------------------------------------------- ---Radar Master (doesn't work in 1.2.1, disabled) +--Radar Master (doesn't work in sm-ssc 1.2.1, disabled) --don't try to "fix it up", either. you *cannot* make it work in 1.2.1. ----------------------------------------------------------- r['[SSC] Radar Master'] = function(params, pss)