feat(polish & stats): add wallnut degradation states, hit flash, decapitation particle, frost crystals, dave dialogues and lifetime player stats

This commit is contained in:
2026-09-17 13:28:33 +00:00
parent 23918dab1f
commit 643b0287c1
10 changed files with 1260 additions and 65 deletions
+11
View File
@@ -88,6 +88,13 @@ window.PvZAuth = (function () {
maxUnlockedLevel: 1,
highScore: 0,
theme: 'classic',
stats: {
zombiesKilled: 0,
sunProduced: 0,
plantsPlanted: 0,
levelsCompleted: 0,
coinsEarned: 0
},
upgrades: { extraSlot: false, hasRake: false },
unlockedPlants: ['sunflower', 'peashooter', 'wallnut'],
selectedDeck: ['sunflower', 'peashooter', 'wallnut'],
@@ -180,6 +187,10 @@ window.PvZAuth = (function () {
return {
...def,
...serverData,
stats: {
...def.stats,
...(serverData.stats || {})
},
upgrades: { ...def.upgrades, ...(serverData.upgrades || {}) },
unlockedPlants: serverData.unlockedPlants || def.unlockedPlants,
selectedDeck: serverData.selectedDeck || def.selectedDeck,