feat(plants): Plant purchase system in Dave's Shop & pre-battle deck selection screen
This commit is contained in:
1 parent
4e450d758b
commit
84c28addfe
7 files changed
+889
-66
No files matched your search
@@ -48,6 +48,8 @@ window.PvZAuth = (function () {
|
||||
highScore: 0,
|
||||
theme: 'classic',
|
||||
upgrades: { extraSlot: false, hasRake: false },
|
||||
unlockedPlants: ['sunflower', 'peashooter', 'wallnut'],
|
||||
selectedDeck: ['sunflower', 'peashooter', 'wallnut'],
|
||||
materials: { bioHumus: 10, scrapMetal: 5, sunEssence: 20, crystals: 0 },
|
||||
plantLevels: { peashooter: 1, sunflower: 1, wallnut: 1, potatomine: 1,
|
||||
repeater: 1, snowpea: 1, chomper: 1 },
|
||||
@@ -113,10 +115,12 @@ window.PvZAuth = (function () {
|
||||
return {
|
||||
...def,
|
||||
...serverData,
|
||||
upgrades: { ...def.upgrades, ...(serverData.upgrades || {}) },
|
||||
materials: { ...def.materials, ...(serverData.materials || {}) },
|
||||
plantLevels: { ...def.plantLevels, ...(serverData.plantLevels || {}) },
|
||||
perks: { ...def.perks, ...(serverData.perks || {}) },
|
||||
upgrades: { ...def.upgrades, ...(serverData.upgrades || {}) },
|
||||
unlockedPlants: serverData.unlockedPlants || def.unlockedPlants,
|
||||
selectedDeck: serverData.selectedDeck || def.selectedDeck,
|
||||
materials: { ...def.materials, ...(serverData.materials || {}) },
|
||||
plantLevels: { ...def.plantLevels, ...(serverData.plantLevels || {}) },
|
||||
perks: { ...def.perks, ...(serverData.perks || {}) },
|
||||
zenGarden: serverData.zenGarden
|
||||
? {
|
||||
...def.zenGarden,
|
||||
|
||||
Reference in new issue
Block a user