补充完美旋转、时间缓流和高压奖励强化

This commit is contained in:
2026-04-25 13:39:21 +08:00
parent 51650e223d
commit 86a3065ee2
3 changed files with 131 additions and 24 deletions
+3
View File
@@ -70,6 +70,9 @@ struct PlayerStats
int terminalClearLevel;
int dualChoiceLevel;
int destinyWheelLevel;
int perfectRotateLevel;
int timeDilationLevel;
int highPressureLevel;
int stableStructureLevel;
int doubleGrowthLevel;
int gamblerLevel;
+97 -20
View File
@@ -54,7 +54,10 @@ enum UpgradeId
UPGRADE_SCREEN_BOMB = 22,
UPGRADE_TERMINAL_CLEAR = 23,
UPGRADE_DUAL_CHOICE = 24,
UPGRADE_DESTINY_WHEEL = 25
UPGRADE_DESTINY_WHEEL = 25,
UPGRADE_PERFECT_ROTATE = 26,
UPGRADE_TIME_DILATION = 27,
UPGRADE_HIGH_PRESSURE = 28
};
static const UpgradeEntry kUpgradePool[] =
@@ -81,6 +84,9 @@ static const UpgradeEntry kUpgradePool[] =
{ UPGRADE_TERMINAL_CLEAR, 1, 108, false, _T("\u7ec8\u672b\u6e05\u573a"), _T("\u8fdb\u5316"), _T("\u6fc0\u6d3b\u6700\u540e\u4e00\u640f\u65f6\u81ea\u52a8\u91ca\u653e\u4e00\u6b21\u6e05\u5c4f\u70b8\u5f39\uff0c\u5e76\u8fdb\u5165 10 \u79d2\u72c2\u70ed\u3002") },
{ UPGRADE_DUAL_CHOICE, 1, 68, false, _T("\u53cc\u91cd\u9009\u62e9"), _T("\u8fdb\u9636"), _T("\u6bcf\u6b21\u5347\u7ea7\u53ef\u989d\u5916\u518d\u9009 1 \u4e2a\u5f3a\u5316\uff0c\u4f46\u4e0b\u4e00\u6b21\u5347\u7ea7\u9700\u6c42 +30%\u3002") },
{ UPGRADE_DESTINY_WHEEL, 1, 104, false, _T("\u547d\u8fd0\u8f6e\u76d8"), _T("\u8fdb\u5316"), _T("\u6bcf\u6b21\u5347\u7ea7\u51fa\u73b0 5 \u4e2a\u9009\u9879\uff0c\u53ef\u9009 2 \u4e2a\uff0c\u4f46\u5176\u4e2d 1 \u4e2a\u9644\u5e26\u8d1f\u9762\u6548\u679c\u3002") },
{ UPGRADE_PERFECT_ROTATE, 1, 82, false, _T("\u5b8c\u7f8e\u65cb\u8f6c"), _T("\u64cd\u4f5c"), _T("\u65cb\u8f6c\u5931\u8d25\u65f6\u81ea\u52a8\u5c1d\u8bd5\u5de6\u53f3\u5404\u504f\u79fb 1 \u683c\u8fdb\u884c\u4fee\u6b63\u3002") },
{ UPGRADE_TIME_DILATION, 1, 80, false, _T("\u65f6\u95f4\u7f13\u6d41"), _T("\u4fdd\u547d"), _T("\u76d8\u9762\u63a5\u8fd1\u9876\u7aef\u65f6\u81ea\u52a8\u964d\u4f4e\u4e0b\u843d\u901f\u5ea6\uff0c\u4e3a\u8865\u6551\u7559\u51fa\u53cd\u5e94\u7a7a\u95f4\u3002") },
{ UPGRADE_HIGH_PRESSURE, 1, 70, false, _T("\u9ad8\u538b\u5956\u52b1"), _T("\u98ce\u9669"), _T("\u4e0b\u843d\u901f\u5ea6\u63d0\u9ad8 15%\uff0c\u4f46\u5f97\u5206\u4e0e EXP \u989d\u5916\u63d0\u9ad8 50%\u3002") },
{ UPGRADE_STABLE_STRUCTURE, -1, 72, true, _T("\u7a33\u5b9a\u7ed3\u6784"), _T("\u7279\u6b8a"), _T("\u843d\u5730\u540e\u5c0f\u6982\u7387\u81ea\u52a8\u586b\u8865\u90bb\u8fd1\u7a7a\u6d1e\uff0c\u63d0\u9ad8\u76d8\u9762\u7ed3\u6784\u7a33\u5b9a\u6027\u3002") },
{ UPGRADE_DOUBLE_GROWTH, -1, 86, true, _T("\u53cc\u500d\u6210\u957f"), _T("\u7279\u6b8a"), _T("\u989d\u5916\u63d0\u9ad8\u6d88\u884c\u5f97\u5206\u4e0e EXP \u6536\u76ca\uff0c\u6bcf\u5c42\u518d\u8ffd\u52a0 15%\u3002") },
{ UPGRADE_PIECE_TUNING, -1, 64, true, _T("\u65b9\u5757\u6539\u9020"), _T("\u7279\u6b8a"), _T("\u9009\u62e9\u4e00\u79cd\u65b9\u5757\uff0c\u964d\u4f4e\u5176\u540e\u7eed\u51fa\u73b0\u6982\u7387\u3002") },
@@ -257,6 +263,9 @@ static void ResetPlayerStats(PlayerStats& stats, bool useRogueRules)
stats.terminalClearLevel = 0;
stats.dualChoiceLevel = 0;
stats.destinyWheelLevel = 0;
stats.perfectRotateLevel = 0;
stats.timeDilationLevel = 0;
stats.highPressureLevel = 0;
stats.stableStructureLevel = 0;
stats.doubleGrowthLevel = 0;
stats.gamblerLevel = 0;
@@ -334,6 +343,12 @@ static int GetUpgradeCurrentLevel(int upgradeId)
return rogueStats.dualChoiceLevel;
case UPGRADE_DESTINY_WHEEL:
return rogueStats.destinyWheelLevel;
case UPGRADE_PERFECT_ROTATE:
return rogueStats.perfectRotateLevel;
case UPGRADE_TIME_DILATION:
return rogueStats.timeDilationLevel;
case UPGRADE_HIGH_PRESSURE:
return rogueStats.highPressureLevel;
case UPGRADE_STABLE_STRUCTURE:
return rogueStats.stableStructureLevel;
case UPGRADE_DOUBLE_GROWTH:
@@ -478,6 +493,24 @@ static int GetUpgradeDynamicWeight(const UpgradeEntry& entry)
case UPGRADE_DESTINY_WHEEL:
weight += 30;
break;
case UPGRADE_PERFECT_ROTATE:
if (rogueStats.holdUnlocked == 0 || boardIsDangerous)
{
weight += 14;
}
break;
case UPGRADE_TIME_DILATION:
if (boardIsDangerous)
{
weight += 24;
}
break;
case UPGRADE_HIGH_PRESSURE:
if (boardIsStable && rogueStats.level >= 3)
{
weight += 18;
}
break;
case UPGRADE_STABLE_STRUCTURE:
if (boardIsDangerous)
{
@@ -1045,10 +1078,31 @@ static void FillUpgradeOptions()
static int GetRogueFallInterval()
{
int baseInterval = 500 + rogueStats.slowFallStacks * 80;
if (rogueStats.highPressureLevel > 0)
{
baseInterval = baseInterval * 85 / 100;
}
if (rogueStats.timeDilationLevel > 0)
{
int topOccupiedRow = GetTopOccupiedRow();
if (topOccupiedRow >= 0 && topOccupiedRow <= 5)
{
baseInterval += 180;
}
}
if (currentMode == MODE_ROGUE && rogueStats.feverTicks > 0)
{
baseInterval += 120;
}
if (baseInterval < 120)
{
baseInterval = 120;
}
return baseInterval;
}
@@ -1153,6 +1207,19 @@ static void ApplyUpgradeById(int upgradeId, int targetPieceType, int applyCount)
case UPGRADE_DESTINY_WHEEL:
rogueStats.destinyWheelLevel = 1;
break;
case UPGRADE_PERFECT_ROTATE:
rogueStats.perfectRotateLevel = 1;
break;
case UPGRADE_TIME_DILATION:
rogueStats.timeDilationLevel = 1;
currentFallInterval = GetRogueFallInterval();
break;
case UPGRADE_HIGH_PRESSURE:
rogueStats.highPressureLevel = 1;
rogueStats.scoreMultiplierPercent += 50;
rogueStats.expMultiplierPercent += 50;
currentFallInterval = GetRogueFallInterval();
break;
case UPGRADE_STABLE_STRUCTURE:
rogueStats.stableStructureLevel += applyCount;
break;
@@ -1438,6 +1505,8 @@ static void ApplyLineClearResult(int linesCleared)
{
OpenUpgradeMenu();
}
currentFallInterval = GetRogueFallInterval();
}
static void ApplyDestinyCurse()
@@ -1571,6 +1640,13 @@ bool CanMoveRight()
return true;
}
static bool TryRotateWithOffset(int nextState, int offsetX)
{
Point rotatedPoint = point;
rotatedPoint.x += offsetX;
return IsPiecePlacementValid(type, nextState, rotatedPoint);
}
/**
* @brief 将当前活动方块向下移动一格。
*
@@ -1616,32 +1692,27 @@ void MoveRight()
*/
void Rotate()
{
int oldState = state;
state = (state + 1) % 4;
for (int i = 0; i < 4; i++)
int nextState = (state + 1) % 4;
if (IsPiecePlacementValid(type, nextState, point))
{
for (int j = 0; j < 4; j++)
{
if (bricks[type][state][i][j] != 0)
{
int checkY = point.y + i;
int checkX = point.x + j;
// 旋转后若越界,则恢复原状态
if (checkX < 0 || checkX >= nGameWidth || checkY >= nGameHeight)
{
state = oldState;
state = nextState;
return;
}
// 旋转后若与固定方块重叠,则恢复原状态
if (checkY >= 0 && workRegion[checkY][checkX] != 0)
if (currentMode == MODE_ROGUE && rogueStats.perfectRotateLevel > 0)
{
state = oldState;
if (TryRotateWithOffset(nextState, -1))
{
state = nextState;
point.x--;
return;
}
}
if (TryRotateWithOffset(nextState, 1))
{
state = nextState;
point.x++;
return;
}
}
}
@@ -1812,6 +1883,11 @@ void Fixing()
SetFeedbackMessage(_T("\u7a33\u5b9a\u7ed3\u6784\u751f\u6548"), _T("\u81ea\u52a8\u586b\u8865\u4e86\u4e00\u4e2a\u90bb\u8fd1\u7a7a\u6d1e\u3002"), 10);
}
if (currentMode == MODE_ROGUE)
{
currentFallInterval = GetRogueFallInterval();
}
// 生成下一个活动方块
type = ConsumeNextType();
nType = nextTypes[0];
@@ -2227,5 +2303,6 @@ void UseScreenBomb()
scoreGain);
SetFeedbackMessage(_T("\u4e3b\u52a8\u91ca\u653e\u6e05\u5c4f\u70b8\u5f39"), detail, 12);
currentFallInterval = GetRogueFallInterval();
ComputeTarget();
}
+27
View File
@@ -757,6 +757,21 @@ void TDrawScreen(HDC hdc, HWND hWnd)
TextOut(hdc, combatRect.left + SS(18), combatRect.top + SS(562), _T("\u7ec8\u672b\u6e05\u573a \u6fc0\u6d3b\u6700\u540e\u4e00\u640f\u65f6\u81ea\u52a8\u89e6\u53d1"), lstrlen(_T("\u7ec8\u672b\u6e05\u573a \u6fc0\u6d3b\u6700\u540e\u4e00\u640f\u65f6\u81ea\u52a8\u89e6\u53d1")));
}
if (rogueStats.perfectRotateLevel > 0)
{
TextOut(hdc, combatRect.left + SS(18), combatRect.top + SS(594), _T("\u5b8c\u7f8e\u65cb\u8f6c \u65cb\u8f6c\u5931\u8d25\u65f6\u81ea\u52a8\u4fee\u6b63"), lstrlen(_T("\u5b8c\u7f8e\u65cb\u8f6c \u65cb\u8f6c\u5931\u8d25\u65f6\u81ea\u52a8\u4fee\u6b63")));
}
if (rogueStats.timeDilationLevel > 0)
{
TextOut(hdc, combatRect.left + SS(18), combatRect.top + SS(626), _T("\u65f6\u95f4\u7f13\u6d41 \u76d8\u9762\u8fc7\u9ad8\u65f6\u81ea\u52a8\u51cf\u901f"), lstrlen(_T("\u65f6\u95f4\u7f13\u6d41 \u76d8\u9762\u8fc7\u9ad8\u65f6\u81ea\u52a8\u51cf\u901f")));
}
if (rogueStats.highPressureLevel > 0)
{
TextOut(hdc, combatRect.left + SS(18), combatRect.top + SS(658), _T("\u9ad8\u538b\u5956\u52b1 \u901f\u5ea6\u66f4\u5feb\uff0c\u5f97\u5206 / EXP x1.5"), lstrlen(_T("\u9ad8\u538b\u5956\u52b1 \u901f\u5ea6\u66f4\u5feb\uff0c\u5f97\u5206 / EXP x1.5")));
}
if (rogueStats.chainBlastLevel > 0)
{
TextOut(hdc, combatRect.left + SS(18), combatRect.top + SS(274), _T("\u8fde\u9501\u7206\u7834 \u5df2\u89e3\u9501"), lstrlen(_T("\u8fde\u9501\u7206\u7834 \u5df2\u89e3\u9501")));
@@ -903,6 +918,18 @@ void TDrawScreen(HDC hdc, HWND hWnd)
{
_stprintf_s(upgradeSummary + lstrlen(upgradeSummary), 512 - lstrlen(upgradeSummary), _T("\u7ec8\u672b\u6e05\u573a Lv.1\r\n"));
}
if (rogueStats.perfectRotateLevel > 0)
{
_stprintf_s(upgradeSummary + lstrlen(upgradeSummary), 512 - lstrlen(upgradeSummary), _T("\u5b8c\u7f8e\u65cb\u8f6c Lv.1\r\n"));
}
if (rogueStats.timeDilationLevel > 0)
{
_stprintf_s(upgradeSummary + lstrlen(upgradeSummary), 512 - lstrlen(upgradeSummary), _T("\u65f6\u95f4\u7f13\u6d41 Lv.1\r\n"));
}
if (rogueStats.highPressureLevel > 0)
{
_stprintf_s(upgradeSummary + lstrlen(upgradeSummary), 512 - lstrlen(upgradeSummary), _T("\u9ad8\u538b\u5956\u52b1 Lv.1\r\n"));
}
if (rogueStats.stableStructureLevel > 0)
{
_stprintf_s(upgradeSummary + lstrlen(upgradeSummary), 512 - lstrlen(upgradeSummary), _T("\u7a33\u5b9a\u7ed3\u6784 Lv.%d\r\n"), rogueStats.stableStructureLevel);