Commit Graph

88 Commits

Author SHA1 Message Date
hikari d45b80fe4a feat: vampire syncNewContent injection and grant-eternal-sovereignty debug endpoint
Adds vampire parity with existing goddess debug tooling:
- `SyncNewContentResponse` type gains vampire count fields
- `syncNewContent` injects missing vampire content arrays for players
  who have entered the vampire realm (achievements, bosses, equipment,
  exploration areas, quests, thralls, upgrades, zones)
- `/grant-eternal-sovereignty` debug endpoint mirrors `/grant-apotheosis`,
  setting `vampire.eternalSovereignty.count = 1` for saves that need it
- Full test coverage for all new paths in debug.spec.ts
2026-04-16 17:46:59 -07:00
hikari e02827dbb6 feat: vampire tick engine, auto systems, and full test suite
- vampire blood production tick with thrall bloodPerSecond + multipliers
- auto-quest and auto-thrall purchase in tick engine
- computeVampireBloodPerSecond helper exposed for ResourceBar display
- ResourceBar now shows blood/s and currency balances for vampire mode
- vampire quests and thralls panels gain auto-toggle buttons
- About page updated with vampire mode how-to-play entries
- vampireEquipmentSets data file added to web
- 100% test coverage across all API routes and services:
  - siring, awakening, vampireBoss, vampireCraft, vampireExplore, vampireUpgrade
  - debug route now covers grant-apotheosis endpoint
  - vampireMaterials excluded from coverage (ID-referenced only, same as goddessMaterials)
