将炸弹方块改为每10块固定生成一次

This commit is contained in:
2026-04-25 16:39:18 +08:00
parent 71a3684ce1
commit d1bc887836
4 changed files with 23 additions and 17 deletions
+10 -4
View File
@@ -271,6 +271,7 @@ static void ResetPlayerStats(PlayerStats& stats, bool useRogueRules)
stats.sweeperLevel = 0;
stats.sweeperCharge = 0;
stats.explosiveLevel = 0;
stats.explosivePieceCounter = 0;
stats.chainBlastLevel = 0;
stats.chainBombLevel = 0;
stats.laserLevel = 0;
@@ -851,13 +852,18 @@ static bool RollExplosivePiece()
return false;
}
int chancePercent = 12 + (rogueStats.explosiveLevel - 1) * 8;
if (chancePercent > 40)
if (rogueStats.explosivePieceCounter < 10)
{
chancePercent = 40;
rogueStats.explosivePieceCounter++;
}
return (rand() % 100) < chancePercent;
if (rogueStats.explosivePieceCounter < 10)
{
return false;
}
rogueStats.explosivePieceCounter = 0;
return true;
}
static bool RollLaserPiece()