修复存在保留强化
This commit is contained in:
@@ -269,6 +269,7 @@ void SetFeedbackMessage(const TCHAR* title, const TCHAR* detail, int ticks);
|
|||||||
void OpenRulesScreen();
|
void OpenRulesScreen();
|
||||||
void OpenUpgradeMenu();
|
void OpenUpgradeMenu();
|
||||||
void ConfirmUpgradeSelection();
|
void ConfirmUpgradeSelection();
|
||||||
|
void ResetUpgradeUiState();
|
||||||
void HoldCurrentPiece();
|
void HoldCurrentPiece();
|
||||||
void UseScreenBomb();
|
void UseScreenBomb();
|
||||||
void UseBlackHole();
|
void UseBlackHole();
|
||||||
|
|||||||
@@ -855,12 +855,7 @@ void Restart()
|
|||||||
|
|
||||||
ResetPlayerStats(classicStats, false);
|
ResetPlayerStats(classicStats, false);
|
||||||
ResetPlayerStats(rogueStats, true);
|
ResetPlayerStats(rogueStats, true);
|
||||||
upgradeUiState.selectedIndex = 0;
|
ResetUpgradeUiState();
|
||||||
upgradeUiState.optionCount = 0;
|
|
||||||
upgradeUiState.pendingCount = 0;
|
|
||||||
upgradeUiState.totalChosenCount = 0;
|
|
||||||
upgradeUiState.picksRemaining = 0;
|
|
||||||
upgradeUiState.markedCount = 0;
|
|
||||||
feedbackState.visibleTicks = 0;
|
feedbackState.visibleTicks = 0;
|
||||||
feedbackState.title[0] = _T('\0');
|
feedbackState.title[0] = _T('\0');
|
||||||
feedbackState.detail[0] = _T('\0');
|
feedbackState.detail[0] = _T('\0');
|
||||||
|
|||||||
@@ -528,9 +528,7 @@ void ReturnToMainMenu()
|
|||||||
pendingLineClearEffectRowCount = 0;
|
pendingLineClearEffectRowCount = 0;
|
||||||
pendingLineClearEffectLineCount = 0;
|
pendingLineClearEffectLineCount = 0;
|
||||||
menuState.optionCount = 3;
|
menuState.optionCount = 3;
|
||||||
upgradeUiState.pendingCount = 0;
|
ResetUpgradeUiState();
|
||||||
upgradeUiState.picksRemaining = 0;
|
|
||||||
upgradeUiState.markedCount = 0;
|
|
||||||
|
|
||||||
if (menuState.selectedIndex < 0 || menuState.selectedIndex >= menuState.optionCount)
|
if (menuState.selectedIndex < 0 || menuState.selectedIndex >= menuState.optionCount)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2274,12 +2274,34 @@ void ResetPendingRogueVisualEvents()
|
|||||||
pendingEvolutionImpactShockwave = false;
|
pendingEvolutionImpactShockwave = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 清空升级选择界面的所有临时状态,避免跨局残留。
|
||||||
|
*/
|
||||||
|
void ResetUpgradeUiState()
|
||||||
|
{
|
||||||
|
upgradeUiState.selectedIndex = 0;
|
||||||
|
upgradeUiState.optionCount = 0;
|
||||||
|
upgradeUiState.pendingCount = 0;
|
||||||
|
upgradeUiState.totalChosenCount = 0;
|
||||||
|
upgradeUiState.picksRemaining = 0;
|
||||||
|
upgradeUiState.markedCount = 0;
|
||||||
|
for (int i = 0; i < 6; i++)
|
||||||
|
{
|
||||||
|
upgradeUiState.marked[i] = false;
|
||||||
|
upgradeUiState.options[i] = {};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 在 Rogue 模式中打开升级强化选择界面。
|
* @brief 在 Rogue 模式中打开升级强化选择界面。
|
||||||
*/
|
*/
|
||||||
void OpenUpgradeMenu()
|
void OpenUpgradeMenu()
|
||||||
{
|
{
|
||||||
if (currentMode != MODE_ROGUE || upgradeUiState.pendingCount <= 0)
|
if (currentMode != MODE_ROGUE ||
|
||||||
|
currentScreen != SCREEN_PLAYING ||
|
||||||
|
suspendFlag ||
|
||||||
|
gameOverFlag ||
|
||||||
|
upgradeUiState.pendingCount <= 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user