From e10e2eed33e086eb40c8eb98f67eb7f775708cd7 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sun, 27 Nov 2011 21:53:57 -0600 Subject: [PATCH] small changes to scoring --- Themes/_fallback/Scripts/04 Scoring.lua | 30 +++++-------------------- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/Themes/_fallback/Scripts/04 Scoring.lua b/Themes/_fallback/Scripts/04 Scoring.lua index 8e96fb3aca..3130f08fb1 100644 --- a/Themes/_fallback/Scripts/04 Scoring.lua +++ b/Themes/_fallback/Scripts/04 Scoring.lua @@ -94,12 +94,7 @@ r['DDR Extreme'] = function(params, pss) -- [ja] 端数は最後の1ステップで加算するのでその値を取得 local sLast = baseScore - (sOne * sTotal); - local p; - if params.Player == 'PlayerNumber_P1' then - p = 1; - else - p = 2; - end; + local p = (params.Player == 'PlayerNumber_P1') and 1 or 2; -- [en] initialized when score is 0 -- [ja] スコアが0の時に初期化 if pss:GetScore() == 0 then @@ -159,12 +154,7 @@ r['Hybrid'] = function(params, pss) -- [ja] 端数は最後の1ステップで加算するのでその値を取得 local sLast = 100000000-(sOne*sTotal); - local p; - if params.Player=='PlayerNumber_P1' then - p=1; - else - p=2; - end; + local p = (params.Player == 'PlayerNumber_P1') and 1 or 2; -- [ja] スコアが0の時に初期化 if pss:GetScore()==0 then @@ -210,12 +200,7 @@ r['DDR SuperNOVA'] = function(params, pss) setmetatable(multLookup, ZeroIfNotFound); local radarValues = GetDirectRadar(params.Player); local totalItems = GetTotalItems(radarValues) - local p; - if params.Player == 'PlayerNumber_P1' then - p = 1; - else - p = 2; - end; + local p = (params.Player == 'PlayerNumber_P1') and 1 or 2; -- initialized when score is 0 -- [ja] スコアが0の時に初期化 @@ -239,7 +224,7 @@ r['DDR SuperNOVA'] = function(params, pss) end end; sntmp_Score[p] = sntmp_Score[p] + maxAdd; - + -- [ja] 踏み踏みしたステップ数 sntmp_Steps[p] = sntmp_Steps[p] + 1; -- [ja] 現時点での、All W1判定の時のスコア @@ -264,12 +249,7 @@ r['DDR SuperNOVA 2'] = function(params, pss) setmetatable(multLookup, ZeroIfNotFound); local radarValues = GetDirectRadar(params.Player); local totalItems = GetTotalItems(radarValues); - local p; - if params.Player=='PlayerNumber_P1' then - p=1; - else - p=2; - end; + local p = (params.Player == 'PlayerNumber_P1') and 1 or 2; -- [ja] スコアが0の時に初期化 if pss:GetScore()==0 then