Files
elysium/apps/api/src/data/achievements.ts
T
hikari 666a5b2d6d
Security Scan and Upload / Security & DefectDojo Upload (push) Successful in 1m12s
CI / Lint, Build & Test (push) Successful in 1m13s
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>
2026-03-31 19:57:53 -07:00

457 lines
13 KiB
TypeScript

/**
* @file Game data definitions.
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
/* eslint-disable max-lines -- Data file */
import type { Achievement } from "@elysium/types";
export const defaultAchievements: Array<Achievement> = [
// Click milestones
{
condition: { amount: 1, type: "totalClicks" },
description: "Click the Guild Hall for the first time.",
icon: "👆",
id: "first_click",
name: "First Strike",
reward: { crystals: 5 },
unlockedAt: null,
},
{
condition: { amount: 100, type: "totalClicks" },
description: "Click the Guild Hall 100 times.",
icon: "🖱️",
id: "click_enthusiast",
name: "Click Enthusiast",
reward: { crystals: 25 },
unlockedAt: null,
},
{
condition: { amount: 1000, type: "totalClicks" },
description: "Click the Guild Hall 1,000 times.",
icon: "⚡",
id: "click_master",
name: "Click Master",
reward: { crystals: 100 },
unlockedAt: null,
},
{
condition: { amount: 10_000, type: "totalClicks" },
description: "Click the Guild Hall 10,000 times.",
icon: "🌩️",
id: "click_legend",
name: "Click Legend",
reward: { crystals: 300 },
unlockedAt: null,
},
// Gold milestones
{
condition: { amount: 100, type: "totalGoldEarned" },
description: "Earn your first 100 gold.",
icon: "🪙",
id: "first_gold",
name: "First Gold",
reward: { crystals: 5 },
unlockedAt: null,
},
{
condition: { amount: 10_000, type: "totalGoldEarned" },
description: "Earn 10,000 gold in total.",
icon: "💰",
id: "wealthy",
name: "Wealthy",
reward: { crystals: 25 },
unlockedAt: null,
},
{
condition: { amount: 1_000_000, type: "totalGoldEarned" },
description: "Earn 1,000,000 gold in total.",
icon: "👑",
id: "rich",
name: "Rich",
reward: { crystals: 100 },
unlockedAt: null,
},
{
condition: { amount: 1_000_000_000, type: "totalGoldEarned" },
description: "Earn 1,000,000,000 gold in total.",
icon: "🏦",
id: "billionaire",
name: "Billionaire",
reward: { crystals: 500 },
unlockedAt: null,
},
{
condition: { amount: 1_000_000_000_000, type: "totalGoldEarned" },
description: "Earn 1,000,000,000,000 gold in total.",
icon: "💎",
id: "trillionaire",
name: "Trillionaire",
reward: { crystals: 2000 },
unlockedAt: null,
},
// Quest milestones
{
condition: { amount: 1, type: "questsCompleted" },
description: "Complete your first quest.",
icon: "📜",
id: "first_quest",
name: "Adventurous Spirit",
reward: { crystals: 10 },
unlockedAt: null,
},
{
condition: { amount: 5, type: "questsCompleted" },
description: "Complete 5 quests.",
icon: "📚",
id: "quest_veteran",
name: "Quest Veteran",
reward: { crystals: 50 },
unlockedAt: null,
},
{
condition: { amount: 15, type: "questsCompleted" },
description: "Complete 15 quests.",
icon: "🗺️",
id: "quest_master",
name: "Quest Master",
reward: { crystals: 200 },
unlockedAt: null,
},
// Boss milestones
{
condition: { amount: 1, type: "bossesDefeated" },
description: "Defeat your first boss.",
icon: "⚔️",
id: "boss_slayer",
name: "Boss Slayer",
reward: { crystals: 25 },
unlockedAt: null,
},
{
condition: { amount: 5, type: "bossesDefeated" },
description: "Defeat 5 bosses.",
icon: "🗡️",
id: "boss_veteran",
name: "Boss Veteran",
reward: { crystals: 150 },
unlockedAt: null,
},
{
condition: { amount: 10, type: "bossesDefeated" },
description: "Defeat 10 bosses.",
icon: "🏆",
id: "legendary_hunter",
name: "Legendary Hunter",
reward: { crystals: 500 },
unlockedAt: null,
},
{
condition: { amount: 18, type: "bossesDefeated" },
description: "Defeat the 18 bosses of the mortal realms.",
icon: "🌟",
id: "devourer_slayer",
name: "World Saver",
reward: { crystals: 2000 },
unlockedAt: null,
},
// Adventurer milestones
{
condition: { amount: 50, type: "adventurerTotal" },
description: "Recruit a total of 50 adventurers.",
icon: "🏰",
id: "guild_master",
name: "Guild Master",
reward: { crystals: 50 },
unlockedAt: null,
},
{
condition: { amount: 500, type: "adventurerTotal" },
description: "Recruit a total of 500 adventurers.",
icon: "🛡️",
id: "army_commander",
name: "Army Commander",
reward: { crystals: 200 },
unlockedAt: null,
},
{
condition: { amount: 5000, type: "adventurerTotal" },
description: "Recruit a total of 5,000 adventurers.",
icon: "⚜️",
id: "army_legend",
name: "Legendary Commander",
reward: { crystals: 750 },
unlockedAt: null,
},
// Prestige milestones
{
condition: { amount: 1, type: "prestigeCount" },
description: "Prestige for the first time.",
icon: "⭐",
id: "first_prestige",
name: "Born Again",
reward: { crystals: 100 },
unlockedAt: null,
},
// Collection milestones
{
condition: { amount: 4, type: "equipmentOwned" },
description: "Acquire your first piece of boss-dropped equipment.",
icon: "🎒",
id: "collector",
name: "Collector",
reward: { crystals: 10 },
unlockedAt: null,
},
{
condition: { amount: 12, type: "equipmentOwned" },
description: "Own 12 pieces of equipment.",
icon: "🗃️",
id: "arsenal",
name: "Arsenal",
reward: { crystals: 200 },
unlockedAt: null,
},
{
condition: { amount: 25, type: "equipmentOwned" },
description: "Own 25 pieces of equipment.",
icon: "⚔️",
id: "well_armed",
name: "Well Armed",
reward: { crystals: 1000 },
unlockedAt: null,
},
{
condition: { amount: 78, type: "equipmentOwned" },
description: "Own all 78 pieces of equipment.",
icon: "🛡️",
id: "fully_equipped",
name: "Fully Equipped",
reward: { crystals: 10_000 },
unlockedAt: null,
},
// Higher click milestones
{
condition: { amount: 100_000, type: "totalClicks" },
description: "Click the Guild Hall 100,000 times.",
icon: "💥",
id: "click_obsessed",
name: "Click Obsessed",
reward: { crystals: 1000 },
unlockedAt: null,
},
{
condition: { amount: 1_000_000, type: "totalClicks" },
description: "Click the Guild Hall 1,000,000 times.",
icon: "☄️",
id: "click_deity",
name: "Click Deity",
reward: { crystals: 5000 },
unlockedAt: null,
},
// Endgame gold milestones
{
condition: { amount: 1e15, type: "totalGoldEarned" },
description: "Earn 1 quadrillion gold in total.",
icon: "✨",
id: "quadrillionaire",
name: "Quadrillionaire",
reward: { crystals: 10_000 },
unlockedAt: null,
},
{
condition: { amount: 1e18, type: "totalGoldEarned" },
description: "Earn 1 quintillion gold in total.",
icon: "🌀",
id: "void_hoarder",
name: "Void Hoarder",
reward: { crystals: 50_000 },
unlockedAt: null,
},
{
condition: { amount: 1e30, type: "totalGoldEarned" },
description: "Earn 1 nonillion gold in total.",
icon: "🌌",
id: "cosmic_wealthy",
name: "Cosmic Wealthy",
reward: { crystals: 100_000 },
unlockedAt: null,
},
{
condition: { amount: 1e60, type: "totalGoldEarned" },
description: "Earn a vigintillion gold in total.",
icon: "♾️",
id: "infinite_hoarder",
name: "Infinite Hoarder",
reward: { crystals: 250_000 },
unlockedAt: null,
},
{
condition: { amount: 1e90, type: "totalGoldEarned" },
description: "Earn a trigintillion gold in total.",
icon: "🔮",
id: "omniversal_tycoon",
name: "Omniversal Tycoon",
reward: { crystals: 1_000_000 },
unlockedAt: null,
},
// Higher quest milestones
{
condition: { amount: 30, type: "questsCompleted" },
description: "Complete 30 quests.",
icon: "🏅",
id: "quest_champion",
name: "Quest Champion",
reward: { crystals: 1000 },
unlockedAt: null,
},
{
condition: { amount: 50, type: "questsCompleted" },
description: "Complete 50 quests.",
icon: "🎖️",
id: "quest_grandmaster",
name: "Quest Grandmaster",
reward: { crystals: 5000 },
unlockedAt: null,
},
{
condition: { amount: 75, type: "questsCompleted" },
description: "Complete 75 quests.",
icon: "🌠",
id: "quest_hero",
name: "Quest Hero",
reward: { crystals: 10_000 },
unlockedAt: null,
},
{
condition: { amount: 100, type: "questsCompleted" },
description: "Complete 100 quests.",
icon: "💫",
id: "quest_legend",
name: "Quest Legend",
reward: { crystals: 15_000 },
unlockedAt: null,
},
{
condition: { amount: 112, type: "questsCompleted" },
description: "Complete all 112 quests across the known multiverse.",
icon: "🌌",
id: "quest_eternal",
name: "Quest Eternal",
reward: { crystals: 25_000 },
unlockedAt: null,
},
// Higher boss milestones
{
condition: { amount: 20, type: "bossesDefeated" },
description: "Defeat 20 bosses.",
icon: "🦁",
id: "boss_champion",
name: "Champion of the Realm",
reward: { crystals: 1000 },
unlockedAt: null,
},
{
condition: { amount: 30, type: "bossesDefeated" },
description: "Defeat 30 bosses.",
icon: "🔱",
id: "boss_grandmaster",
name: "Grandmaster Hunter",
reward: { crystals: 5000 },
unlockedAt: null,
},
{
condition: { amount: 50, type: "bossesDefeated" },
description: "Defeat 50 bosses.",
icon: "⚡",
id: "boss_legend",
name: "Legendary Vanquisher",
reward: { crystals: 15_000 },
unlockedAt: null,
},
{
condition: { amount: 72, type: "bossesDefeated" },
description: "Defeat all 72 bosses across every plane of existence.",
icon: "💀",
id: "boss_eternal",
name: "Eternal Vanquisher",
reward: { crystals: 50_000 },
unlockedAt: null,
},
// Higher adventurer milestones
{
condition: { amount: 50_000, type: "adventurerTotal" },
description: "Recruit a total of 50,000 adventurers.",
icon: "⚡",
id: "army_titan",
name: "Titan Commander",
reward: { crystals: 5000 },
unlockedAt: null,
},
// Higher prestige milestones
{
condition: { amount: 5, type: "prestigeCount" },
description: "Prestige 5 times.",
icon: "🌟",
id: "prestige_veteran",
name: "Veteran of Ages",
reward: { crystals: 1000 },
unlockedAt: null,
},
{
condition: { amount: 10, type: "prestigeCount" },
description: "Prestige 10 times.",
icon: "💫",
id: "prestige_master",
name: "Master of Cycles",
reward: { crystals: 5000 },
unlockedAt: null,
},
{
condition: { amount: 25, type: "prestigeCount" },
description: "Prestige 25 times.",
icon: "🌠",
id: "prestige_legend",
name: "Legend of Eternity",
reward: { crystals: 25_000 },
unlockedAt: null,
},
{
condition: { amount: 50, type: "prestigeCount" },
description: "Prestige 50 times.",
icon: "✨",
id: "prestige_transcendent",
name: "Transcendent",
reward: { runestones: 100 },
unlockedAt: null,
},
{
condition: { amount: 100, type: "prestigeCount" },
description: "Prestige 100 times.",
icon: "💎",
id: "prestige_eternal",
name: "Eternal Looper",
reward: { runestones: 500 },
unlockedAt: null,
},
{
condition: { amount: 150, type: "prestigeCount" },
description: "Prestige 150 times.",
icon: "🌟",
id: "prestige_immortal",
name: "Immortal Cycler",
reward: { runestones: 2000 },
unlockedAt: null,
},
{
condition: { amount: 200, type: "prestigeCount" },
description: "Prestige 200 times.",
icon: "👑",
id: "prestige_absolute",
name: "Absolute Champion",
reward: { runestones: 10_000 },
unlockedAt: null,
},
];