Changed toasty logic to trigger multiple times without requiring a W3.

This commit is contained in:
Kyzentun
2015-04-17 16:26:39 -06:00
parent fc6ce722ca
commit c50b12b8c6
2 changed files with 23 additions and 17 deletions
+19 -14
View File
@@ -515,8 +515,9 @@ void ScoreKeeperNormal::HandleTapRowScore( const NoteData &nd, int iRow )
{ {
case TNS_W1: case TNS_W1:
case TNS_W2: case TNS_W2:
m_iCurToastyCombo += iNumTapsInRow; // TODO: Come up with a design for the theme to list a set of milestone
// values? Current behavior is to just happen at multiples of
// m_ToastyTrigger. -Kyz
/* /*
// compile the list of toasty triggers // compile the list of toasty triggers
{ {
@@ -536,21 +537,25 @@ void ScoreKeeperNormal::HandleTapRowScore( const NoteData &nd, int iRow )
m_iNextToastyAt = -1; m_iNextToastyAt = -1;
} }
*/ */
if( m_iCurToastyCombo >= m_ToastyTrigger &&
m_iCurToastyCombo - iNumTapsInRow < m_ToastyTrigger &&
!GAMESTATE->m_bDemonstrationOrJukebox )
{ {
SCREENMAN->PostMessageToTopScreen( SM_PlayToasty, 0 ); int old_toastiness= m_iCurToastyCombo / m_ToastyTrigger;
Message msg("ToastyAchieved"); m_iCurToastyCombo += iNumTapsInRow;
msg.SetParam( "PlayerNumber", m_pPlayerState->m_PlayerNumber ); int new_toastiness= m_iCurToastyCombo / m_ToastyTrigger;
msg.SetParam( "ToastyCombo", m_iCurToastyCombo ); if(new_toastiness > old_toastiness &&
MESSAGEMAN->Broadcast(msg); !GAMESTATE->m_bDemonstrationOrJukebox)
{
SCREENMAN->PostMessageToTopScreen( SM_PlayToasty, 0 );
Message msg("ToastyAchieved");
msg.SetParam( "PlayerNumber", m_pPlayerState->m_PlayerNumber );
msg.SetParam( "ToastyCombo", m_iCurToastyCombo );
msg.SetParam( "Level", new_toastiness );
MESSAGEMAN->Broadcast(msg);
// TODO: keep a pointer to the Profile. Don't index with m_PlayerNumber // TODO: keep a pointer to the Profile. Don't index with m_PlayerNumber
PROFILEMAN->IncrementToastiesCount( m_pPlayerState->m_PlayerNumber ); PROFILEMAN->IncrementToastiesCount( m_pPlayerState->m_PlayerNumber );
//m_iCurToastyTrigger++; //m_iCurToastyTrigger++;
}
} }
break; break;
default: default:
+4 -3
View File
@@ -2874,10 +2874,11 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
} }
else if( SM == SM_PlayToasty ) else if( SM == SM_PlayToasty )
{ {
// todo: make multiple toasties work -aj
if( g_bEasterEggs ) if( g_bEasterEggs )
if( !m_Toasty.IsTransitioning() && !m_Toasty.IsFinished() ) // don't play if we've already played it once {
m_Toasty.StartTransitioning(); m_Toasty.Reset();
m_Toasty.StartTransitioning();
}
} }
else if( ScreenMessageHelpers::ScreenMessageToString(SM).find("0Combo") != string::npos ) else if( ScreenMessageHelpers::ScreenMessageToString(SM).find("0Combo") != string::npos )
{ {