Session 14: Buy All Upgrades (bulk-buy for upgrades) + empty-slot boost leak fix

- Added Game.buyAllUpgrades(): buys every affordable upgrade at once,
  respecting per-upgrade requirements and looping until nothing remains.
- Added a 'Buy All' button to the Upgrades tab header; UI.updateBuyAllButton()
  shows/hides & enables/disables it live each tick based on affordability.
- Fixed empty-slot branch of switchSlot(): added productionBoostUntil: 0 so a
  temporary golden-bloom boost cannot leak into a fresh slot.
- Added .upgrades-header / .buy-all-btn CSS (gold accent theme).

Verified: headless test buy-all-upgrades-test.mjs 24/24 pass; existing
golden-bloom (22/22) and buy-max (6/6) tests re-run clean, no regressions.
This commit is contained in:
2026-08-24 01:30:10 +00:00
parent b532f5a15c
commit 34074b8e65
5 changed files with 160 additions and 3 deletions
+4 -1
View File
@@ -58,7 +58,10 @@
</div>
<div id="upgrades-tab" class="tab-content active">
<h3>Upgrades</h3>
<div class="upgrades-header">
<h3>Upgrades</h3>
<button id="buy-all-upgrades" class="buy-all-btn" style="display:none" title="Buy every upgrade you can currently afford">Buy All</button>
</div>
<div id="upgrades-list"></div>
</div>