This commit is contained in:
2026-04-26 10:33:37 +08:00
parent 59fbdd18c2
commit 69379b43a3
4 changed files with 124 additions and 42 deletions
+68
View File
@@ -96,6 +96,7 @@ static constexpr int kMaxRogueLockedRows = 4;
static constexpr int kDifficultyLevelsPerLockedRow = 3;
static int GetUpgradeCurrentLevel(int upgradeId);
static bool IsUpgradePrerequisiteConsumed(int upgradeId);
static int GetUpgradeDynamicWeight(const UpgradeEntry& entry);
static const TCHAR* GetPieceShortName(int pieceType);
static bool IsUpgradeSelectable(const UpgradeEntry& entry);
@@ -309,6 +310,68 @@ static int GetUpgradeCurrentLevel(int upgradeId)
}
}
const TCHAR* GetUpgradeSynthesisPath(int upgradeId)
{
switch (upgradeId)
{
case UPGRADE_CHAIN_BOMB:
return _T("\u5408\u6210\uff1a\u7206\u7834\u65b9\u5757 -> \u8fde\u73af\u70b8\u5f39");
case UPGRADE_THUNDER_LASER:
return _T("\u5408\u6210\uff1a\u96f7\u9706\u56db\u6d88 + \u6fc0\u5149\u65b9\u5757");
case UPGRADE_INFINITE_FEVER:
return _T("\u5408\u6210\uff1a\u72c2\u70ed\u6a21\u5f0f + \u66b4\u8d70\u5806\u53e0");
case UPGRADE_TERMINAL_CLEAR:
return _T("\u5408\u6210\uff1a\u6700\u540e\u4e00\u640f + \u6e05\u5c4f\u70b8\u5f39 + \u72c2\u70ed");
case UPGRADE_DESTINY_WHEEL:
return _T("\u5408\u6210\uff1a\u53cc\u91cd\u9009\u62e9 -> \u547d\u8fd0\u8f6e\u76d8");
case UPGRADE_CONTROL_MASTER:
return _T("\u5408\u6210\uff1aHold \u89e3\u9501 + \u989d\u5916\u9884\u89c8");
case UPGRADE_EXTREME_PLAYER:
return _T("\u5408\u6210\uff1a\u9ad8\u538b\u5956\u52b1 + \u8d4c\u547d\u56db\u6d88");
case UPGRADE_EVOLUTION_IMPACT:
return _T("\u5408\u6210\uff1a\u5347\u7ea7\u51b2\u51fb\u6ce2 + \u6210\u957f\u6838\u5fc3");
case UPGRADE_VOID_CORE:
return _T("\u5408\u6210\uff1a\u9ed1\u6d1e + \u5f69\u8679\u65b9\u5757");
default:
return _T("");
}
}
static bool IsUpgradePrerequisiteConsumed(int upgradeId)
{
switch (upgradeId)
{
case UPGRADE_EXPLOSIVE_PIECE:
return rogueStats.chainBombLevel > 0;
case UPGRADE_LASER_PIECE:
case UPGRADE_THUNDER_TETRIS:
return rogueStats.thunderLaserLevel > 0;
case UPGRADE_FEVER_MODE:
return rogueStats.infiniteFeverLevel > 0 || rogueStats.terminalClearLevel > 0;
case UPGRADE_RAGE_STACK:
return rogueStats.infiniteFeverLevel > 0;
case UPGRADE_LAST_CHANCE:
case UPGRADE_SCREEN_BOMB:
return rogueStats.terminalClearLevel > 0;
case UPGRADE_DUAL_CHOICE:
return rogueStats.destinyWheelLevel > 0;
case UPGRADE_HOLD_UNLOCK:
case UPGRADE_PREVIEW_PLUS_ONE:
return rogueStats.controlMasterLevel > 0;
case UPGRADE_HIGH_PRESSURE:
case UPGRADE_TETRIS_GAMBLE:
return rogueStats.extremePlayerLevel > 0;
case UPGRADE_UPGRADE_SHOCKWAVE:
case UPGRADE_DOUBLE_GROWTH:
return rogueStats.evolutionImpactLevel > 0;
case UPGRADE_BLACK_HOLE:
case UPGRADE_RAINBOW_PIECE:
return rogueStats.voidCoreLevel > 0;
default:
return false;
}
}
static int GetUpgradeDynamicWeight(const UpgradeEntry& entry)
{
int weight = entry.baseWeight;
@@ -375,6 +438,11 @@ static const TCHAR* GetPieceShortName(int pieceType)
static bool IsUpgradeSelectable(const UpgradeEntry& entry)
{
if (IsUpgradePrerequisiteConsumed(entry.id))
{
return false;
}
if (entry.id == UPGRADE_CHAIN_BOMB)
{
return rogueStats.explosiveLevel > 0 &&