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
+11 -6
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,15 +537,18 @@ void ScoreKeeperNormal::HandleTapRowScore( const NoteData &nd, int iRow )
m_iNextToastyAt = -1; m_iNextToastyAt = -1;
} }
*/ */
{
if( m_iCurToastyCombo >= m_ToastyTrigger && int old_toastiness= m_iCurToastyCombo / m_ToastyTrigger;
m_iCurToastyCombo - iNumTapsInRow < m_ToastyTrigger && m_iCurToastyCombo += iNumTapsInRow;
!GAMESTATE->m_bDemonstrationOrJukebox ) int new_toastiness= m_iCurToastyCombo / m_ToastyTrigger;
if(new_toastiness > old_toastiness &&
!GAMESTATE->m_bDemonstrationOrJukebox)
{ {
SCREENMAN->PostMessageToTopScreen( SM_PlayToasty, 0 ); SCREENMAN->PostMessageToTopScreen( SM_PlayToasty, 0 );
Message msg("ToastyAchieved"); Message msg("ToastyAchieved");
msg.SetParam( "PlayerNumber", m_pPlayerState->m_PlayerNumber ); msg.SetParam( "PlayerNumber", m_pPlayerState->m_PlayerNumber );
msg.SetParam( "ToastyCombo", m_iCurToastyCombo ); msg.SetParam( "ToastyCombo", m_iCurToastyCombo );
msg.SetParam( "Level", new_toastiness );
MESSAGEMAN->Broadcast(msg); 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
@@ -552,6 +556,7 @@ void ScoreKeeperNormal::HandleTapRowScore( const NoteData &nd, int iRow )
//m_iCurToastyTrigger++; //m_iCurToastyTrigger++;
} }
}
break; break;
default: default:
m_iCurToastyCombo = 0; m_iCurToastyCombo = 0;
+3 -2
View File
@@ -2874,11 +2874,12 @@ 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.Reset();
m_Toasty.StartTransitioning(); m_Toasty.StartTransitioning();
} }
}
else if( ScreenMessageHelpers::ScreenMessageToString(SM).find("0Combo") != string::npos ) else if( ScreenMessageHelpers::ScreenMessageToString(SM).find("0Combo") != string::npos )
{ {
int iCombo; int iCombo;