diff --git a/src/include/Tetris.h b/src/include/Tetris.h index 0d1b0ff..71c2b38 100644 --- a/src/include/Tetris.h +++ b/src/include/Tetris.h @@ -80,6 +80,8 @@ struct PlayerStats int evolutionImpactLevel; int controlMasterLevel; int holdSlowTicks; + int blockStormLevel; + int blockStormPiecesRemaining; int stableStructureLevel; int doubleGrowthLevel; int gamblerLevel; diff --git a/src/source/TetrisLogic.cpp b/src/source/TetrisLogic.cpp index cfd2a35..67fb7c3 100644 --- a/src/source/TetrisLogic.cpp +++ b/src/source/TetrisLogic.cpp @@ -62,7 +62,8 @@ enum UpgradeId UPGRADE_EXTREME_PLAYER = 30, UPGRADE_UPGRADE_SHOCKWAVE = 31, UPGRADE_EVOLUTION_IMPACT = 32, - UPGRADE_CONTROL_MASTER = 33 + UPGRADE_CONTROL_MASTER = 33, + UPGRADE_BLOCK_STORM = 34 }; static const UpgradeEntry kUpgradePool[] = @@ -97,6 +98,7 @@ static const UpgradeEntry kUpgradePool[] = { UPGRADE_UPGRADE_SHOCKWAVE, 1, 106, false, _T("\u5347\u7ea7\u51b2\u51fb\u6ce2"), _T("\u8fdb\u9636"), _T("\u5373\u5c06\u5347\u7ea7\u65f6\u81ea\u52a8\u6e05\u9664\u5e95\u90e8 2 \u884c\uff0c\u5f3a\u5316\u5347\u7ea7\u8282\u594f\u53cd\u9988\u3002") }, { UPGRADE_EVOLUTION_IMPACT, 1, 118, false, _T("\u8fdb\u5316\u51b2\u51fb"), _T("\u8fdb\u5316"), _T("\u5347\u7ea7\u65f6\u6e05\u9664\u5e95\u90e8 3 \u884c\uff0c\u5e76\u83b7\u5f97 10 \u79d2\u53cc\u500d EXP\u3002") }, { UPGRADE_CONTROL_MASTER, 1, 112, false, _T("\u64cd\u63a7\u5927\u5e08"), _T("\u8fdb\u5316"), _T("Hold \u540e\u77ed\u6682\u964d\u4f4e\u4e0b\u843d\u901f\u5ea6\uff0c\u5e76\u989d\u5916\u589e\u52a0 1 \u4e2a\u9884\u89c8\u65b9\u5757\u3002") }, + { UPGRADE_BLOCK_STORM, 1, 82, false, _T("\u65b9\u5757\u98ce\u66b4"), _T("\u723d\u611f"), _T("\u63a5\u4e0b\u6765 5 \u4e2a\u65b9\u5757\u5168\u90e8\u53d8\u6210 I \u5757\uff0c\u5feb\u901f\u5236\u9020\u56db\u6d88\u673a\u4f1a\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, 84, false, _T("\u6210\u957f\u6838\u5fc3"), _T("\u6210\u957f"), _T("\u6c38\u4e45\u83b7\u5f97 +15% \u5f97\u5206\u4e0e +15% EXP\uff0c\u53ea\u80fd\u9009\u62e9\u4e00\u6b21\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") }, @@ -283,6 +285,8 @@ static void ResetPlayerStats(PlayerStats& stats, bool useRogueRules) stats.evolutionImpactLevel = 0; stats.controlMasterLevel = 0; stats.holdSlowTicks = 0; + stats.blockStormLevel = 0; + stats.blockStormPiecesRemaining = 0; stats.stableStructureLevel = 0; stats.doubleGrowthLevel = 0; stats.gamblerLevel = 0; @@ -376,6 +380,8 @@ static int GetUpgradeCurrentLevel(int upgradeId) return rogueStats.evolutionImpactLevel; case UPGRADE_CONTROL_MASTER: return rogueStats.controlMasterLevel; + case UPGRADE_BLOCK_STORM: + return rogueStats.blockStormLevel; case UPGRADE_STABLE_STRUCTURE: return rogueStats.stableStructureLevel; case UPGRADE_DOUBLE_GROWTH: @@ -556,6 +562,12 @@ static int GetUpgradeDynamicWeight(const UpgradeEntry& entry) case UPGRADE_CONTROL_MASTER: weight += 34; break; + case UPGRADE_BLOCK_STORM: + if (rogueStats.tetrisGambleLevel > 0 || rogueStats.thunderTetrisLevel > 0) + { + weight += 20; + } + break; case UPGRADE_STABLE_STRUCTURE: if (boardIsDangerous) { @@ -907,6 +919,12 @@ static int TriggerChainBlast(int lineAnchor) static int RollNextPieceType() { + if (currentMode == MODE_ROGUE && rogueStats.blockStormPiecesRemaining > 0) + { + rogueStats.blockStormPiecesRemaining--; + return 0; + } + int weights[7] = { 100, 100, 100, 100, 100, 100, 100 }; if (currentMode == MODE_ROGUE) @@ -1341,6 +1359,13 @@ static void ApplyUpgradeById(int upgradeId, int targetPieceType, int applyCount) } rogueStats.previewUpgradeLevel = rogueStats.previewCount - 1; break; + case UPGRADE_BLOCK_STORM: + rogueStats.blockStormLevel = 1; + rogueStats.blockStormPiecesRemaining = 2; + nextTypes[0] = 0; + nextTypes[1] = 0; + nextTypes[2] = 0; + break; case UPGRADE_STABLE_STRUCTURE: rogueStats.stableStructureLevel += applyCount; break; diff --git a/src/source/TetrisRender.cpp b/src/source/TetrisRender.cpp index b602544..277bd7b 100644 --- a/src/source/TetrisRender.cpp +++ b/src/source/TetrisRender.cpp @@ -791,6 +791,13 @@ void TDrawScreen(HDC hdc, HWND hWnd) TextOut(hdc, combatRect.left + SS(18), combatRect.top + SS(754), controlText, lstrlen(controlText)); } + if (rogueStats.blockStormLevel > 0) + { + TCHAR stormText[96]; + _stprintf_s(stormText, _T("\u65b9\u5757\u98ce\u66b4 \u5269\u4f59 I \u5757 %d"), rogueStats.blockStormPiecesRemaining + 3); + TextOut(hdc, combatRect.left + SS(18), combatRect.top + SS(786), stormText, lstrlen(stormText)); + } + 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"))); @@ -969,6 +976,10 @@ void TDrawScreen(HDC hdc, HWND hWnd) { _stprintf_s(upgradeSummary + lstrlen(upgradeSummary), 512 - lstrlen(upgradeSummary), _T("\u64cd\u63a7\u5927\u5e08 Lv.1\r\n")); } + if (rogueStats.blockStormLevel > 0) + { + _stprintf_s(upgradeSummary + lstrlen(upgradeSummary), 512 - lstrlen(upgradeSummary), _T("\u65b9\u5757\u98ce\u66b4 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);