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

This commit is contained in:
Antigravity committed 2026-09-17 13:28:33 +00:00
1 parent 23918dab1f
commit 643b0287c1
10 files changed
+1260 -65

No files matched your search

+41
View File
@@ -880,6 +880,46 @@ def test_qol_controls_and_backup():
for name, cond in qol_checks:
record(name, "PASS" if cond else "FAIL")
def test_visual_polish_dave_dialogues_and_stats():
print("\n--- 11e. Visual Polish, Crazy Dave Dialogues & Lifetime Stats ---")
html_path = os.path.join(GAME_DIR, "index.html")
with open(html_path, "r", encoding="utf-8") as f:
html_code = f.read()
plant_js_path = os.path.join(GAME_DIR, "js/entities/plant.js")
with open(plant_js_path, "r", encoding="utf-8") as f:
plant_code = f.read()
zombie_js_path = os.path.join(GAME_DIR, "js/entities/zombie.js")
with open(zombie_js_path, "r", encoding="utf-8") as f:
zombie_code = f.read()
combat_js_path = os.path.join(GAME_DIR, "js/systems/combat.js")
with open(combat_js_path, "r", encoding="utf-8") as f:
combat_code = f.read()
camp_js_path = os.path.join(GAME_DIR, "js/systems/campaign.js")
with open(camp_js_path, "r", encoding="utf-8") as f:
camp_code = f.read()
auth_js_path = os.path.join(GAME_DIR, "js/systems/auth.js")
with open(auth_js_path, "r", encoding="utf-8") as f:
auth_code = f.read()
juice_checks = [
("Wallnut degradation states (cracks, bites, tears) implemented", "drawWallnut" in plant_code and "healthRatio <= 0.33" in plant_code),
("Hit flash white effect on zombies implemented", "hitFlashTimer" in zombie_code and "white" in zombie_code),
("Zombie flying decapitated head particle implemented", "ZombieHeadParticle" in combat_code),
("Frost/freeze crystal particles and tint for slowed zombies", "isSlow" in zombie_code and "drawFrostCrystals" in zombie_code),
("Crazy Dave dialogue modal markup present in HTML", 'id="dave-modal"' in html_code and 'id="btn-dave-continue"' in html_code),
("Crazy Dave campaign dialogues defined in campaign.js", "DAVE_DIALOGUES" in camp_code and "Солнцегриб" in camp_code),
("Lifetime player stats tracking in auth.js", "zombiesKilled" in auth_code and "sunProduced" in auth_code and "plantsPlanted" in auth_code),
("Lifetime stats grid present in auth modal", "lifetime-stats-grid" in html_code and "profile-stat-zombies" in html_code),
]
for name, cond in juice_checks:
record(name, "PASS" if cond else "FAIL")
def main():
print("==================================================")
print("🌱 PLANTS VS. ZOMBIES — AUTONOMOUS TEST SUITE 🌱")
@@ -899,6 +939,7 @@ def main():
test_plant_shop_and_deck_selection()
test_modern_dashboard_and_fullscreen()
test_qol_controls_and_backup()
test_visual_polish_dave_dialogues_and_stats()
test_http_endpoint()
passed = sum(1 for r in TEST_RESULTS if r["status"] == "PASS")