进一步补充详细注释
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
*/
|
||||
void ApplyRainbowLandingEffect(bool overflowTop, const Point* fixedCells, int fixedCellCount)
|
||||
{
|
||||
// 顶部溢出时优先交给失败/复活逻辑处理,避免在不可见区域触发奖励。
|
||||
if (overflowTop || !currentPieceIsRainbow)
|
||||
{
|
||||
return;
|
||||
@@ -39,6 +40,7 @@ void ApplyRainbowLandingEffect(bool overflowTop, const Point* fixedCells, int fi
|
||||
rainbowAnchorRow = GetRoguePlayableHeight() - 1;
|
||||
}
|
||||
|
||||
// 第二阶段:按锚点行执行彩虹清除和覆盖行染色。
|
||||
int rainbowRecoloredCount = 0;
|
||||
int rainbowClearedCount = TriggerRainbowColorShift(rainbowAnchorRow, point.y, point.y + 3, rainbowRecoloredCount);
|
||||
int rainbowScore = 0;
|
||||
@@ -48,6 +50,7 @@ void ApplyRainbowLandingEffect(bool overflowTop, const Point* fixedCells, int fi
|
||||
int voidExp = 0;
|
||||
if (currentMode == MODE_ROGUE && rainbowClearedCount > 0)
|
||||
{
|
||||
// Rogue 模式下特殊清除也能获得得分和经验,但不直接触发升级菜单。
|
||||
AwardRogueSkillClearRewards(rainbowClearedCount, rainbowScore, rainbowExp, false);
|
||||
if (rogueStats.voidCoreLevel > 0)
|
||||
{
|
||||
@@ -86,11 +89,13 @@ void ApplyRainbowLandingEffect(bool overflowTop, const Point* fixedCells, int fi
|
||||
*/
|
||||
static void ApplyExplosiveLandingEffect(const Point* explosiveCells, int explosiveCellCount)
|
||||
{
|
||||
// 非爆破方块直接跳过,保持普通方块落地流程轻量。
|
||||
if (!currentPieceIsExplosive)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// 每个落地格都作为爆心清除范围,连环炸弹会扩大底层清除函数的范围。
|
||||
int explosiveCellsCleared = 0;
|
||||
for (int i = 0; i < explosiveCellCount; i++)
|
||||
{
|
||||
@@ -128,6 +133,7 @@ static void ApplyExplosiveLandingEffect(const Point* explosiveCells, int explosi
|
||||
*/
|
||||
static void ApplyLaserLandingEffect(const Point* fixedCells, int fixedCellCount)
|
||||
{
|
||||
// 激光方块以落地格平均列作为贯穿列,减少不同形状造成的位置偏差。
|
||||
if (!currentPieceIsLaser)
|
||||
{
|
||||
return;
|
||||
@@ -172,6 +178,7 @@ static void ApplyLaserLandingEffect(const Point* fixedCells, int fixedCellCount)
|
||||
*/
|
||||
static void ApplyCrossLandingEffect(const Point* fixedCells, int fixedCellCount)
|
||||
{
|
||||
// 十字方块同时计算中心行和中心列,后续分别触发行清除与列清除。
|
||||
if (!currentPieceIsCross)
|
||||
{
|
||||
return;
|
||||
@@ -248,6 +255,7 @@ static void ApplyStableStructureEffect()
|
||||
*/
|
||||
void ApplySpecialLandingEffects(const Point* fixedCells, int fixedCellCount, const Point* explosiveCells, int explosiveCellCount)
|
||||
{
|
||||
// 多种特殊标记按固定顺序结算,保证同一落地事件的反馈和奖励稳定。
|
||||
ApplyExplosiveLandingEffect(explosiveCells, explosiveCellCount);
|
||||
ApplyLaserLandingEffect(fixedCells, fixedCellCount);
|
||||
ApplyCrossLandingEffect(fixedCells, fixedCellCount);
|
||||
|
||||
Reference in New Issue
Block a user