generated from nhcarrigan/template
feat/goddess
22 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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 |
||
|
|
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) |
||
|
|
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. |
||
|
|
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) |
||
|
|
2bc47b79aa |
fix: suppress expired-token log noise and redirect expired sessions to login (#241)
## 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> |
||
|
|
3afe64e48a |
feat: comprehensive balance and bug fix pass (#240)
## 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> |
||
|
|
e7164257c5 |
feat: comprehensive balance pass (#239)
## 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 |
||
|
|
1195b657a0 |
feat: another balance and bug fix pass (#238)
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> |
||
|
|
133c81fefe
|
chore: bump schema version to 2 for v0.4.0 balance pass | ||
|
|
666a5b2d6d |
fix: runestone formula, prestige/transcendence rebalance, exploration fixes, and comprehensive balance audit (#135)
## 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> |
||
|
|
6bf1ac5e7d |
feat: grant Elysian role on auth and prompt non-members to join (#134)
## 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> |
||
|
|
b48beef474 |
feat: sync and patch all content stats on existing saves (#130)
## 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> |
||
|
|
6e573bea14 |
chore: more feedback fixes (#129)
## 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> |
||
|
|
3ac1d566cb |
chore: community feedback fixes and UI improvements (#102)
## 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> |
||
|
|
635c630e49 |
fix: adventurer unlocks not applied by force-unlock tool (#93)
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> |
||
|
|
aede55a13d |
fix: preserve runestone bounty flag for legacy defeated bosses (#67)
## Summary - Bosses defeated before `bountyRunestonesClaimed` was introduced had `status: "defeated"` but the field `undefined` - After prestige, the preservation check (`=== true`) missed these bosses, so the first-kill bounty was re-awarded on the next run - Now also treats `status === "defeated"` as proof the bounty was already earned, covering the migration case ## Test plan - [ ] Existing test: `preserves bountyRunestonesClaimed flag on bosses across prestige` β still passes - [ ] New test: `sets bountyRunestonesClaimed on bosses defeated before the flag was introduced` β covers the legacy save migration path - [ ] Full coverage maintained at 100% Closes #52 β¨ This PR was created with help from Hikari~ πΈ Reviewed-on: #67 Co-authored-by: Hikari <hikari@nhcarrigan.com> Co-committed-by: Hikari <hikari@nhcarrigan.com> |
||
|
|
03b6c847b3 |
feat: debug panel with force unlocks and hard reset (#65)
## Summary - Adds a new **Debug** tab to the game UI with two self-service tools for players with broken save state - **Force Unlocks**: scans the player's save and grants any zones, quests, bosses, and exploration areas they've earned but that are still locked β shows a breakdown of what was unlocked (or reports nothing needed fixing) - **Hard Reset**: wipes progress back to a fresh save (preserving lifetime stats), guarded behind a confirmation modal to prevent accidental clicks ## Files added - `apps/api/src/routes/debug.ts` β two POST endpoints (`/force-unlocks`, `/hard-reset`) - `apps/web/src/components/game/debugPanel.tsx` β the Debug tab UI - `apps/web/src/components/ui/confirmationModal.tsx` β reusable confirmation modal ## Files modified - `apps/api/src/index.ts` β registers the debug router - `packages/types/src/interfaces/api.ts` β adds `ForceUnlocksResponse` type - `packages/types/src/index.ts` β exports the new type - `apps/web/src/api/client.ts` β adds `forceUnlocks()` and `debugHardReset()` API calls - `apps/web/src/context/gameContext.tsx` β wires both functions into game context - `apps/web/src/components/game/gameLayout.tsx` β adds the Debug tab - `apps/web/src/styles.css` β styles for action buttons, cards, result messages, and confirmation modal β¨ This PR was created with help from Hikari~ πΈ Reviewed-on: #65 Co-authored-by: Hikari <hikari@nhcarrigan.com> Co-committed-by: Hikari <hikari@nhcarrigan.com> |
||
|
|
d0790890ee |
fix: preserve all-time stats, achievements, and boss first-kill across prestige (#47)
Resolves #37, resolves #38, and resolves #39 β three related bugs where prestige incorrectly reset data that should survive all prestige resets. ## Changes ### fix: preserve lifetime player stats across prestige (#37) After prestige, `GameState.player.lifetime*` fields were stale β they reflected values from *before* the current run. The Prisma Player record was incremented correctly, but the GameState JSON saved to the DB had old values, so the UI showed wrong all-time totals on reload. `buildPostPrestigeState` now computes the run-stat contributions (bosses defeated, quests completed, adventurers recruited, achievements unlocked, gold earned, clicks) and folds them into the fresh player object before writing the prestige state. ### fix: preserve achievements across prestige (#38) `buildPostPrestigeState` was reconstructing achievements from `defaultAchievements` (via `initialGameState`), resetting all unlocked achievements on every prestige. Achievements are now carried forward from `currentState.achievements` instead. ### fix: preserve boss first-kill state across prestige (#39) Added `bountyRunestonesClaimed?: boolean` to the `Boss` type. The boss challenge route now: - Only awards the first-kill bounty runestones if `bountyRunestonesClaimed !== true` - Sets `bountyRunestonesClaimed = true` on first defeat `buildPostPrestigeState` maps the fresh boss list and carries the `bountyRunestonesClaimed` flag forward from the current state, so the bounty is never re-awarded in subsequent prestige runs. The boss panel badge is also hidden for bosses whose bounty is already claimed. ## Test Coverage All three fixes include new tests covering the new behaviours. API coverage remains at 100%. β¨ This PR was created with help from Hikari~ πΈ Reviewed-on: #47 Co-authored-by: Hikari <hikari@nhcarrigan.com> Co-committed-by: Hikari <hikari@nhcarrigan.com> |
||
|
|
ac94f67797 |
fix: send webhook milestone notifications silently (#45)
## Summary - Adds `flags: 4096` (`MessageFlags.SUPPRESS_NOTIFICATIONS`) to the Discord webhook payload in `postMilestoneWebhook` - Milestone announcements (prestige, transcendence, apotheosis) will now appear in the channel without triggering desktop or mobile push notifications - Defines the magic number as a documented `suppressNotifications` constant for self-documentation - Updates the webhook test to assert `flags: 4096` is present in the outgoing payload Closes #41 ## Test plan - [ ] Lint passes: `pnpm lint` - [ ] Build passes: `pnpm build` - [ ] Tests pass with 100% coverage: `pnpm test` - [ ] Trigger a prestige/transcendence/apotheosis in-game and verify the Discord webhook message arrives without pinging anyone β¨ This issue was created with help from Hikari~ πΈ Reviewed-on: #45 Co-authored-by: Hikari <hikari@nhcarrigan.com> Co-committed-by: Hikari <hikari@nhcarrigan.com> |
||
|
|
a36c8e72a5 |
feat: error handling, logging, analytics, OG tags, and sticky sidebar (#44)
## Summary
- Add comprehensive try/catch error handling across all API routes, middleware, and the Hono global error handler, piping every unhandled error to the `@nhcarrigan/logger` service to prevent silent crashes and unhandled Promise rejections
- Add a `logError` utility on the frontend that forwards errors through the overridden `console.error` to the backend telemetry endpoint; apply it to every silent `catch {}` block in the game context, sound, notification, and clipboard utilities, and wrap the React tree in an `ErrorBoundary`
- Add Plausible analytics, Open Graph + Twitter Card meta tags, Tree-Nation widget, and Google Ads to `index.html`
- Make the game sidebar sticky with a `--resource-bar-height` CSS custom property offset so it stays viewport-height without overlapping the resource bar; reset sticky behaviour in the mobile responsive override
## Test plan
- [ ] Lint passes: `pnpm lint`
- [ ] Build passes: `pnpm build`
- [ ] Verify errors thrown in API routes appear in the logger service rather than crashing the process
- [ ] Verify frontend errors appear in the `/api/fe/error` backend log
- [ ] Verify Open Graph tags render correctly when sharing the URL
- [ ] Verify Plausible analytics fires on page load
- [ ] Verify Tree-Nation badge renders in the sidebar
- [ ] Verify sidebar stays fixed while the main content scrolls on desktop
- [ ] Verify mobile layout is unaffected
β¨ This issue was created with help from Hikari~ πΈ
Reviewed-on: #44
Co-authored-by: Hikari <hikari@nhcarrigan.com>
Co-committed-by: Hikari <hikari@nhcarrigan.com>
|
||
|
|
e10eabc8b5
|
fix: save character name correctly and show story on character sheet
- Load route syncs characterName from Player record so profile updates are reflected immediately on next load - Save route preserves Player record's characterName so auto-saves cannot overwrite profile updates - Public profile response now includes completedChapters - Character sheet panel displays completed story chapters with outcome - Removed stale CSS for old achievement/codex toast classes |
||
|
|
29c817230d |
feat: initial prototype β core game systems (#30)
## Summary This PR represents the full v1 prototype, implementing the core game systems for Elysium. - Full idle/clicker RPG loop: resource collection, crafting, boss fights, exploration, and quests - Adventurer hiring with batch size selector and progressive tier cost scaling - Prestige, transcendence, and apotheosis systems with auto-prestige support - Character sheet, titles, leaderboards, companion system, and daily login bonuses - Auto-quest and auto-boss toggles - Discord webhook notifications on prestige/transcendence/apotheosis - Discord role awarded on apotheosis - Responsive design and overarching story/lore system - In-game sound effects and browser notifications for key events - Support link button in the resource bar - Full test coverage (100% on `apps/api` and `packages/types`) - CI pipeline: lint β build β test ## Closes Closes #1 Closes #2 Closes #3 Closes #4 Closes #5 Closes #6 Closes #7 Closes #8 Closes #9 Closes #10 Closes #11 Closes #12 Closes #13 Closes #14 Closes #16 Closes #19 Closes #20 Closes #21 Closes #22 Closes #23 Closes #24 Closes #25 Closes #26 Closes #27 Closes #29 β¨ This issue was created with help from Hikari~ πΈ Co-authored-by: Naomi Carrigan <commits@nhcarrigan.com> Reviewed-on: #30 Co-authored-by: Hikari <hikari@nhcarrigan.com> Co-committed-by: Hikari <hikari@nhcarrigan.com> |