瀏覽代碼

奖励结算优化

181404010226 3 月之前
父節點
當前提交
b054db9807
共有 1 個文件被更改,包括 8 次插入3 次删除
  1. 8 3
      assets/scripts/LevelSystem/SaveDataManager.ts

+ 8 - 3
assets/scripts/LevelSystem/SaveDataManager.ts

@@ -1123,10 +1123,15 @@ export class SaveDataManager {
             return;
         }
         
-        // 即使completedWaves为0,也给予最低奖励(10%的基础奖励)
-        const minRewardRatio = 0.1; // 最低奖励比例
+        // 如果完成波数为0,则不给予任何奖励
+        if (completedWaves <= 0) {
+            console.log('[SaveDataManager] 完成波数为0,不给予任何奖励');
+            this.lastRewards = {money: 0, diamonds: 0};
+            return;
+        }
+        
         const actualCompletedWaves = Math.max(completedWaves, 0);
-        const waveRatio = Math.max(minRewardRatio, actualCompletedWaves / totalWaves);
+        const waveRatio = actualCompletedWaves / totalWaves;
         
         console.log(`[SaveDataManager] 波数完成情况: ${actualCompletedWaves}/${totalWaves} = ${(waveRatio * 100).toFixed(1)}%`);