Add freshness bar, enhance overlays and renderers

- Add enemy freshness tracking (novelty bonus for repeated deploys)
- Add freshness bar to sidepanel enemy cards with penalty indicator
- Major overhaul of renderer-overlays.js (790+ lines for UI polish)
- Enhanced combat log, shop overlays, and inventory UI
- Improved weapon/upgrade display with partial ownership colors
- Added element icons and weakness/resistance indicators to cards
- Enhanced radial menu and tooltip system
- Add "stale/%" penalty text when freshness depleted
- Update play link to ffazeshift.net in index.html
This commit is contained in:
2026-06-17 11:58:17 -04:00
parent 6a710c3f03
commit 626879ed0c
21 changed files with 1884 additions and 312 deletions
+18 -5
View File
@@ -4,7 +4,7 @@
// ============================================================
// ── ARENA ─────────────────────────────────────────────
const ARENA_RADIUS = 400; // play area radius; enemies always spawn at this distance from tower
const ARENA_RADIUS = 720; // play area radius; enemies always spawn at this distance from tower
const ARENA_CX = 665; // center x of play area: (1600 - 270) / 2
const ARENA_CY = 482; // center y of play area: 64 + (900 - 64) / 2
@@ -21,6 +21,9 @@ function makeGameState() {
_isNewBest: false,
creditReserve: 50, // minimum credits kept in reserve — cannot spend upgrades below this
// Camera
camera: { zoom: 0.85, minZoom: 0.57, maxZoom: 1.8 },
// Tower
tower: {
hp: 20,
@@ -64,10 +67,10 @@ function makeGameState() {
selectedEnemyType: null,
sendQuantity: 1,
// Shop
shopOpen: false,
shopTab: 'tower', // 'tower' | 'weapons' | weapon instance id
shopTreeWeapon: null,
// Overlay panels — armory (weapons) and command (tower upgrades)
armoryOpen: false,
commandOpen: false,
weaponDetailSlot: -1,
// Entity id counter
nextId: 1,
@@ -77,6 +80,16 @@ function makeGameState() {
// Enemy freshness (novelty bonus) — higher = less fresh = less bonus
enemyFreshness: Object.fromEntries(ENEMY_DEFS.map(d => [d.id, 0])),
// Difficulty / Prestige
difficultyTier: 0,
unlockedTiers: [0],
prestigeLevel: 0,
permanentBonuses: {},
// Other overlay panels
threatOpen: false,
prestigeOpen: false,
};
}