about summary refs log tree commit diff stats
path: root/html/tower/js/game.js
diff options
context:
space:
mode:
Diffstat (limited to 'html/tower/js/game.js')
-rw-r--r--html/tower/js/game.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/html/tower/js/game.js b/html/tower/js/game.js
index 34c225d..80b10d4 100644
--- a/html/tower/js/game.js
+++ b/html/tower/js/game.js
@@ -314,12 +314,28 @@ function handleLevelComplete() {
     // Pause the game briefly
     gameState.phase = GamePhase.TRANSITION;
     
+    // Calculate ammo bonus
+    let ammoBonus = 0;
+    gameState.towers.forEach(tower => {
+        ammoBonus += tower.ammo * 0.25;
+    });
+    ammoBonus = Math.floor(ammoBonus);
+    
     // Show level complete message with modal
     const message = `
         Level ${gameState.level} Complete!
+        
+        Stats:
+        Enemies Destroyed: ${gameState.enemiesDestroyed}
+        Enemies Escaped: ${gameState.enemiesEscaped}
+        
+        Bonuses:
         Current Money: $${gameState.currency}
+        Remaining Ammo Bonus: +$${ammoBonus}
         Level Bonus: +$10
         
+        Total After Bonuses: $${gameState.currency + ammoBonus + 10}
+        
         Ready for Level ${gameState.level + 1}?
     `;