diff --git a/Themes/_fallback/Scripts/04 SpecialScoring.lua b/Themes/_fallback/Scripts/04 SpecialScoring.lua index 0cc2103a86..01203c2450 100644 --- a/Themes/_fallback/Scripts/04 SpecialScoring.lua +++ b/Themes/_fallback/Scripts/04 SpecialScoring.lua @@ -63,12 +63,11 @@ r['DDR Extreme'] = function(params, pss) local steps = GAMESTATE:GetCurrentSteps(params.Player); local radarValues = steps:GetRadarValues(params.Player); local baseScore = (steps:IsAnEdit() and - 5 or steps:GetMeter()) * 10000000; - if not Shared.CurrentStep then Shared.CurrentStep = -1 end; - Shared.CurrentStep = Shared.CurrentStep + 1; + 5 or steps:GetMeter()) * 1000000; + local currentStep = pss:GetJudgedSegments(); local totalItems = GetTotalItems(radarValues); local singleStep = (1 + totalItems) * totalItems / 2; - local stepLast = math.floor(baseScore / singleStep) * (Shared.CurrentStep + 1); + local stepLast = math.floor(baseScore / singleStep) * (currentStep); local judgeScore = 0; if (params.HoldNoteScore == 'HoldNoteScore_Held') then judgeScore = judgmentBase['TapNoteScore_W1']; diff --git a/src/PlayerStageStats.cpp b/src/PlayerStageStats.cpp index cbeddfa243..d1bfc6b822 100644 --- a/src/PlayerStageStats.cpp +++ b/src/PlayerStageStats.cpp @@ -41,6 +41,7 @@ void PlayerStageStats::Init() m_iCurScoreMultiplier = 1; m_iScore = 0; m_iMaxScore = 0; + m_iJudgedSegments = 0; m_iCurMaxScore = 0; m_iSongsPassed = 0; m_iSongsPlayed = 0; @@ -87,6 +88,7 @@ void PlayerStageStats::AddStats( const PlayerStageStats& other ) m_iCurMissCombo += other.m_iCurMissCombo; m_iScore += other.m_iScore; m_iMaxScore += other.m_iMaxScore; + m_iJudgedSegments += other.m_iJudgedSegments; m_iCurMaxScore += other.m_iCurMaxScore; m_radarPossible += other.m_radarPossible; m_radarActual += other.m_radarActual; @@ -328,6 +330,7 @@ void PlayerStageStats::ResetScoreForLesson() m_iScore = 0; m_iCurMaxScore = 0; m_iMaxScore = 0; + m_iJudgedSegments = 0; } void PlayerStageStats::SetLifeRecordAt( float fLife, float fStepsSecond ) @@ -679,6 +682,7 @@ public: DEFINE_METHOD( GetCurrentMissCombo, m_iCurMissCombo ) DEFINE_METHOD( GetCurrentScoreMultiplier, m_iCurScoreMultiplier ) DEFINE_METHOD( GetScore, m_iScore ) + DEFINE_METHOD( GetJudgedSegments, m_iJudgedSegments ) DEFINE_METHOD( GetTapNoteScores, m_iTapNoteScores[Enum::Check(L, 1)] ) DEFINE_METHOD( GetHoldNoteScores, m_iHoldNoteScores[Enum::Check(L, 1)] ) DEFINE_METHOD( FullCombo, FullCombo() ) @@ -735,6 +739,7 @@ public: ADD_METHOD( GetCurrentMissCombo ); ADD_METHOD( GetCurrentScoreMultiplier ); ADD_METHOD( GetScore ); + ADD_METHOD( GetJudgedSegments ); ADD_METHOD( GetTapNoteScores ); ADD_METHOD( GetHoldNoteScores ); ADD_METHOD( FullCombo ); diff --git a/src/PlayerStageStats.h b/src/PlayerStageStats.h index 3ca79504ab..a85c4e6aa2 100644 --- a/src/PlayerStageStats.h +++ b/src/PlayerStageStats.h @@ -51,14 +51,28 @@ public: int m_iPossibleGradePoints; int m_iTapNoteScores[NUM_TapNoteScore]; int m_iHoldNoteScores[NUM_HoldNoteScore]; + /** @brief The Player's current combo. */ int m_iCurCombo; + /** @brief The Player's max combo. */ int m_iMaxCombo; + /** @brief The Player's current miss combo. */ int m_iCurMissCombo; int m_iCurScoreMultiplier; int m_iScore; int m_iCurMaxScore; int m_iMaxScore; - RadarValues m_radarPossible; // filled in by ScreenGameplay on start of notes + + /** + * @brief How many rows/holds/rolls were judged? + * + * This is meant to be reset at the start of every song. */ + int m_iJudgedSegments; + + /** + * @brief The possible RadarValues for a song. + * + * This is filled in by ScreenGameplay on the start of the notes. */ + RadarValues m_radarPossible; RadarValues m_radarActual; /** @brief How many songs were passed by the Player? */ int m_iSongsPassed; @@ -83,18 +97,30 @@ public: struct Combo_t { - /* Start and size of this combo, in the same scale as the combo list - * mapping and the life record. */ - float m_fStartSecond, m_fSizeSeconds; + /** + * @brief The start time of the combo. + * + * This uses the same scale as the combo list mapping. */ + float m_fStartSecond; + /** + * @brief The size time of the combo. + * + * This uses the same scale as the life record. */ + float m_fSizeSeconds; - // Combo size, in steps. + /** @brief The size of the Combo, in steps. */ int m_cnt; - /* Size of the combo that didn't come from this stage (rollover from the - * last song). (This is a subset of cnt.) */ + /** + * @brief The size of the combo that didn't come from this stage. + * + * This is generally rolled over from the last song. + * It is also a subset of m_cnt. */ int m_rollover; - // Get the size of the combo that came from this song. + /** + * @brief Retrieve the size of the combo that came from this song. + * @return this song's combo size. */ int GetStageCnt() const { return m_cnt - m_rollover; } Combo_t(): m_fStartSecond(0), m_fSizeSeconds(0), m_cnt(0), m_rollover(0) { } diff --git a/src/ScoreKeeperNormal.cpp b/src/ScoreKeeperNormal.cpp index 7d3450ef4b..5530a8f50a 100644 --- a/src/ScoreKeeperNormal.cpp +++ b/src/ScoreKeeperNormal.cpp @@ -369,6 +369,7 @@ void ScoreKeeperNormal::AddScoreInternal( TapNoteScore score ) { int &iScore = m_pPlayerStageStats->m_iScore; int &iCurMaxScore = m_pPlayerStageStats->m_iCurMaxScore; + m_pPlayerStageStats->m_iJudgedSegments++; /* Regular scoring: