修复exp
This commit is contained in:
@@ -266,6 +266,7 @@ void TriggerLineClearEffect(const int* rows, int rowCount, int linesCleared);
|
|||||||
void PlayPendingLineClearEffect();
|
void PlayPendingLineClearEffect();
|
||||||
void TriggerCellClearEffect(const Point* cells, int cellCount, bool strongBurst);
|
void TriggerCellClearEffect(const Point* cells, int cellCount, bool strongBurst);
|
||||||
void AwardRogueSkillClearRewards(int clearedCells, int& scoreGain, int& expGain, bool allowLevelProgress);
|
void AwardRogueSkillClearRewards(int clearedCells, int& scoreGain, int& expGain, bool allowLevelProgress);
|
||||||
|
void CheckRogueLevelProgress();
|
||||||
void ApplyBoardGravity();
|
void ApplyBoardGravity();
|
||||||
int GetRogueFallInterval();
|
int GetRogueFallInterval();
|
||||||
int GetRoguePlayableHeight();
|
int GetRoguePlayableHeight();
|
||||||
|
|||||||
@@ -608,6 +608,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
if (!gameOverFlag)
|
if (!gameOverFlag)
|
||||||
{
|
{
|
||||||
DeleteLines();
|
DeleteLines();
|
||||||
|
CheckRogueLevelProgress();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -911,6 +912,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
if (!gameOverFlag)
|
if (!gameOverFlag)
|
||||||
{
|
{
|
||||||
DeleteLines();
|
DeleteLines();
|
||||||
|
CheckRogueLevelProgress();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -924,6 +926,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
if (!gameOverFlag)
|
if (!gameOverFlag)
|
||||||
{
|
{
|
||||||
DeleteLines();
|
DeleteLines();
|
||||||
|
CheckRogueLevelProgress();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'C':
|
case 'C':
|
||||||
|
|||||||
@@ -1152,6 +1152,10 @@ void TDrawScreen(HDC hdc, HWND hWnd)
|
|||||||
{
|
{
|
||||||
expFillRect.right = expFillRect.left;
|
expFillRect.right = expFillRect.left;
|
||||||
}
|
}
|
||||||
|
if (expFillRect.right > expBarRect.right)
|
||||||
|
{
|
||||||
|
expFillRect.right = expBarRect.right;
|
||||||
|
}
|
||||||
HBRUSH expFillBrush = CreateSolidBrush(accentColor);
|
HBRUSH expFillBrush = CreateSolidBrush(accentColor);
|
||||||
FillRect(hdc, &expFillRect, expFillBrush);
|
FillRect(hdc, &expFillRect, expFillBrush);
|
||||||
DeleteObject(expFillBrush);
|
DeleteObject(expFillBrush);
|
||||||
|
|||||||
@@ -1572,6 +1572,53 @@ void AwardRogueSkillClearRewards(int clearedCells, int& scoreGain, int& expGain,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CheckRogueLevelProgress()
|
||||||
|
{
|
||||||
|
if (currentMode != MODE_ROGUE || currentScreen != SCREEN_PLAYING)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int levelUps = ApplyLevelProgress(rogueStats);
|
||||||
|
if (levelUps <= 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
upgradeUiState.pendingCount += levelUps;
|
||||||
|
|
||||||
|
int shockwaveRows = 0;
|
||||||
|
if (rogueStats.evolutionImpactLevel > 0)
|
||||||
|
{
|
||||||
|
shockwaveRows = 3;
|
||||||
|
rogueStats.feverTicks = kFeverDurationTicks;
|
||||||
|
currentFallInterval = GetRogueFallInterval();
|
||||||
|
}
|
||||||
|
else if (rogueStats.upgradeShockwaveLevel > 0)
|
||||||
|
{
|
||||||
|
shockwaveRows = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (shockwaveRows > 0)
|
||||||
|
{
|
||||||
|
pendingUpgradeShockwaveRows = shockwaveRows;
|
||||||
|
pendingEvolutionImpactShockwave = rogueStats.evolutionImpactLevel > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
TCHAR feedbackTitle[64];
|
||||||
|
TCHAR feedbackDetail[128];
|
||||||
|
_stprintf_s(feedbackTitle, _T("灵感涌现 x%d"), levelUps);
|
||||||
|
_stprintf_s(
|
||||||
|
feedbackDetail,
|
||||||
|
_T("等级 Lv.%d EXP %d/%d 选择新的强化"),
|
||||||
|
rogueStats.level,
|
||||||
|
rogueStats.exp,
|
||||||
|
rogueStats.requiredExp);
|
||||||
|
SetFeedbackMessage(feedbackTitle, feedbackDetail, 10);
|
||||||
|
|
||||||
|
OpenUpgradeMenu();
|
||||||
|
}
|
||||||
|
|
||||||
void ApplyBoardGravity()
|
void ApplyBoardGravity()
|
||||||
{
|
{
|
||||||
int playableHeight = GetRoguePlayableHeight();
|
int playableHeight = GetRoguePlayableHeight();
|
||||||
|
|||||||
Reference in New Issue
Block a user