implemented feature where failing a song causes you to receive 10 points for a perfect/marvelous, 5 per great.
NOTE: it still has a few bugs, some I have noticed: 1) getting a freeze arrow still nets in full (marvelous) points 2) score doesn't seem to update sometimes the points completely. Also may have implemented Toasty unlocks. (i added a line but it may or may not work)
This commit is contained in:
@@ -665,10 +665,10 @@ void Player::HandleTapRowScore( unsigned row )
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if(m_pPrimaryScoreKeeper)
|
if(m_pPrimaryScoreKeeper)
|
||||||
m_pPrimaryScoreKeeper->HandleTapRowScore(scoreOfLastTap, iNumTapsInRow );
|
m_pPrimaryScoreKeeper->HandleTapRowScore(scoreOfLastTap, iNumTapsInRow, m_pLifeMeter->FailedEarlier() );
|
||||||
|
|
||||||
if(m_pSecondaryScoreKeeper)
|
if(m_pSecondaryScoreKeeper)
|
||||||
m_pSecondaryScoreKeeper->HandleTapRowScore(scoreOfLastTap, iNumTapsInRow );
|
m_pSecondaryScoreKeeper->HandleTapRowScore(scoreOfLastTap, iNumTapsInRow, m_pLifeMeter->FailedEarlier() );
|
||||||
|
|
||||||
if (m_pScore)
|
if (m_pScore)
|
||||||
m_pScore->SetScore(GAMESTATE->m_CurStageStats.iScore[m_PlayerNumber]);
|
m_pScore->SetScore(GAMESTATE->m_CurStageStats.iScore[m_PlayerNumber]);
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public:
|
|||||||
|
|
||||||
virtual void OnNextSong( int iSongInCourseIndex, Notes* pNotes ) = 0; // before a song plays (called multiple times if course)
|
virtual void OnNextSong( int iSongInCourseIndex, Notes* pNotes ) = 0; // before a song plays (called multiple times if course)
|
||||||
|
|
||||||
virtual void HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow ) = 0;
|
virtual void HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow, bool failed) = 0;
|
||||||
virtual void HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tapScore ) = 0;
|
virtual void HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tapScore ) = 0;
|
||||||
|
|
||||||
virtual int TapNoteScoreToDancePoints( TapNoteScore tns ) = 0;
|
virtual int TapNoteScoreToDancePoints( TapNoteScore tns ) = 0;
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ static int GetScore(int p, int B, int S, int n)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScoreKeeperMAX2::AddScore( TapNoteScore score )
|
void ScoreKeeperMAX2::AddScore( TapNoteScore score, bool failed)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
http://www.aaroninjapan.com/ddr2.html
|
http://www.aaroninjapan.com/ddr2.html
|
||||||
@@ -197,14 +197,22 @@ void ScoreKeeperMAX2::AddScore( TapNoteScore score )
|
|||||||
int iScoreMultiplier = (m_iMaxPossiblePoints / (10*sum));
|
int iScoreMultiplier = (m_iMaxPossiblePoints / (10*sum));
|
||||||
ASSERT( iScoreMultiplier >= 0 );
|
ASSERT( iScoreMultiplier >= 0 );
|
||||||
|
|
||||||
m_iScore += GetScore(p, B, sum, m_iTapNotesHit);
|
if (failed)
|
||||||
|
switch( score )
|
||||||
|
{
|
||||||
|
case TNS_MARVELOUS: m_iScore += 10; break;
|
||||||
|
case TNS_PERFECT: m_iScore += MarvelousEnabled? 9:10; break;
|
||||||
|
case TNS_GREAT: m_iScore += 5; break;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
m_iScore += GetScore(p, B, sum, m_iTapNotesHit);
|
||||||
|
|
||||||
/* Subtract the maximum this step could have been worth from the bonus. */
|
/* Subtract the maximum this step could have been worth from the bonus. */
|
||||||
m_iPointBonus -= GetScore(10, B, sum, m_iTapNotesHit);
|
m_iPointBonus -= GetScore(10, B, sum, m_iTapNotesHit);
|
||||||
|
|
||||||
if ( m_iTapNotesHit == m_iNumTapsAndHolds && score >= TNS_PERFECT )
|
if ( m_iTapNotesHit == m_iNumTapsAndHolds && score >= TNS_PERFECT )
|
||||||
{
|
{
|
||||||
m_iScore += m_iPointBonus;
|
if (!failed) m_iScore += m_iPointBonus;
|
||||||
if ( m_bIsLastSongInCourse )
|
if ( m_bIsLastSongInCourse )
|
||||||
{
|
{
|
||||||
m_iScore += 100000000 - m_iMaxScoreSoFar;
|
m_iScore += 100000000 - m_iMaxScoreSoFar;
|
||||||
@@ -222,7 +230,7 @@ void ScoreKeeperMAX2::AddScore( TapNoteScore score )
|
|||||||
GAMESTATE->m_CurStageStats.iScore[m_PlayerNumber] = m_iScore;
|
GAMESTATE->m_CurStageStats.iScore[m_PlayerNumber] = m_iScore;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScoreKeeperMAX2::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow )
|
void ScoreKeeperMAX2::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow, bool failed )
|
||||||
{
|
{
|
||||||
ASSERT( iNumTapsInRow >= 1 );
|
ASSERT( iNumTapsInRow >= 1 );
|
||||||
|
|
||||||
@@ -267,7 +275,7 @@ void ScoreKeeperMAX2::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTa
|
|||||||
Note: if you got all Perfect on this song, you would get (p=10)*B, which is 80,000,000. In fact, the maximum possible
|
Note: if you got all Perfect on this song, you would get (p=10)*B, which is 80,000,000. In fact, the maximum possible
|
||||||
score for any song is the number of feet difficulty X 10,000,000.
|
score for any song is the number of feet difficulty X 10,000,000.
|
||||||
*/
|
*/
|
||||||
AddScore( scoreOfLastTap ); // only score once per row
|
AddScore( scoreOfLastTap, failed ); // only score once per row
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -292,6 +300,7 @@ void ScoreKeeperMAX2::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTa
|
|||||||
|
|
||||||
if( m_iCurToastyCombo==250 && !GAMESTATE->m_bDemonstrationOrJukebox )
|
if( m_iCurToastyCombo==250 && !GAMESTATE->m_bDemonstrationOrJukebox )
|
||||||
SCREENMAN->PostMessageToTopScreen( SM_PlayToasty, 0 );
|
SCREENMAN->PostMessageToTopScreen( SM_PlayToasty, 0 );
|
||||||
|
PREFSMAN->m_fTotalToastysSeen += 1;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
m_iCurToastyCombo = 0;
|
m_iCurToastyCombo = 0;
|
||||||
@@ -390,7 +399,7 @@ void ScoreKeeperMAX2::HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tap
|
|||||||
GAMESTATE->m_CurStageStats.iActualDancePoints[m_PlayerNumber] += HoldNoteScoreToDancePoints( holdScore );
|
GAMESTATE->m_CurStageStats.iActualDancePoints[m_PlayerNumber] += HoldNoteScoreToDancePoints( holdScore );
|
||||||
|
|
||||||
if( holdScore == HNS_OK )
|
if( holdScore == HNS_OK )
|
||||||
AddScore( TNS_MARVELOUS );
|
AddScore( TNS_MARVELOUS , false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -30,14 +30,14 @@ class ScoreKeeperMAX2: public ScoreKeeper
|
|||||||
|
|
||||||
const vector<Notes*>& apNotes;
|
const vector<Notes*>& apNotes;
|
||||||
|
|
||||||
void AddScore( TapNoteScore score );
|
void AddScore( TapNoteScore score, bool failed);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ScoreKeeperMAX2( const vector<Notes*>& apNotes, PlayerNumber pn);
|
ScoreKeeperMAX2( const vector<Notes*>& apNotes, PlayerNumber pn);
|
||||||
|
|
||||||
void OnNextSong( int iSongInCourseIndex, Notes* pNotes ); // before a song plays (called multiple times if course)
|
void OnNextSong( int iSongInCourseIndex, Notes* pNotes ); // before a song plays (called multiple times if course)
|
||||||
|
|
||||||
void HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow );
|
void HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow, bool failed );
|
||||||
void HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tapScore );
|
void HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tapScore );
|
||||||
|
|
||||||
int TapNoteScoreToDancePoints( TapNoteScore tns );
|
int TapNoteScoreToDancePoints( TapNoteScore tns );
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ void ScoreKeeperRave::OnNextSong( int iSongInCourseIndex, Notes* pNotes )
|
|||||||
|
|
||||||
#define CROSSED( val ) (fOld < val && fNew >= val)
|
#define CROSSED( val ) (fOld < val && fNew >= val)
|
||||||
#define CROSSED_ATTACK_LEVEL( level ) CROSSED(1.f/NUM_ATTACK_LEVELS*(level+1))
|
#define CROSSED_ATTACK_LEVEL( level ) CROSSED(1.f/NUM_ATTACK_LEVELS*(level+1))
|
||||||
void ScoreKeeperRave::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow )
|
void ScoreKeeperRave::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow, bool failed)
|
||||||
{
|
{
|
||||||
AttackLevel oldAL = (AttackLevel)(int)GAMESTATE->m_fSuperMeter[m_PlayerNumber];
|
AttackLevel oldAL = (AttackLevel)(int)GAMESTATE->m_fSuperMeter[m_PlayerNumber];
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ public:
|
|||||||
ScoreKeeperRave(PlayerNumber pn);
|
ScoreKeeperRave(PlayerNumber pn);
|
||||||
virtual void Update( float fDelta );
|
virtual void Update( float fDelta );
|
||||||
virtual void OnNextSong( int iSongInCourseIndex, Notes* pNotes ); // before a song plays (called multiple times if course)
|
virtual void OnNextSong( int iSongInCourseIndex, Notes* pNotes ); // before a song plays (called multiple times if course)
|
||||||
virtual void HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow );
|
virtual void HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow, bool failed);
|
||||||
virtual void HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tapScore );
|
virtual void HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tapScore );
|
||||||
virtual int TapNoteScoreToDancePoints( TapNoteScore tns ) { return 0; };
|
virtual int TapNoteScoreToDancePoints( TapNoteScore tns ) { return 0; };
|
||||||
virtual int HoldNoteScoreToDancePoints( HoldNoteScore hns ) { return 0; };
|
virtual int HoldNoteScoreToDancePoints( HoldNoteScore hns ) { return 0; };
|
||||||
|
|||||||
Reference in New Issue
Block a user