Session 11: Golden Starbloom random event (clickable bonus + production boost)
This commit is contained in:
+35
@@ -51,6 +51,17 @@ const Stats = {
|
||||
<div class="stat-label">Achievements Unlocked</div>
|
||||
<div class="stat-value" id="stat-achievements">0/${Object.keys(ACHIEVEMENTS).length}</div>
|
||||
</div>
|
||||
<div class="stat-item">
|
||||
<div class="stat-label">Total Golden Blooms Claimed</div>
|
||||
<div class="stat-value" id="stat-golden-blooms">0</div>
|
||||
</div>
|
||||
<div class="stat-item">
|
||||
<div class="stat-label">Production Boost</div>
|
||||
<div class="stat-value" id="stat-production-boost">Inactive</div>
|
||||
<div class="stat-bar">
|
||||
<div class="stat-bar-fill" id="stat-boost-progress" style="width: 0%"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stat-item">
|
||||
<div class="stat-label">Next Achievement</div>
|
||||
<div id="stat-next-achievement" style="font-size:0.85rem; color:var(--text-secondary); margin-top:4px">Loading...</div>
|
||||
@@ -121,6 +132,30 @@ const Stats = {
|
||||
achievementsEl.textContent = `${Achievements.getCount()}/${Achievements.getTotal()}`;
|
||||
}
|
||||
|
||||
// Total Golden Blooms claimed
|
||||
const goldenBloomsEl = document.getElementById('stat-golden-blooms');
|
||||
if (goldenBloomsEl) {
|
||||
goldenBloomsEl.textContent = Game.state.goldenBlooms.totalClaimed || 0;
|
||||
}
|
||||
|
||||
// Production boost status + progress bar
|
||||
const boostInfo = Game.getProductionBoostInfo();
|
||||
const boostEl = document.getElementById('stat-production-boost');
|
||||
const boostProgressEl = document.getElementById('stat-boost-progress');
|
||||
if (boostEl) {
|
||||
if (boostInfo.active) {
|
||||
boostEl.textContent = `Active (${boostInfo.remaining}s)`;
|
||||
if (boostProgressEl) {
|
||||
boostProgressEl.style.width = `${Math.min(100, (boostInfo.remaining / 30) * 100)}%`;
|
||||
}
|
||||
} else {
|
||||
boostEl.textContent = 'Inactive';
|
||||
if (boostProgressEl) {
|
||||
boostProgressEl.style.width = '0%';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Game progress (based on total stardust milestones)
|
||||
const progressBarEl = document.getElementById('stat-progress-bar');
|
||||
if (progressBarEl) {
|
||||
|
||||
Reference in New Issue
Block a user