2026-04-16 14:01:50 -07:00
hikari 1e0a7b142a feat: vampire crafting and exploration panels with dark materials data 2026-04-16 12:50:20 -07:00
hikari a7598dca12 feat: vampire equipment, upgrades, siring, and awakening panels 2026-04-16 12:36:05 -07:00
hikari bd88eecda5 feat: vampire boss panel and thralls panel with combat simulation
Implements VampireBossPanel (zone filtering, HP bar, battle modal with
rewards/casualties) and VampireThrallsPanel (batch buy with geometric
cost scaling). Wires challengeVampireBoss, dismissVampireBattle, and
buyVampireThrall into GameContext with correct sort-key ordering.
2026-04-16 12:17:45 -07:00
hikari 3e34701d32 feat: vampire zones, quests, and achievements panels
Implements the three read-only vampire expansion display panels:
- VampireZonesPanel: zone grid with lock state, boss/quest unlock requirements
- VampireQuestsPanel: zone-filtered quest list with duration, rewards, progress badge
- VampireAchievementsPanel: achievement cards with progress bars and ichor/soul shard rewards
Wires all three into GameLayout, replacing the corresponding tab placeholders.
2026-04-16 10:15:03 -07:00
hikari d9d1228172 feat: vampire UI infrastructure - mode bar, tab row, and blood-red theme
- Added vampire API client functions (boss challenge, siring, awakening, upgrades, craft, explore)
- Fixed goddess API client URL bugs (/goddess/* → /goddess-boss/challenge, /goddess-upgrade/buy, /goddess-craft, /goddess-explore/*)
- Added VampireTab type and vampireTabs array (11 tabs) to GameLayout
- Fixed mode unlock chain: vampire after apotheosis, goddess after eternalSovereignty
- Added body.vampire-mode CSS class toggle alongside existing goddess-mode toggle
- Added vampire tab bar nav with blood-red theme
- Replaced single vampire placeholder with per-tab placeholders
- Added body.vampire-mode CSS variables (blood-red palette) and .vampire-tab-bar styles
- Added Blood/Ichor/Soul Shards resource display to ResourceBar (gated on apotheosis)
2026-04-16 10:03:14 -07:00
hikari 8fa5d12f05 feat: vampire expansion chunk 4 — API routes and services
Adds six new routes (vampire-boss, vampire-upgrade, vampire-craft,
vampire-explore, siring, vampire-awakening) with matching siring and
awakening services, and all necessary request/response types.
2026-04-16 09:48:50 -07:00
hikari 7f43dc725e feat: vampire mode chunk 3 - sync/sanitize and initial state
Add initialVampireState() and vampireSpread validation to mirror the
goddess mode pattern. Also lint-fix pre-existing style issues across
all Chunk 2 vampire data and type files.
2026-04-16 09:26:29 -07:00
hikari 53a026da62 feat: complete vampire expansion chunk 2 — exploration areas
Adds vampireExplorations.ts with 72 areas across all 18 vampire zones
(4 per zone), each with descriptions, events, material drops, and
scaled durations. Also fixes a TypeScript double-cast error in
debug.ts and marks chunk 2 complete in vampire.md.
2026-04-15 19:27:59 -07:00
hikari 4012635076 feat: vampire expansion chunk 2 (wip) — content data and grant-apotheosis debug route 2026-04-14 18:42:47 -07:00
hikari 9548b460f2 feat: vampire expansion chunk 1 — type definitions 2026-04-14 18:42:40 -07:00
hikari 91c9f52daf feat: goddess expansion chunks 6–9 — UI panels, tick engine, CSS theme, about page
- Add 11 goddess panels (zones, bosses, quests, disciples, equipment,
  upgrades, consecration, enlightenment, crafting, exploration, achievements)
- Wire all panels into gameLayout via mode/tab routing
- Add goddess passive income, disciple tick, quest timers, zone/quest
  unlock logic, and achievement checking to the tick engine
- Add goddess CSS variables, .goddess-mode overrides, 300ms fade
  transition, and full panel stylesheet coverage
- Add 13 Goddess expansion entries to the How to Play guide
- Add web-side data files for crafting recipes, exploration areas, materials
2026-04-13 18:38:27 -07:00
hikari 96d6759661 feat: mode bar, goddess tab row, themed resource dropdown (chunk 5)
Add Mortal/Goddess/Vampire mode selector bar, dynamic second tab row
that swaps per mode, goddess currencies in the resource bar dropdown
(locked pre-apotheosis), full CSS goddess theme with 300ms fade
transition, and localStorage persistence of the active mode.
2026-04-13 15:59:43 -07:00
hikari 0d36b255ee feat: goddess API routes, services, and tests (chunk 4)
Add six new goddess-mode API routes (boss fight, consecration,
enlightenment, upgrade purchase, crafting, exploration) alongside
matching service modules and full test suites at 100% coverage.
2026-04-13 15:48:35 -07:00
hikari 7da1f3942d feat: goddess sync, sanitize, and apotheosis init (chunk 3)
- initialState: add initialGoddessState() with all goddess sub-objects
- apotheosis: init GoddessState on first apotheosis, preserve on subsequent
- game: add goddessSpread block in validateAndSanitize (server-only fields capped, forward-only boss/quest/achievement enforcement)
- debug: add injectMissingGoddessExplorationAreas helper and inject all 8 goddess content arrays in syncNewContent
- vitest.config.ts: remove 8 goddess data files from coverage exclude (now imported via initialState)
- tests: full coverage for all new code (482 tests, 100% coverage)
2026-04-13 14:23:02 -07:00
hikari c5d1f53eef feat: goddess expansion chunk 2 — full content data at base game scale
- 18 zones, 72 bosses, 90 quests across the goddess realm
- 32 disciple tiers, 53 equipment pieces, 9 equipment sets
- 57 goddess upgrades, 25 consecration upgrades, 15 enlightenment upgrades
- 54 sacred materials, 36 crafting recipes, 72 exploration areas
- 40 goddess achievements
- Added GoddessEquipmentSet type + computeGoddessSetBonuses to @elysium/types
- All data files excluded from coverage pending Chunk 4 route imports
2026-04-13 12:50:25 -07:00
hikari c09777199a feat: add Goddess expansion type definitions
Adds all TypeScript interfaces for the Goddess expansion to packages/types:
GoddessState, GoddessZone, GoddessBoss, GoddessQuest, GoddessDisciple,
GoddessEquipment, GoddessUpgrade, ConsecrationData, EnlightenmentData,
GoddessExplorationState, GoddessAchievement. Extends Resource with optional
goddess currencies (prayers, divinity, stardust) and GameState with optional
goddess field. Also adds goddess-todo.md implementation tracker.
2026-04-13 12:01:40 -07:00
hikari 9bb1d01d2b fix: resolve all 8 open bug tickets (#242–#249) (#250)
CI / Lint, Build & Test (push) Successful in 2m15s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 2m13s
## Summary

- **#242** — Crystals in the resource bar now use `formatNumber` to respect the player's notation setting (suffix/scientific/engineering)
- **#243** — Companion unlock progress includes current-run gold (`totalGoldEarned`) on both client and server, so companions unlock at the correct threshold
- **#244** — Empty green reward bubbles no longer render for quest crystal rewards with a zero amount
- **#245/#248** — Auto-save skips when `isAutoPrestigingReference.current` is true, preventing it from racing with an in-flight prestige and breaking the optimistic lock
- **#246** — Generated and uploaded CDN images for `crystal_pulse`, `crystal_surge`, and `crystal_tempest` upgrades
- **#247** — `validateAndSanitize` merges daily challenge progress by taking the max of client vs. server progress per challenge, so stale auto-saves can no longer roll back server-side completions
- **#249** — Cached save signature is cleared after `buyPrestigeUpgrade` succeeds, preventing a stale-signature mismatch on the next auto-save

## Test plan

- [ ] Lint passes (`pnpm lint`)
- [ ] Build passes (`pnpm build`)
- [ ] Tests pass with 100% coverage (`pnpm test`)
- [ ] Crystals display in resource bar respects notation setting
- [ ] No empty reward bubbles on quests that don't award crystals
- [ ] Companion progress bar shows correct value including current-run gold
- [ ] Auto-prestige no longer causes save errors
- [ ] Crafting a recipe updates daily challenge progress persistently (not rolled back by next auto-save)
- [ ] Buying a prestige upgrade does not cause a signature mismatch error on next save
- [ ] Crystal upgrade images display correctly in-game

 This PR was created with help from Hikari~ 🌸

Reviewed-on: #250
Co-authored-by: Hikari <hikari@nhcarrigan.com>
Co-committed-by: Hikari <hikari@nhcarrigan.com>
2026-04-13 09:50:20 -07:00
naomi e341db56af release: v0.5.0
CI / Lint, Build & Test (push) Successful in 1m15s
Security Scan and Upload / Security & DefectDojo Upload (push) Failing after 44s
v0.5.0
2026-04-06 20:19:18 -07:00
hikari 2bc47b79aa fix: suppress expired-token log noise and redirect expired sessions to login (#241)
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m4s
CI / Lint, Build & Test (push) Successful in 1m11s
## Summary

- **Server**: `authMiddleware` no longer calls `logger.error` for expired tokens — expiry is expected behaviour, not an error. Only tampered signatures and malformed tokens (genuinely suspicious) still log.
- **Client**: `fetchJson` now handles 401 responses by clearing `elysium_token` and `elysium_save_signature` from localStorage and redirecting to `/`. Players whose 30-day token has expired will see the login page instead of a stuck "Invalid or expired token" error screen with no recovery path.

Closes #241

 This PR was created with help from Hikari~ 🌸

Reviewed-on: #241
Co-authored-by: Hikari <hikari@nhcarrigan.com>
Co-committed-by: Hikari <hikari@nhcarrigan.com>
2026-04-06 20:17:28 -07:00
hikari 3afe64e48a feat: comprehensive balance and bug fix pass (#240)
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m4s
CI / Lint, Build & Test (push) Successful in 1m10s
## Summary

- **fix(#148)**: Boss fights now return a fresh HMAC signature in the response; both the manual and auto-boss paths update `signatureReference` from it, ending the signature-mismatch loop that stopped auto-boss after the first fight
- **fix(#145)**: Militia `baseCost` lowered from 100g → 65g, smoothing the peasant→militia jump from 10× to ~6.5×
- **fix(#144)**: `crystal_shard` buffed from `1.65×/1.2×` → `1.9×/1.3×` — now competitive as an epic trinket
- **fix(#142)**: Click-power recipe progression smoothed across zones 13–18 and ceiling raised: z13 1.20→1.22, z15 1.22→1.25, z17 1.25→1.28, z18 1.28→1.30
- **close(#143)**: `elder_bark_shield` (1.2×), `void_fragment_amulet` (1.15×), and `soul_bound_catalyst` (1.2×) are all already at or above their target values from a prior pass

Closes #148
Closes #145
Closes #144
Closes #142

Reviewed-on: #240
Co-authored-by: Hikari <hikari@nhcarrigan.com>
Co-committed-by: Hikari <hikari@nhcarrigan.com>
2026-04-06 19:33:05 -07:00
hikari e7164257c5 feat: comprehensive balance pass (#239)
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m9s
CI / Lint, Build & Test (push) Successful in 1m12s
## Summary

Working through all 15 open balance tickets in a coordinated multi-pass approach.

### Pass 1 — Quest failure rates (closes #172)
- Capped all zone quest failure chances at 15% (down from up to 40%)
- Proportional scaling preserved (harder zones still fail more than easier ones)

### Pass 2 — Crystal economy (closes #165, #173, #215)
- Added `crystal_pulse` (3,000 crystals), `crystal_surge` (20,000), `crystal_tempest` (150,000) upgrades to fill the dead zone between 600 and 2M crystal sinks
- Bumped `click_deity`, `prestige_master`, and `prestige_legend` achievement crystal rewards (5K→15K, 5K→15K, 25K→75K)
- Added crystal rewards to `first_steps` (+5) and `goblin_camp` (+10) early quests

### Pass 3 — Runestone/prestige loop (closes #166, #170)
- Bumped `runestonesPerPrestigeLevel` from 15 → 20 (~33% yield increase for mid-game runs)
- Reduced `income_10` cost from 22,500 → 15,000 and `income_11` from 60,000 → 35,000
- Kept client/server parity: `runestonesPerPrestigeLevelClient` in tick.ts updated to match

### Pass 4 — Quest content (#175, #178)
- Both already resolved in commit 666a5b2: quests now reach 5e141 CP across reality_forge, cosmic_maelstrom, primeval_sanctum, and the_absolute — fully covering P60–P212

### Pass 5 — Daily challenges (closes #167)
- Added `crafting` as a new `DailyChallengeType`
- Added 3 crafting challenge templates (craft 1/2/3 recipes)
- Changed generation to guarantee: 1 clicks + 1 crafting + 1 from progression pool
- Added crafting challenge tracking in `craft.ts` (awards crystals on recipe craft)
- Stuck players now have 2/3 daily challenges always completable

### Pass 6 — Transcendence costs (#179)
- Already resolved in commit 666a5b2: echo meta costs are 15/45/100 (was 25/75/200)

### Also closed as stale
- #171 (milestone bonus already quadratic)
- #174 (production multiplier already 1.3^n)
- #176 (expanse_sovereign HP already at 3e39)
- #177 (recipe costs already in expected range)
- #178 (post-absolute quests already present)
- #179 (echo meta costs already reduced)

 This PR was created with help from Hikari~ 🌸

Reviewed-on: #239
Co-authored-by: Hikari <hikari@nhcarrigan.com>
Co-committed-by: Hikari <hikari@nhcarrigan.com>
2026-04-06 18:58:04 -07:00
hikari 1195b657a0 feat: another balance and bug fix pass (#238)
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m10s
CI / Lint, Build & Test (push) Successful in 1m13s
Working through open issues — fixes, balance changes, and features.

## Closed

- Closes #161
- Closes #181
- Closes #191
- Closes #199
- Closes #201
- Closes #202
- Closes #203
- Closes #204
- Closes #205
- Closes #206
- Closes #208
- Closes #211
- Closes #212
- Closes #213
- Closes #214
- Closes #216
- Closes #219
- Closes #220
- Closes #221
- Closes #222
- Closes #224
- Closes #225
- Closes #226
- Closes #228
- Closes #229
- Closes #230
- Closes #231
- Closes #232
- Closes #233
- Closes #234
- Closes #235
- Closes #236

 This PR was created with help from Hikari~ 🌸

Reviewed-on: #238
Co-authored-by: Hikari <hikari@nhcarrigan.com>
Co-committed-by: Hikari <hikari@nhcarrigan.com>
2026-04-06 18:17:00 -07:00
hikari b0227c1709 chore: update minor and patch dependencies (#237)
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m4s
CI / Lint, Build & Test (push) Successful in 1m11s
## Summary

- Bumped minor/patch versions for `@hono/node-server`, `@types/node`, `@types/react`, `@types/react-dom`, `@vitejs/plugin-react`, `hono`, `jsdom`, `react`, `react-dom`, `tsx`, and `vite`
- Full pipeline (lint → build → test) confirmed passing

## Held back

- **TypeScript** — held at 5.8.2; 6.x is incompatible with the current `@nhcarrigan/eslint-config`
- **Vitest** — held at 3.x; 4.x changes v8 coverage pragma handling, needs investigation
- **Prisma** — held at 6.x; 7.x requires a `prisma.config.ts` migration

 This PR was created with help from Hikari~ 🌸

Reviewed-on: #237
Co-authored-by: Hikari <hikari@nhcarrigan.com>
Co-committed-by: Hikari <hikari@nhcarrigan.com>
2026-04-06 12:09:10 -07:00
hikari de5570b5fc fix: filter third-party script errors from frontend telemetry
CI / Lint, Build & Test (push) Successful in 1m14s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m56s
2026-04-01 13:55:40 -07:00
hikari 133c81fefe chore: bump schema version to 2 for v0.4.0 balance pass
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m9s
CI / Lint, Build & Test (push) Successful in 1m11s
2026-03-31 20:06:13 -07:00
naomi 1408e067b7 release: v0.4.0 2026-03-31 20:00:08 -07:00
hikari 666a5b2d6d fix: runestone formula, prestige/transcendence rebalance, exploration fixes, and comprehensive balance audit (#135)
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m12s
CI / Lint, Build & Test (push) Successful in 1m13s
## What changed and why

### Runestone formula (`prestige.ts`)
- Swapped `sqrt` for `cbrt` — much stronger diminishing returns for large gold values
- Added base cap of **200** (→ ~1,125 max with all upgrades at 5.625× multiplier)
- Prevents extended AFK sessions from producing runestone windfalls that allow immediate upgrade purchasing and rapid prestige chaining

### Prestige threshold formula (`prestige.ts`)
- Old: `1,000,000 × 5^n` — exponential, grows impossibly fast, prestige 10+ takes years
- New: `1,000,000 × (n+1)²` — polynomial, peaks at ~1 day/run around P8–10, then gets *easier* as the production multiplier overtakes it
- Removed `thresholdScaleFactor` constant (no longer needed)

### Production multiplier (`prestige.ts`)
- Old: `1.15^n`
- New: `1.25^n` — compounds faster, ensures the polynomial threshold eventually gets easy in the late game

### Boss prestige requirements (`bosses.ts`)
- Rescaled proportionally from 0–88 range to 0–20 range
- The Absolute One now requires prestige **20** (was 88), making transcendence reachable in a few weeks of idle play

### Echo formula (`transcendence.ts`)
- Constant changed from 853 → **224**
- At the target prestige of 20: `floor(224 / sqrt(20)) = 50 echoes` per transcendence (no meta upgrades)
- With all echo_meta upgrades (3.75× total): up to **187 echoes** per transcendence

### Transcendence upgrade costs (`transcendenceUpgrades.ts`)
- Old total: **866 echoes** → New total: **400 echoes** (roughly halved across all categories)
- Apotheosis still requires **all 15 upgrades** purchased

### Balance fixes (closes #141, #142, #143, #144, #145)
- Equipment: `philosophers_stone` click multiplier 2.25→2.5, `crystal_shard` 1.55→1.65 (#144)
- Recipes: added `primal_omega_lens` cross-zone click_power recipe at 1.38× (#142)
- Adventurers: `celestial_guard` base cost adjusted to smooth tier 14→15→16 cost curve (#145)

### Quest reward rebalancing (closes #136, #137)
- Shadow Marshes: buffed `shadow_mere`, `witch_coven`, `plague_ruins` rewards to match combat requirements (#136)
- Astral Void: added gold to `void_rift`, increased rewards across all Astral Void quests (#137)

### Boss reward additions (closes #138, #139, #140)
- Assigned 9 unassigned adventurer-specific upgrades to Crystalline Spire through Eternal Throne bosses that had empty `upgradeRewards` arrays (#140)

### Combat power documentation (closes #153)
- Expanded JSDoc on `computePartyCombatPower` to clarify companion `bossDamage` multiplier behaviour

### Effective adventurer stats (closes #154)
- Added `computeEffectiveAdventurerStats` to `tick.ts` and updated `AdventurerCard` to display effective post-multiplier stats

### Adventurer upgrade timing (closes #158)
- Audited every adventurer-specific upgrade reward — upgrades now land within the same progression window where that adventurer tier is still a meaningful contributor

### Sync and save fixes (closes #147, #148, #151)
- Fixed sync new content count to report only genuinely changed items (#147)
- Fixed signature mismatch after first auto-boss completion (#148)
- Added auto-buy cap (100) on non-max-tier adventurers (#151)

### Auto-adventurer persistence (closes #156)
- Auto-buy preference now preserved across prestige resets

### Broken CDN image (closes #159)
- Uploaded missing `auto_adventurer.jpg` to CDN

### Codex unlock hints (closes #146)
- Locked codex entries now display a hint generated from `sourceType` and `sourceId`

### Exploration bug fixes (closes #160, #161)
- Fixed auto-save race condition discarding exploration materials collected mid-tick (#160)
- Fixed exploration areas failing to unlock when zone was unlocked via boss kill or quest completion (#161)

### Concurrent prestige fix (closes #162)
- Added optimistic locking via `updatedAt` — concurrent prestige requests return 409

### Prestige UX (closes #163)
- Added `reloadSilent` to game context — no loading screen flash after prestige

### Balance adjustments (closes #164, #165, #166, #167)
- Reduced `shadow_mere` CP requirement 5,000,000 → 2,000,000 (#164)
- Buffed crystal drops from Shadow Marshes bosses and quests (#165)
- Increased runestone yield from 10 → 15 per prestige level (#166)
- Daily challenge set always includes a clicks challenge (#167)

### Progression QoL (closes #168, #169)
- Added `computeProjectedRunestones()` and persistent `+N On Prestige` resource bar row (#168)
- Added `enablePrestigeAnnouncements` setting per player (#169)

---

## Comprehensive balance audit (closes #187, #191, #192, #193, #194, #195, #196, #197, #198)

### Crystal economy fixes
- Zeroed crystal rewards for all Zone 7+ boss drops (Celestial Reaches onwards) — crystals are an early/mid-game currency and should not flow freely into the endgame (#187)
- Zeroed crystal rewards for all Zone 9+ quest rewards (Infernal Court onwards) — same rationale (#191)

### Achievement additions and fixes
- Added quest milestone achievements at 75 quests (10,000 crystals) and 100 quests (15,000 crystals)
- Added boss milestone achievement at 50 bosses (15,000 crystals)
- Added prestige milestone achievements at P50, P100, P150, P200 — rewarding **runestones** rather than crystals to match the late-game economy
- Added gold milestone achievements through 1e90 gold earned
- Fixed `quest_eternal` condition from 122 → **112** (actual quest count) — was permanently impossible (#197)
- Fixed `fully_equipped` condition from 65 → **78** (actual equipment count after new items) (#197)
- Fixed `devourer_slayer` description to remove incorrect zone reference

### Upgrade balance
- Fixed Essence Guild multiplier 1.5× → **2×** — was identical to the cheaper Merchant Alliance for 5× the cost (#194)
- Raised Void Ascendancy crystal cost 10M → **50M** — was trivially cheap compared to the parallel Celestial Mandate upgrade (100B essence + 50T gold) (#195)
- Fixed Sunken Temple quest rewards (gold 2M → 60M, essence 1,500 → 25,000, crystals 75 → 400) — was rewarding less than its easier prerequisite Witch Coven (#193)

### Equipment balance
- Buffed Eternal Prism stats to click 5×, combat **3×**, gold **2.5×** — was only marginally better than the free Eternity Stone boss drop for 100M crystals (#196)

### Missing content
- Created **13 missing equipment items** for Zones 15–18 (primordial_chaos through the_absolute) that were referenced by late-game boss `equipmentRewards` arrays but never existed in `equipment.ts` (#198):
  - `chaos_mantle`, `titan_core` (Primordial Chaos)
  - `expanse_blade`, `void_armour_mk2` (Infinite Expanse)
  - `cosmos_blade`, `reality_plate` (Reality Forge)
  - `maelstrom_edge`, `cosmic_plate` (Cosmic Maelstrom)
  - `primeval_blade`, `ancient_aegis` (Primeval Sanctum)
  - `absolute_blade`, `eternity_plate`, `omniversal_core` (The Absolute)
- Stats scale from combat 14× / gold 9× (Zone 15) up to combat 28× / gold 20× for the final boss drops

### Type system
- Extended `AchievementReward` type to support `runestones` field
- Updated tick engine achievement processing to award both crystals and runestones

---

## Target progression timeline (optimal play, ~16h/day idle)
- First cycle to P20: ~375h (~3.3 weeks)
- Each subsequent cycle gets faster as echo upgrades boost income/combat/threshold
- Expected **~5 transcendences** before apotheosis at 50–187 echoes/transcendence
- **~6 months** to apotheosis for a dedicated player

## Test plan
- [ ] Lint, build, and test pipeline passes (100% coverage maintained)
- [ ] Prestige threshold at P0 is still 1,000,000 gold
- [ ] Prestige runs feel ~1 day long around P8–10 and get easier after
- [ ] The Absolute One is locked until prestige 20
- [ ] Transcendence at P20 awards 50 echoes (no meta upgrades)
- [ ] All 15 transcendence upgrades cost 400 echoes total
- [ ] Bosses in Zones 7+ drop 0 crystals; Zones 1–6 retain crystal drops
- [ ] Quests in Zones 9+ reward 0 crystals; Zones 1–8 retain crystal rewards
- [ ] Sunken Temple rewards more gold/essence/crystals than Witch Coven
- [ ] Essence Guild gives 2× income (stronger than Merchant Alliance 1.5×)
- [ ] Void Ascendancy costs 50M crystals
- [ ] Eternal Prism stats are click 5×, combat 3×, gold 2.5×
- [ ] Late-game bosses (primordial_titan through the_absolute_one) drop equipment on kill
- [ ] `quest_eternal` achievement requires 112 quests
- [ ] `fully_equipped` achievement requires 78 equipment pieces
- [ ] P50/P100/P150/P200 prestige achievements reward runestones
- [ ] Adventurer cards show effective post-multiplier stats
- [ ] Exploration areas unlock correctly when their zone is unlocked
- [ ] Concurrent prestige requests return 409
- [ ] No loading screen flash after prestige
- [ ] Daily challenge set always includes a clicks challenge
- [ ] Resource bar shows `+N On Prestige` runestone preview

 This PR was crafted with help from Hikari~ 🌸

Reviewed-on: #135
Co-authored-by: Hikari <hikari@nhcarrigan.com>
Co-committed-by: Hikari <hikari@nhcarrigan.com>
v0.4.0
2026-03-31 19:57:53 -07:00
naomi 9926e7f639 release: v0.3.2
CI / Lint, Build & Test (push) Successful in 1m13s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 2m17s
v0.3.2
2026-03-24 18:50:37 -07:00
hikari 6bf1ac5e7d feat: grant Elysian role on auth and prompt non-members to join (#134)
CI / Lint, Build & Test (push) Has been cancelled
Security Scan and Upload / Security & DefectDojo Upload (push) Has been cancelled
## Summary

- Grants the Elysian Discord role to players on login/registration and persists an `inGuild` flag on the Player record
- Connects to the Discord Gateway via WebSocket to keep `inGuild` in sync as players join or leave the server
- Shows a dismissible "Join our community" modal to players who are not yet in the guild
- Hardens `inGuild` exposure through the load endpoint and game context
- Moves all non-secret Discord IDs (guild, role, client, redirect URI) out of env vars and into hardcoded constants; removes them from `prod.env`

## Test plan

- [ ] Lint, build, and test pipeline passes (100% coverage maintained)
- [ ] New player auth grants Elysian role and sets `inGuild: true`
- [ ] Existing player auth re-attempts role grant and updates `inGuild`
- [ ] Join community modal appears for players not in the guild
- [ ] Modal does not reappear within the same browser session after dismissal
- [ ] Gateway correctly sets `inGuild: true/false` on member add/remove events

 This issue was created with help from Hikari~ 🌸

Reviewed-on: #134
Co-authored-by: Hikari <hikari@nhcarrigan.com>
Co-committed-by: Hikari <hikari@nhcarrigan.com>
2026-03-24 18:49:51 -07:00
hikari b48beef474 feat: sync and patch all content stats on existing saves (#130)
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m2s
CI / Lint, Build & Test (push) Successful in 1m10s
## Summary

- Sync New Content now **injects** missing entries AND **patches canonical fields** on all existing entries to match current defaults
- Adventurers: stats (baseCost, combatPower, goldPerSecond, essencePerSecond, name, class, level)
- Quests: duration, prerequisites, combat requirement, rewards
- Bosses: HP, damage, rewards, prestige requirement, upgrade rewards
- Zones: unlock conditions (boss/quest required)
- Upgrades: multiplier, costs
- Equipment: bonus, cost, set membership
- Achievements: condition, reward
- Crafting: multipliers recomputed from `craftedRecipeIds` so recipe balance changes apply retroactively

Closes #126

## Test plan

- [ ] On an existing save, click Sync New Content and verify the notification reports patched counts for all content types
- [ ] Verify that rebalanced adventurer/boss/upgrade stats are reflected in the UI after syncing
- [ ] Verify that player-owned state (counts, unlock status, boss HP, quest status) is preserved after syncing
- [ ] Verify crafting multipliers are correct after syncing if any recipes were previously crafted

 This issue was created with help from Hikari~ 🌸

Reviewed-on: #130
Co-authored-by: Hikari <hikari@nhcarrigan.com>
Co-committed-by: Hikari <hikari@nhcarrigan.com>
2026-03-24 16:01:48 -07:00
hikari 6e573bea14 chore: more feedback fixes (#129)
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m5s
CI / Lint, Build & Test (push) Successful in 1m9s
## Summary

- Fix `NaN` displayed in Sync New Content / Force Unlock notifications by guarding against undefined counts
- Poll server for exploration claimability before showing Collect button to prevent client/server desync
- Return authoritative materials list from craft API to prevent client desync causing false affordability
- Add test coverage for `sync-new-content` and `explore/claimable` endpoints

Closes #125
Closes #127
Closes #128

## Test plan

- [ ] Trigger a sync with new content and verify the notification shows a real count instead of `NaN`
- [ ] Start an exploration, wait for it to complete, and verify the Collect button only appears after the server confirms claimable
- [ ] Attempt to craft a recipe and verify the material counts in the UI update to match the server's authoritative values

 This issue was created with help from Hikari~ 🌸

Reviewed-on: #129
Co-authored-by: Hikari <hikari@nhcarrigan.com>
Co-committed-by: Hikari <hikari@nhcarrigan.com>
2026-03-24 13:20:37 -07:00
hikari 790d35420f fix: patch quest and boss rewards on sync to restore unlock conditions
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m9s
CI / Lint, Build & Test (push) Failing after 1m11s
2026-03-23 18:45:14 -07:00
naomi 9f9edae45e release: v0.3.1
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m6s
CI / Lint, Build & Test (push) Failing after 1m11s
v0.3.1
2026-03-23 18:32:15 -07:00
hikari a7a255dab6 fix: sort injected entries by canonical defaults order after sync
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m9s
CI / Lint, Build & Test (push) Failing after 1m13s
2026-03-23 18:18:59 -07:00
hikari e92cf3c9a1 feat: add sync new content debug tool
CI / Lint, Build & Test (push) Failing after 51s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m9s
Adds a new debug panel button that injects any adventurers, quests,
bosses, equipment, upgrades, achievements, zones, and exploration areas
that exist in the current game data but are missing from an existing
player save (e.g. content added after the save was first created).
2026-03-23 18:10:39 -07:00
naomi 26d30c271d release: v0.3.0
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m6s
CI / Lint, Build & Test (push) Successful in 1m11s
v0.3.0
2026-03-23 17:39:55 -07:00
hikari 34d07bec95 balance: comprehensive game balance pass (#103-#123) (#124)
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m3s
CI / Lint, Build & Test (push) Successful in 1m9s
## Summary

Comprehensive balance pass addressing 20 tickets (#103–#122) plus one audit-discovered fix (#123), ensuring no player soft-locks and aligning all content counts with achievements and progression milestones.

### Changes

- **Equipment** (#103–#111): Differentiated all stat pairs so every piece has a unique bonus combination; added missing stats to `eternal_flame` and increased `eternal_prism` multiplier to justify cost tier
- **Recipes** (#112–#115): Added 4 cross-zone crafting recipes requiring materials from multiple zones to incentivise exploration breadth
- **Achievements** (#116–#118): Aligned `fully_equipped` (40→65), `quest_eternal` (72→95), and `boss_eternal` (60→72) thresholds with actual content counts; updated `devourer_slayer` description
- **Quest CP scaling** (#120–#122): Verified and corrected combat power requirements across all zones to follow consistent 4×/4× progression pattern
- **Zone file ordering** (#123): Swapped Frozen Peaks and Shadow Marshes quest sections so file order matches the actual unlock chain (no gameplay change)

### Tickets Closed

Closes #103
Closes #104
Closes #105
Closes #106
Closes #107
Closes #108
Closes #109
Closes #110
Closes #111
Closes #112
Closes #113
Closes #114
Closes #115
Closes #116
Closes #117
Closes #118
Closes #120
Closes #121
Closes #122
Closes #123

 This PR was created with help from Hikari~ 🌸

Reviewed-on: #124
Co-authored-by: Hikari <hikari@nhcarrigan.com>
Co-committed-by: Hikari <hikari@nhcarrigan.com>
2026-03-23 17:28:29 -07:00
hikari 3ac1d566cb chore: community feedback fixes and UI improvements (#102)
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m3s
CI / Lint, Build & Test (push) Successful in 1m8s
## Summary

Addresses all community feedback tickets from the last deploy, plus several UI improvements made during the same session.

### Bug fixes & balance
- **#97** — Fix auto-adventurer tier priority: sort by combat power instead of current cost so the highest-tier affordable unit is always purchased
- **#98** — Add Dark Templar adventurer (80k CP) to bridge the Volcanic Depths progression wall; rewire upgrade and quest rewards accordingly
- **#99** — Reorder and buff Shadow Assassin (55k CP, level 12) so Witch Coven feels rewarding rather than a regression
- **#100** — Display effective Gold/s (all multipliers applied) in the resource bar
- **#101** — Add Peasant tier 2 (10x, essence) and tier 3 (50x, crystals) upgrades for meaningful late-game scaling

### Other fixes
- Sync game state to server before auto-boss challenges (matching manual challenge behaviour)
- Refresh Discord avatar hash on every game load via bot token so stale CDN URLs are corrected automatically

### UI improvements
- Replace Donate / Discord / Support / View Profile / Edit Profile buttons with a single avatar dropdown menu
- Collapse all resources except Gold into a click-to-toggle dropdown; orange alert dot appears when a hidden resource is capped

## Closes

Closes #97
Closes #98
Closes #99
Closes #100
Closes #101

Reviewed-on: #102
Co-authored-by: Hikari <hikari@nhcarrigan.com>
Co-committed-by: Hikari <hikari@nhcarrigan.com>
2026-03-23 16:07:25 -07:00
naomi 7bd6b2d3e3 release: v0.2.1
CI / Lint, Build & Test (push) Successful in 1m9s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 2m6s
v0.2.1
2026-03-20 15:23:13 -07:00
hikari 354b7e372e fix: break fire_temple combat power wall (#96)
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m13s
CI / Lint, Build & Test (push) Successful in 1m17s
Closes #95

## Summary

`void_walker` adventurers (130K combat power each) were locked behind `fire_temple`, which requires 4.8B combat power. The best adventurer available before completing that quest was `arcane_scholar` at 45K CP each — meaning players needed ~107K arcane scholars to break through, versus ~37K if they had void walkers. Classic chicken-and-egg wall.

## Changes

- Moved `void_walker` adventurer reward from `fire_temple` to `lava_flows` (the entry quest to Volcanic Depths, no CP requirement)
- Added 40M gold reward to `fire_temple` to replace the removed adventurer unlock

Players now unlock `void_walker` as soon as they enter the zone, giving them the combat power boost before they need to grind toward the temple.

 This issue was created with help from Hikari~ 🌸

Reviewed-on: #96
Co-authored-by: Hikari <hikari@nhcarrigan.com>
Co-committed-by: Hikari <hikari@nhcarrigan.com>
2026-03-20 15:17:23 -07:00
hikari dc1782bec9 chore: add auto-adventurer toggle to adventurer panel header (#94)
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m4s
CI / Lint, Build & Test (push) Successful in 1m9s
The auto-adventurer toggle is now surfaced directly in the adventurer shop panel header, mirroring the auto-boss button. It only renders when the `auto_adventurer` prestige upgrade has been purchased, so players who have not reached prestige see no change.

Closes #89

 This PR was created with help from Hikari~ 🌸

Reviewed-on: #94
Co-authored-by: Hikari <hikari@nhcarrigan.com>
Co-committed-by: Hikari <hikari@nhcarrigan.com>
2026-03-20 14:35:04 -07:00
hikari 635c630e49 fix: adventurer unlocks not applied by force-unlock tool (#93)
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m3s
CI / Lint, Build & Test (push) Successful in 1m10s
The force-unlock debug route now scans completed quests for adventurer rewards and ensures those tiers are marked as unlocked in game state.

The UI and API response type both surface the new `adventurersUnlocked` count alongside the existing zone/quest/boss/exploration counts.

Closes #88

 This PR was created with help from Hikari~ 🌸

Reviewed-on: #93
Co-authored-by: Hikari <hikari@nhcarrigan.com>
Co-committed-by: Hikari <hikari@nhcarrigan.com>
2026-03-20 10:28:17 -07:00
hikari bb60ae3390 fix: auto-quest continues after quest failure (#92)
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m1s
CI / Lint, Build & Test (push) Successful in 1m17s
## Summary

Fixes #87. When a quest failed, the tick loop detected the failure and turned auto-quest off so the "player could reassess". This meant every quest failure required the player to manually re-enable the toggle.

## Root Cause

The tick applies quest failure by resetting the quest to `status: "available"` with `lastFailedAt` set. Auto-quest picks up `available` quests automatically — so turning off auto-quest on failure was entirely unnecessary, it just broke the loop.

## Fix

Remove the auto-quest-off-on-failure block entirely. The quest returns to `available` immediately after failure, so auto-quest naturally retries on the next tick. Players can still disable it manually if they want to stop.

 This PR was created with help from Hikari~ 🌸

Reviewed-on: #92
Co-authored-by: Hikari <hikari@nhcarrigan.com>
Co-committed-by: Hikari <hikari@nhcarrigan.com>
2026-03-20 09:35:55 -07:00
hikari ee47c1e8c9 fix: auto-boss no longer halts on client/server save race condition (#91)
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m4s
CI / Lint, Build & Test (push) Successful in 1m10s
## Summary

Fixes #86. When the client state is ahead of the server save, the auto-boss tick would receive a "Boss is not currently available" error from the API. This error was already acknowledged as an expected race condition and suppressed from telemetry — but it was still setting the error state and turning auto-boss off.

## Root Cause

The `catch` handler treated all errors identically: set `autoBossError`, turn off `autoBoss`. The race-condition case should instead silently skip so the next tick can retry naturally.

## Fix

When the error is `"Boss is not currently available"`, return early from the `catch` handler. The `finally` block still runs, resetting `isAutoBossingReference.current = false`, so the next tick retries cleanly.

 This PR was created with help from Hikari~ 🌸

Reviewed-on: #91
Co-authored-by: Hikari <hikari@nhcarrigan.com>
Co-committed-by: Hikari <hikari@nhcarrigan.com>
2026-03-20 09:30:57 -07:00
hikari 2236d1dc9f fix: correct quest combat power requirements for SM, VD, and AV (#90)
CI / Lint, Build & Test (push) Successful in 1m10s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m11s
## Summary

Fixes #85. Quest combat power requirements for Shadow Marshes, Volcanic Depths, and Astral Void were all drastically too low, breaking the zone progression curve.

### Root Cause

All three zones appear to have had their `combatPowerRequired` values entered at the wrong magnitude. Shadow Marshes was using K values where M was intended; Volcanic Depths and Astral Void were similarly off, resulting in later zones being trivially easier than earlier ones.

### Changes

| Zone | Before | After |
|---|---|---|
| Shadow Marshes | 5K / 20K / 80K / 300K | 5M / 20M / 80M / 300M |
| Volcanic Depths | 2M / 8M / 30M / 120M | 1.2B / 4.8B / 18B / 72B |
| Astral Void | 50M / 200M / 800M / 3B | 300B / 1.2T / 4.8T / 18T |

### Progression

All values now maintain a consistent ~×4 multiplier within each zone and ~×4 jump between zones, matching the established pattern from Verdant Vale through Frozen Peaks.

 This PR was created with help from Hikari~ 🌸

Reviewed-on: #90
Co-authored-by: Hikari <hikari@nhcarrigan.com>
Co-committed-by: Hikari <hikari@nhcarrigan.com>
2026-03-20 09:19:16 -07:00
naomi 621f594018 release: v0.2.0
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m2s
CI / Lint, Build & Test (push) Successful in 1m7s
v0.2.0
2026-03-19 21:24:55 -07:00
hikari 1e845b14ce chore: UI clarity improvements (#84)
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m4s
CI / Lint, Build & Test (push) Successful in 1m8s
## Summary

- Move quest failure explanation to a static note above the quest list (cards now show failure % only)
- Show zone unlock requirements (boss + quest) on the Boss and Quest panels, matching the existing Exploration panel behaviour
- Display combat power per adventurer on adventurer cards, alongside gold/s and essence/s

 This issue was created with help from Hikari~ 🌸

Reviewed-on: #84
Co-authored-by: Hikari <hikari@nhcarrigan.com>
Co-committed-by: Hikari <hikari@nhcarrigan.com>
2026-03-19 21:22:13 -07:00
hikari 81ae1f18e1 chore: clarify equipment combat bonus applies to boss fights only (#83)
CI / Lint, Build & Test (push) Successful in 1m4s
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m34s
## Summary

Resolves player confusion about equipment combat bonuses not affecting quest combat power. The behaviour is by design — combat multipliers only apply to boss DPS — but this was never communicated anywhere.

- **Equipment bonus labels** now read `+X% Boss Combat` instead of `+X% Combat` (both individual items and set bonuses)
- **About panel** — both equipment entries updated to explicitly state that combat bonuses only affect boss fights, and that quest combat power is determined solely by adventurers

No game logic changed.

Closes #81

 This PR was created with help from Hikari~ 🌸

Reviewed-on: #83
Co-authored-by: Hikari <hikari@nhcarrigan.com>
Co-committed-by: Hikari <hikari@nhcarrigan.com>
2026-03-19 19:02:24 -07:00