Adds DOM-based particle burst animations when buying buildings and
completing research projects. Blue particles for buildings, gold for
projects. Lightweight CSS animation with no external dependencies.
Refs #57 — Night of Polish, Task 1 (Visual Identity)
Replace native browser title= tooltips with styled custom tooltips
that match the game's dark theme. Tooltips appear instantly on hover
with building/project name and educational content.
- Add CSS for #custom-tooltip with dark theme styling
- Add tooltip div to HTML body
- Add event delegation in main.js for [data-edu] elements
- Convert renderBuildings and renderProjects to use data-edu
and data-tooltip-label attrs instead of title=
- Tooltip follows cursor with screen-edge clamping
Refs: Epic #57 — Night of Polish, Task 4 (Tooltip system)
- Add CSS keyframes: res-pulse (scale up + blue flash) and res-shake (horizontal shake + red flash)
- Track previous resource values in _prevRes object
- Detect gain/loss on each renderResources() call and trigger appropriate animation
- Add rate color coding: green for positive, red for negative, dim for zero
- Clean up animation classes after 400ms to allow re-triggering
- No external dependencies, pure CSS + vanilla JS
playTime was defined in globals but never incremented and never
included in save/load. Now incremented each tick and persisted
in localStorage via the whitelist and save data.
applyFn was multiplying G.codeBoost by 0.7 on every updateRates() call
(building purchase, project, click, etc.), permanently degrading it.
After 10 calls the boost was effectively zero.
Fix: apply penalty to G.codeRate (computed per-tick) instead of
G.codeBoost (persistent multiplier). Debuffs must never mutate boost state.
- index.html: role=region on phase-bar, strategy-panel; role=dialog+aria-modal on help overlay, offline popup, drift ending; aria-label on help button, close button, continue button, start over button; aria-live on progress label
- render.js: aria-label on alignment event buttons; fix exportSave() URL revoke race with setTimeout delay
- engine.js: aria-label+aria-pressed on buy amount buttons; role=button+tabindex+aria-expanded+aria-controls on completed projects header
- Building rate display now shows actual boosted rates (after multipliers)
instead of raw base rates, so players see their real production
- WRITE CODE button area now displays current click power dynamically
(updates each render tick as boosts change)
- Click power also reflected in button aria-label for accessibility
Closes#61