generated from nhcarrigan/template
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 58f411285c | |||
|
de5570b5fc
|
|||
|
133c81fefe
|
|||
|
1408e067b7
|
|||
| 666a5b2d6d |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@elysium/api",
|
||||
"version": "0.3.2",
|
||||
"version": "0.4.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "./prod/src/index.js",
|
||||
|
||||
@@ -149,7 +149,7 @@ export const defaultAchievements: Array<Achievement> = [
|
||||
},
|
||||
{
|
||||
condition: { amount: 18, type: "bossesDefeated" },
|
||||
description: "Defeat all 18 bosses across the first six zones.",
|
||||
description: "Defeat the 18 bosses of the mortal realms.",
|
||||
icon: "🌟",
|
||||
id: "devourer_slayer",
|
||||
name: "World Saver",
|
||||
@@ -223,8 +223,8 @@ export const defaultAchievements: Array<Achievement> = [
|
||||
unlockedAt: null,
|
||||
},
|
||||
{
|
||||
condition: { amount: 65, type: "equipmentOwned" },
|
||||
description: "Own all 65 pieces of equipment.",
|
||||
condition: { amount: 78, type: "equipmentOwned" },
|
||||
description: "Own all 78 pieces of equipment.",
|
||||
icon: "🛡️",
|
||||
id: "fully_equipped",
|
||||
name: "Fully Equipped",
|
||||
@@ -269,6 +269,33 @@ export const defaultAchievements: Array<Achievement> = [
|
||||
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" },
|
||||
@@ -289,8 +316,26 @@ export const defaultAchievements: Array<Achievement> = [
|
||||
unlockedAt: null,
|
||||
},
|
||||
{
|
||||
condition: { amount: 95, type: "questsCompleted" },
|
||||
description: "Complete all 95 quests across the known multiverse.",
|
||||
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",
|
||||
@@ -316,6 +361,15 @@ export const defaultAchievements: Array<Achievement> = [
|
||||
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.",
|
||||
@@ -363,4 +417,40 @@ export const defaultAchievements: Array<Achievement> = [
|
||||
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,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -26,7 +26,7 @@ export const defaultAdventurers: Array<Adventurer> = [
|
||||
combatPower: 3,
|
||||
count: 0,
|
||||
essencePerSecond: 0,
|
||||
goldPerSecond: 0.5,
|
||||
goldPerSecond: 0.7,
|
||||
id: "militia",
|
||||
level: 2,
|
||||
name: "Militia",
|
||||
@@ -129,7 +129,7 @@ export const defaultAdventurers: Array<Adventurer> = [
|
||||
unlocked: false,
|
||||
},
|
||||
{
|
||||
baseCost: 2_600_000_000,
|
||||
baseCost: 2_850_000_000,
|
||||
class: "mage",
|
||||
combatPower: 13_000,
|
||||
count: 0,
|
||||
@@ -141,7 +141,7 @@ export const defaultAdventurers: Array<Adventurer> = [
|
||||
unlocked: false,
|
||||
},
|
||||
{
|
||||
baseCost: 11_000_000_000,
|
||||
baseCost: 13_500_000_000,
|
||||
class: "rogue",
|
||||
combatPower: 28_000,
|
||||
count: 0,
|
||||
@@ -153,7 +153,7 @@ export const defaultAdventurers: Array<Adventurer> = [
|
||||
unlocked: false,
|
||||
},
|
||||
{
|
||||
baseCost: 47_000_000_000,
|
||||
baseCost: 64_000_000_000,
|
||||
class: "paladin",
|
||||
combatPower: 60_000,
|
||||
count: 0,
|
||||
@@ -165,7 +165,7 @@ export const defaultAdventurers: Array<Adventurer> = [
|
||||
unlocked: false,
|
||||
},
|
||||
{
|
||||
baseCost: 200_000_000_000,
|
||||
baseCost: 300_000_000_000,
|
||||
class: "rogue",
|
||||
combatPower: 130_000,
|
||||
count: 0,
|
||||
@@ -177,7 +177,7 @@ export const defaultAdventurers: Array<Adventurer> = [
|
||||
unlocked: false,
|
||||
},
|
||||
{
|
||||
baseCost: 1_400_000_000_000,
|
||||
baseCost: 1_800_000_000_000,
|
||||
class: "paladin",
|
||||
combatPower: 400_000,
|
||||
count: 0,
|
||||
|
||||
+130
-130
@@ -12,7 +12,7 @@ export const defaultBosses: Array<Boss> = [
|
||||
// ── Verdant Vale ──────────────────────────────────────────────────────────
|
||||
{
|
||||
bountyRunestones: 1,
|
||||
crystalReward: 0,
|
||||
crystalReward: 5,
|
||||
currentHp: 1000,
|
||||
damagePerSecond: 5,
|
||||
description:
|
||||
@@ -122,7 +122,7 @@ export const defaultBosses: Array<Boss> = [
|
||||
// ── Shadow Marshes ────────────────────────────────────────────────────────
|
||||
{
|
||||
bountyRunestones: 20,
|
||||
crystalReward: 700,
|
||||
crystalReward: 1500,
|
||||
currentHp: 6_000_000,
|
||||
damagePerSecond: 1200,
|
||||
description:
|
||||
@@ -140,7 +140,7 @@ export const defaultBosses: Array<Boss> = [
|
||||
},
|
||||
{
|
||||
bountyRunestones: 25,
|
||||
crystalReward: 1500,
|
||||
crystalReward: 3000,
|
||||
currentHp: 12_000_000,
|
||||
damagePerSecond: 2400,
|
||||
description:
|
||||
@@ -158,7 +158,7 @@ export const defaultBosses: Array<Boss> = [
|
||||
},
|
||||
{
|
||||
bountyRunestones: 30,
|
||||
crystalReward: 3000,
|
||||
crystalReward: 6000,
|
||||
currentHp: 20_000_000,
|
||||
damagePerSecond: 4000,
|
||||
description:
|
||||
@@ -226,7 +226,7 @@ export const defaultBosses: Array<Boss> = [
|
||||
name: "The Void Titan",
|
||||
prestigeRequirement: 0,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
upgradeRewards: [ "dark_templar_1" ],
|
||||
zoneId: "frozen_peaks",
|
||||
},
|
||||
// ── Volcanic Depths ───────────────────────────────────────────────────────
|
||||
@@ -353,14 +353,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "seraph_guardian",
|
||||
maxHp: 500_000_000,
|
||||
name: "The Seraph Guardian",
|
||||
prestigeRequirement: 6,
|
||||
prestigeRequirement: 1,
|
||||
status: "locked",
|
||||
upgradeRewards: [ "click_4" ],
|
||||
zoneId: "celestial_reaches",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 40,
|
||||
crystalReward: 40_000,
|
||||
crystalReward: 0,
|
||||
currentHp: 2_000_000_000,
|
||||
damagePerSecond: 120_000,
|
||||
description:
|
||||
@@ -371,14 +371,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "fallen_archangel",
|
||||
maxHp: 2_000_000_000,
|
||||
name: "The Fallen Archangel",
|
||||
prestigeRequirement: 7,
|
||||
prestigeRequirement: 2,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
zoneId: "celestial_reaches",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 50,
|
||||
crystalReward: 100_000,
|
||||
crystalReward: 0,
|
||||
currentHp: 8_000_000_000,
|
||||
damagePerSecond: 350_000,
|
||||
description:
|
||||
@@ -389,14 +389,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "divine_judge",
|
||||
maxHp: 8_000_000_000,
|
||||
name: "The Divine Judge",
|
||||
prestigeRequirement: 8,
|
||||
prestigeRequirement: 2,
|
||||
status: "locked",
|
||||
upgradeRewards: [ "divine_covenant" ],
|
||||
zoneId: "celestial_reaches",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 60,
|
||||
crystalReward: 300_000,
|
||||
crystalReward: 0,
|
||||
currentHp: 30_000_000_000,
|
||||
damagePerSecond: 1_000_000,
|
||||
description:
|
||||
@@ -407,14 +407,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "celestial_titan",
|
||||
maxHp: 30_000_000_000,
|
||||
name: "The Celestial Titan",
|
||||
prestigeRequirement: 9,
|
||||
prestigeRequirement: 2,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
zoneId: "celestial_reaches",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 75,
|
||||
crystalReward: 800_000,
|
||||
crystalReward: 0,
|
||||
currentHp: 100_000_000_000,
|
||||
damagePerSecond: 3_000_000,
|
||||
description:
|
||||
@@ -425,7 +425,7 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "the_first_light",
|
||||
maxHp: 100_000_000_000,
|
||||
name: "The First Light",
|
||||
prestigeRequirement: 10,
|
||||
prestigeRequirement: 2,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
zoneId: "celestial_reaches",
|
||||
@@ -433,7 +433,7 @@ export const defaultBosses: Array<Boss> = [
|
||||
// ── Abyssal Trench ────────────────────────────────────────────────────────
|
||||
{
|
||||
bountyRunestones: 40,
|
||||
crystalReward: 1_500_000,
|
||||
crystalReward: 0,
|
||||
currentHp: 250_000_000_000,
|
||||
damagePerSecond: 5_000_000,
|
||||
description:
|
||||
@@ -444,14 +444,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "depth_leviathan",
|
||||
maxHp: 250_000_000_000,
|
||||
name: "The Depth Leviathan",
|
||||
prestigeRequirement: 9,
|
||||
prestigeRequirement: 2,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
zoneId: "abyssal_trench",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 55,
|
||||
crystalReward: 4_000_000,
|
||||
crystalReward: 0,
|
||||
currentHp: 1_000_000_000_000,
|
||||
damagePerSecond: 15_000_000,
|
||||
description:
|
||||
@@ -462,14 +462,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "kraken_elder",
|
||||
maxHp: 1_000_000_000_000,
|
||||
name: "The Elder Kraken",
|
||||
prestigeRequirement: 10,
|
||||
prestigeRequirement: 2,
|
||||
status: "locked",
|
||||
upgradeRewards: [ "abyssal_pact" ],
|
||||
zoneId: "abyssal_trench",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 70,
|
||||
crystalReward: 12_000_000,
|
||||
crystalReward: 0,
|
||||
currentHp: 4_000_000_000_000,
|
||||
damagePerSecond: 50_000_000,
|
||||
description:
|
||||
@@ -480,14 +480,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "abyssal_colossus",
|
||||
maxHp: 4_000_000_000_000,
|
||||
name: "The Abyssal Colossus",
|
||||
prestigeRequirement: 11,
|
||||
prestigeRequirement: 2,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
zoneId: "abyssal_trench",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 85,
|
||||
crystalReward: 40_000_000,
|
||||
crystalReward: 0,
|
||||
currentHp: 15_000_000_000_000,
|
||||
damagePerSecond: 150_000_000,
|
||||
description:
|
||||
@@ -498,14 +498,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "the_deep_one",
|
||||
maxHp: 15_000_000_000_000,
|
||||
name: "The Deep One",
|
||||
prestigeRequirement: 12,
|
||||
prestigeRequirement: 3,
|
||||
status: "locked",
|
||||
upgradeRewards: [ "global_4" ],
|
||||
zoneId: "abyssal_trench",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 100,
|
||||
crystalReward: 150_000_000,
|
||||
crystalReward: 0,
|
||||
currentHp: 50_000_000_000_000,
|
||||
damagePerSecond: 500_000_000,
|
||||
description:
|
||||
@@ -516,7 +516,7 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "elder_abomination",
|
||||
maxHp: 50_000_000_000_000,
|
||||
name: "The Elder Abomination",
|
||||
prestigeRequirement: 13,
|
||||
prestigeRequirement: 3,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
zoneId: "abyssal_trench",
|
||||
@@ -524,7 +524,7 @@ export const defaultBosses: Array<Boss> = [
|
||||
// ── Infernal Court ────────────────────────────────────────────────────────
|
||||
{
|
||||
bountyRunestones: 55,
|
||||
crystalReward: 350_000_000,
|
||||
crystalReward: 0,
|
||||
currentHp: 120_000_000_000_000,
|
||||
damagePerSecond: 800_000_000,
|
||||
description:
|
||||
@@ -535,14 +535,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "demon_prince",
|
||||
maxHp: 120_000_000_000_000,
|
||||
name: "The Demon Prince",
|
||||
prestigeRequirement: 12,
|
||||
prestigeRequirement: 3,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
zoneId: "infernal_court",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 70,
|
||||
crystalReward: 1_000_000_000,
|
||||
crystalReward: 0,
|
||||
currentHp: 500_000_000_000_000,
|
||||
damagePerSecond: 2_500_000_000,
|
||||
description:
|
||||
@@ -553,14 +553,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "hellfire_titan",
|
||||
maxHp: 500_000_000_000_000,
|
||||
name: "The Hellfire Titan",
|
||||
prestigeRequirement: 13,
|
||||
prestigeRequirement: 3,
|
||||
status: "locked",
|
||||
upgradeRewards: [ "celestial_mandate" ],
|
||||
zoneId: "infernal_court",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 90,
|
||||
crystalReward: 3_000_000_000,
|
||||
crystalReward: 0,
|
||||
currentHp: 2_000_000_000_000_000,
|
||||
damagePerSecond: 8_000_000_000,
|
||||
description:
|
||||
@@ -571,14 +571,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "lord_of_sin",
|
||||
maxHp: 2_000_000_000_000_000,
|
||||
name: "The Lord of Sin",
|
||||
prestigeRequirement: 14,
|
||||
prestigeRequirement: 3,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
zoneId: "infernal_court",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 110,
|
||||
crystalReward: 10_000_000_000,
|
||||
crystalReward: 0,
|
||||
currentHp: 6_000_000_000_000_000,
|
||||
damagePerSecond: 25_000_000_000,
|
||||
description:
|
||||
@@ -589,14 +589,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "infernal_sovereign",
|
||||
maxHp: 6_000_000_000_000_000,
|
||||
name: "The Infernal Sovereign",
|
||||
prestigeRequirement: 15,
|
||||
prestigeRequirement: 3,
|
||||
status: "locked",
|
||||
upgradeRewards: [ "click_5" ],
|
||||
zoneId: "infernal_court",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 135,
|
||||
crystalReward: 30_000_000_000,
|
||||
crystalReward: 0,
|
||||
currentHp: 8_000_000_000_000_000,
|
||||
damagePerSecond: 80_000_000_000,
|
||||
description:
|
||||
@@ -607,7 +607,7 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "the_fallen",
|
||||
maxHp: 8_000_000_000_000_000,
|
||||
name: "The Fallen",
|
||||
prestigeRequirement: 16,
|
||||
prestigeRequirement: 4,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
zoneId: "infernal_court",
|
||||
@@ -615,7 +615,7 @@ export const defaultBosses: Array<Boss> = [
|
||||
// ── Crystalline Spire ─────────────────────────────────────────────────────
|
||||
{
|
||||
bountyRunestones: 70,
|
||||
crystalReward: 8e10,
|
||||
crystalReward: 0,
|
||||
currentHp: 2e16,
|
||||
damagePerSecond: 120_000_000_000,
|
||||
description:
|
||||
@@ -626,14 +626,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "prism_golem",
|
||||
maxHp: 2e16,
|
||||
name: "The Prism Golem",
|
||||
prestigeRequirement: 15,
|
||||
prestigeRequirement: 3,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
upgradeRewards: [ "crystal_sage_1" ],
|
||||
zoneId: "crystalline_spire",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 90,
|
||||
crystalReward: 3e11,
|
||||
crystalReward: 0,
|
||||
currentHp: 8e16,
|
||||
damagePerSecond: 4e11,
|
||||
description:
|
||||
@@ -644,14 +644,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "crystal_drake",
|
||||
maxHp: 8e16,
|
||||
name: "The Crystal Drake",
|
||||
prestigeRequirement: 16,
|
||||
prestigeRequirement: 4,
|
||||
status: "locked",
|
||||
upgradeRewards: [ "void_ascendancy" ],
|
||||
zoneId: "crystalline_spire",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 115,
|
||||
crystalReward: 1e12,
|
||||
crystalReward: 0,
|
||||
currentHp: 3e17,
|
||||
damagePerSecond: 1.2e12,
|
||||
description:
|
||||
@@ -662,14 +662,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "the_faceted",
|
||||
maxHp: 3e17,
|
||||
name: "The Faceted",
|
||||
prestigeRequirement: 17,
|
||||
prestigeRequirement: 4,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
upgradeRewards: [ "void_sentinel_1" ],
|
||||
zoneId: "crystalline_spire",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 140,
|
||||
crystalReward: 4e12,
|
||||
crystalReward: 0,
|
||||
currentHp: 1e18,
|
||||
damagePerSecond: 4e12,
|
||||
description:
|
||||
@@ -680,14 +680,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "diamond_colossus",
|
||||
maxHp: 1e18,
|
||||
name: "The Diamond Colossus",
|
||||
prestigeRequirement: 18,
|
||||
prestigeRequirement: 4,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
upgradeRewards: [ "eternal_champion_1" ],
|
||||
zoneId: "crystalline_spire",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 175,
|
||||
crystalReward: 1.5e13,
|
||||
crystalReward: 0,
|
||||
currentHp: 4e18,
|
||||
damagePerSecond: 1.5e13,
|
||||
description:
|
||||
@@ -698,15 +698,15 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "crystal_sovereign",
|
||||
maxHp: 4e18,
|
||||
name: "The Crystal Sovereign",
|
||||
prestigeRequirement: 19,
|
||||
prestigeRequirement: 4,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
upgradeRewards: [ "cosmos_knight_1" ],
|
||||
zoneId: "crystalline_spire",
|
||||
},
|
||||
// ── Void Sanctum ──────────────────────────────────────────────────────────
|
||||
{
|
||||
bountyRunestones: 90,
|
||||
crystalReward: 4e13,
|
||||
crystalReward: 0,
|
||||
currentHp: 1e19,
|
||||
damagePerSecond: 4e13,
|
||||
description:
|
||||
@@ -717,14 +717,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "void_herald",
|
||||
maxHp: 1e19,
|
||||
name: "The Void Herald",
|
||||
prestigeRequirement: 18,
|
||||
prestigeRequirement: 4,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
upgradeRewards: [ "seraph_knight_1" ],
|
||||
zoneId: "void_sanctum",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 115,
|
||||
crystalReward: 1.5e14,
|
||||
crystalReward: 0,
|
||||
currentHp: 5e19,
|
||||
damagePerSecond: 1.5e14,
|
||||
description:
|
||||
@@ -735,14 +735,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "eternal_shade",
|
||||
maxHp: 5e19,
|
||||
name: "The Eternal Shade",
|
||||
prestigeRequirement: 19,
|
||||
prestigeRequirement: 4,
|
||||
status: "locked",
|
||||
upgradeRewards: [ "divine_harmony" ],
|
||||
zoneId: "void_sanctum",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 145,
|
||||
crystalReward: 5e14,
|
||||
crystalReward: 0,
|
||||
currentHp: 2e20,
|
||||
damagePerSecond: 5e14,
|
||||
description:
|
||||
@@ -753,14 +753,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "the_unmaker",
|
||||
maxHp: 2e20,
|
||||
name: "The Unmaker",
|
||||
prestigeRequirement: 20,
|
||||
prestigeRequirement: 5,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
upgradeRewards: [ "abyss_diver_1" ],
|
||||
zoneId: "void_sanctum",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 180,
|
||||
crystalReward: 2e15,
|
||||
crystalReward: 0,
|
||||
currentHp: 8e20,
|
||||
damagePerSecond: 2e15,
|
||||
description:
|
||||
@@ -771,14 +771,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "void_progenitor",
|
||||
maxHp: 8e20,
|
||||
name: "The Void Progenitor",
|
||||
prestigeRequirement: 21,
|
||||
prestigeRequirement: 5,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
zoneId: "void_sanctum",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 225,
|
||||
crystalReward: 8e15,
|
||||
crystalReward: 0,
|
||||
currentHp: 3e21,
|
||||
damagePerSecond: 8e15,
|
||||
description:
|
||||
@@ -789,15 +789,15 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "void_emperor",
|
||||
maxHp: 3e21,
|
||||
name: "The Void Emperor",
|
||||
prestigeRequirement: 22,
|
||||
prestigeRequirement: 5,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
upgradeRewards: [ "infernal_warden_1" ],
|
||||
zoneId: "void_sanctum",
|
||||
},
|
||||
// ── Eternal Throne ────────────────────────────────────────────────────────
|
||||
{
|
||||
bountyRunestones: 115,
|
||||
crystalReward: 2e16,
|
||||
crystalReward: 0,
|
||||
currentHp: 1e22,
|
||||
damagePerSecond: 2e16,
|
||||
description:
|
||||
@@ -808,14 +808,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "throne_warden",
|
||||
maxHp: 1e22,
|
||||
name: "The Throne Warden",
|
||||
prestigeRequirement: 21,
|
||||
prestigeRequirement: 5,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
upgradeRewards: [ "infinity_ranger_1" ],
|
||||
zoneId: "eternal_throne",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 150,
|
||||
crystalReward: 8e16,
|
||||
crystalReward: 0,
|
||||
currentHp: 5e22,
|
||||
damagePerSecond: 8e16,
|
||||
description:
|
||||
@@ -826,14 +826,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "eternal_knight",
|
||||
maxHp: 5e22,
|
||||
name: "The Eternal Knight",
|
||||
prestigeRequirement: 22,
|
||||
prestigeRequirement: 5,
|
||||
status: "locked",
|
||||
upgradeRewards: [ "infernal_fury" ],
|
||||
zoneId: "eternal_throne",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 190,
|
||||
crystalReward: 3e17,
|
||||
crystalReward: 0,
|
||||
currentHp: 2e23,
|
||||
damagePerSecond: 3e17,
|
||||
description:
|
||||
@@ -844,14 +844,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "the_undying",
|
||||
maxHp: 2e23,
|
||||
name: "The Undying",
|
||||
prestigeRequirement: 23,
|
||||
prestigeRequirement: 5,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
upgradeRewards: [ "reality_warden_1" ],
|
||||
zoneId: "eternal_throne",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 235,
|
||||
crystalReward: 1.2e18,
|
||||
crystalReward: 0,
|
||||
currentHp: 8e23,
|
||||
damagePerSecond: 1.2e18,
|
||||
description:
|
||||
@@ -862,14 +862,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "apex_sovereign",
|
||||
maxHp: 8e23,
|
||||
name: "The Apex Sovereign",
|
||||
prestigeRequirement: 24,
|
||||
prestigeRequirement: 5,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
zoneId: "eternal_throne",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 295,
|
||||
crystalReward: 5e18,
|
||||
crystalReward: 0,
|
||||
currentHp: 3e24,
|
||||
damagePerSecond: 5e18,
|
||||
description:
|
||||
@@ -880,7 +880,7 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "the_apex",
|
||||
maxHp: 3e24,
|
||||
name: "The Apex",
|
||||
prestigeRequirement: 25,
|
||||
prestigeRequirement: 6,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
zoneId: "eternal_throne",
|
||||
@@ -888,7 +888,7 @@ export const defaultBosses: Array<Boss> = [
|
||||
// ── Primordial Chaos ──────────────────────────────────────────────────────
|
||||
{
|
||||
bountyRunestones: 150,
|
||||
crystalReward: 2e20,
|
||||
crystalReward: 0,
|
||||
currentHp: 1e26,
|
||||
damagePerSecond: 2e20,
|
||||
description:
|
||||
@@ -899,14 +899,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "chaos_wyrm",
|
||||
maxHp: 1e26,
|
||||
name: "The Chaos Wyrm",
|
||||
prestigeRequirement: 26,
|
||||
prestigeRequirement: 6,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
zoneId: "primordial_chaos",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 200,
|
||||
crystalReward: 8e21,
|
||||
crystalReward: 0,
|
||||
currentHp: 5e27,
|
||||
damagePerSecond: 8e21,
|
||||
description:
|
||||
@@ -917,14 +917,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "creation_engine",
|
||||
maxHp: 5e27,
|
||||
name: "The Creation Engine",
|
||||
prestigeRequirement: 27,
|
||||
prestigeRequirement: 6,
|
||||
status: "locked",
|
||||
upgradeRewards: [ "aether_weaver_1" ],
|
||||
zoneId: "primordial_chaos",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 265,
|
||||
crystalReward: 4e23,
|
||||
crystalReward: 0,
|
||||
currentHp: 2e29,
|
||||
damagePerSecond: 4e23,
|
||||
description:
|
||||
@@ -935,14 +935,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "entropy_avatar",
|
||||
maxHp: 2e29,
|
||||
name: "The Entropy Avatar",
|
||||
prestigeRequirement: 29,
|
||||
prestigeRequirement: 7,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
zoneId: "primordial_chaos",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 350,
|
||||
crystalReward: 2e25,
|
||||
crystalReward: 0,
|
||||
currentHp: 8e30,
|
||||
damagePerSecond: 2e25,
|
||||
description:
|
||||
@@ -953,7 +953,7 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "primordial_titan",
|
||||
maxHp: 8e30,
|
||||
name: "The Primordial Titan",
|
||||
prestigeRequirement: 31,
|
||||
prestigeRequirement: 7,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
zoneId: "primordial_chaos",
|
||||
@@ -961,7 +961,7 @@ export const defaultBosses: Array<Boss> = [
|
||||
// ── Infinite Expanse ──────────────────────────────────────────────────────
|
||||
{
|
||||
bountyRunestones: 200,
|
||||
crystalReward: 8e27,
|
||||
crystalReward: 0,
|
||||
currentHp: 3e33,
|
||||
damagePerSecond: 8e27,
|
||||
description:
|
||||
@@ -972,15 +972,15 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "expanse_drifter",
|
||||
maxHp: 3e33,
|
||||
name: "The Expanse Drifter",
|
||||
prestigeRequirement: 33,
|
||||
prestigeRequirement: 8,
|
||||
status: "locked",
|
||||
upgradeRewards: [ "titan_warrior_1" ],
|
||||
zoneId: "infinite_expanse",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 265,
|
||||
crystalReward: 3e31,
|
||||
currentHp: 1e37,
|
||||
crystalReward: 0,
|
||||
currentHp: 2e35,
|
||||
damagePerSecond: 3e31,
|
||||
description:
|
||||
"A creature as wide as the observable universe — which, in the Expanse, is not a helpful measurement. It is simply everywhere the horizon is, which in this place is everywhere.",
|
||||
@@ -988,17 +988,17 @@ export const defaultBosses: Array<Boss> = [
|
||||
essenceReward: 1e34,
|
||||
goldReward: 1e38,
|
||||
id: "horizon_beast",
|
||||
maxHp: 1e37,
|
||||
maxHp: 2e35,
|
||||
name: "The Horizon Beast",
|
||||
prestigeRequirement: 35,
|
||||
prestigeRequirement: 8,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
upgradeRewards: [ "oblivion_paladin_1" ],
|
||||
zoneId: "infinite_expanse",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 350,
|
||||
crystalReward: 1e35,
|
||||
currentHp: 5e40,
|
||||
crystalReward: 0,
|
||||
currentHp: 5e37,
|
||||
damagePerSecond: 1e35,
|
||||
description:
|
||||
"A self-replicating intelligence that has filled the Expanse with copies of itself. Every copy has the same purpose: to be the last thing in the Expanse. Your guild will need to convince all of them otherwise.",
|
||||
@@ -1006,17 +1006,17 @@ export const defaultBosses: Array<Boss> = [
|
||||
essenceReward: 5e37,
|
||||
goldReward: 5e41,
|
||||
id: "infinity_construct",
|
||||
maxHp: 5e40,
|
||||
maxHp: 5e37,
|
||||
name: "The Infinity Construct",
|
||||
prestigeRequirement: 37,
|
||||
prestigeRequirement: 8,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
zoneId: "infinite_expanse",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 465,
|
||||
crystalReward: 5e38,
|
||||
currentHp: 2e44,
|
||||
crystalReward: 0,
|
||||
currentHp: 3e39,
|
||||
damagePerSecond: 5e38,
|
||||
description:
|
||||
"The thing that claims the Infinite Expanse as its territory — which, given the name of the place, is an ambitious claim. It enforces this claim with power that has had infinite space to accumulate.",
|
||||
@@ -1024,9 +1024,9 @@ export const defaultBosses: Array<Boss> = [
|
||||
essenceReward: 2e41,
|
||||
goldReward: 2e45,
|
||||
id: "expanse_sovereign",
|
||||
maxHp: 2e44,
|
||||
maxHp: 3e39,
|
||||
name: "The Expanse Sovereign",
|
||||
prestigeRequirement: 39,
|
||||
prestigeRequirement: 9,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
zoneId: "infinite_expanse",
|
||||
@@ -1034,7 +1034,7 @@ export const defaultBosses: Array<Boss> = [
|
||||
// ── Reality Forge ─────────────────────────────────────────────────────────
|
||||
{
|
||||
bountyRunestones: 265,
|
||||
crystalReward: 2e42,
|
||||
crystalReward: 0,
|
||||
currentHp: 8e47,
|
||||
damagePerSecond: 2e42,
|
||||
description:
|
||||
@@ -1045,14 +1045,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "forge_guardian",
|
||||
maxHp: 8e47,
|
||||
name: "The Forge Guardian",
|
||||
prestigeRequirement: 41,
|
||||
prestigeRequirement: 9,
|
||||
status: "locked",
|
||||
upgradeRewards: [ "nexus_sage_1" ],
|
||||
zoneId: "reality_forge",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 350,
|
||||
crystalReward: 1e47,
|
||||
crystalReward: 0,
|
||||
currentHp: 4e52,
|
||||
damagePerSecond: 1e47,
|
||||
description:
|
||||
@@ -1063,14 +1063,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "reality_shaper",
|
||||
maxHp: 4e52,
|
||||
name: "The Reality Shaper",
|
||||
prestigeRequirement: 44,
|
||||
prestigeRequirement: 10,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
zoneId: "reality_forge",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 465,
|
||||
crystalReward: 6e51,
|
||||
crystalReward: 0,
|
||||
currentHp: 2e57,
|
||||
damagePerSecond: 6e51,
|
||||
description:
|
||||
@@ -1081,14 +1081,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "creation_prime",
|
||||
maxHp: 2e57,
|
||||
name: "The Creation Prime",
|
||||
prestigeRequirement: 47,
|
||||
prestigeRequirement: 11,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
zoneId: "reality_forge",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 615,
|
||||
crystalReward: 2e56,
|
||||
crystalReward: 0,
|
||||
currentHp: 8e61,
|
||||
damagePerSecond: 2e56,
|
||||
description:
|
||||
@@ -1099,7 +1099,7 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "reality_architect",
|
||||
maxHp: 8e61,
|
||||
name: "The Reality Architect",
|
||||
prestigeRequirement: 49,
|
||||
prestigeRequirement: 11,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
zoneId: "reality_forge",
|
||||
@@ -1107,7 +1107,7 @@ export const defaultBosses: Array<Boss> = [
|
||||
// ── Cosmic Maelstrom ──────────────────────────────────────────────────────
|
||||
{
|
||||
bountyRunestones: 350,
|
||||
crystalReward: 1e60,
|
||||
crystalReward: 0,
|
||||
currentHp: 4e65,
|
||||
damagePerSecond: 1e60,
|
||||
description:
|
||||
@@ -1118,14 +1118,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "storm_colossus",
|
||||
maxHp: 4e65,
|
||||
name: "The Storm Colossus",
|
||||
prestigeRequirement: 51,
|
||||
prestigeRequirement: 12,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
zoneId: "cosmic_maelstrom",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 465,
|
||||
crystalReward: 6e65,
|
||||
crystalReward: 0,
|
||||
currentHp: 2e71,
|
||||
damagePerSecond: 6e65,
|
||||
description:
|
||||
@@ -1136,14 +1136,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "force_prime",
|
||||
maxHp: 2e71,
|
||||
name: "The Force Prime",
|
||||
prestigeRequirement: 54,
|
||||
prestigeRequirement: 12,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
zoneId: "cosmic_maelstrom",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 615,
|
||||
crystalReward: 3e71,
|
||||
crystalReward: 0,
|
||||
currentHp: 1e77,
|
||||
damagePerSecond: 3e71,
|
||||
description:
|
||||
@@ -1154,14 +1154,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "maelstrom_god",
|
||||
maxHp: 1e77,
|
||||
name: "The Maelstrom God",
|
||||
prestigeRequirement: 57,
|
||||
prestigeRequirement: 13,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
upgradeRewards: [ "transcendent_rogue_1" ],
|
||||
zoneId: "cosmic_maelstrom",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 815,
|
||||
crystalReward: 1e77,
|
||||
crystalReward: 0,
|
||||
currentHp: 5e82,
|
||||
damagePerSecond: 1e77,
|
||||
description:
|
||||
@@ -1172,7 +1172,7 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "cosmic_annihilator",
|
||||
maxHp: 5e82,
|
||||
name: "The Cosmic Annihilator",
|
||||
prestigeRequirement: 59,
|
||||
prestigeRequirement: 13,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
zoneId: "cosmic_maelstrom",
|
||||
@@ -1180,7 +1180,7 @@ export const defaultBosses: Array<Boss> = [
|
||||
// ── Primeval Sanctum ──────────────────────────────────────────────────────
|
||||
{
|
||||
bountyRunestones: 465,
|
||||
crystalReward: 5e82,
|
||||
crystalReward: 0,
|
||||
currentHp: 2e88,
|
||||
damagePerSecond: 5e82,
|
||||
description:
|
||||
@@ -1191,14 +1191,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "ancient_sentinel",
|
||||
maxHp: 2e88,
|
||||
name: "The Ancient Sentinel",
|
||||
prestigeRequirement: 61,
|
||||
prestigeRequirement: 14,
|
||||
status: "locked",
|
||||
upgradeRewards: [ "astral_sovereign_1" ],
|
||||
zoneId: "primeval_sanctum",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 615,
|
||||
crystalReward: 3e89,
|
||||
crystalReward: 0,
|
||||
currentHp: 1e95,
|
||||
damagePerSecond: 3e89,
|
||||
description:
|
||||
@@ -1209,14 +1209,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "time_elder",
|
||||
maxHp: 1e95,
|
||||
name: "The Time Elder",
|
||||
prestigeRequirement: 65,
|
||||
prestigeRequirement: 15,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
zoneId: "primeval_sanctum",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 815,
|
||||
crystalReward: 2e96,
|
||||
crystalReward: 0,
|
||||
currentHp: 8e101,
|
||||
damagePerSecond: 2e96,
|
||||
description:
|
||||
@@ -1227,14 +1227,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "origin_beast",
|
||||
maxHp: 8e101,
|
||||
name: "The Origin Beast",
|
||||
prestigeRequirement: 69,
|
||||
prestigeRequirement: 16,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
zoneId: "primeval_sanctum",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 1080,
|
||||
crystalReward: 1e103,
|
||||
crystalReward: 0,
|
||||
currentHp: 5e108,
|
||||
damagePerSecond: 1e103,
|
||||
description:
|
||||
@@ -1245,7 +1245,7 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "primeval_god",
|
||||
maxHp: 5e108,
|
||||
name: "The Primeval God",
|
||||
prestigeRequirement: 74,
|
||||
prestigeRequirement: 17,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
zoneId: "primeval_sanctum",
|
||||
@@ -1253,7 +1253,7 @@ export const defaultBosses: Array<Boss> = [
|
||||
// ── The Absolute ──────────────────────────────────────────────────────────
|
||||
{
|
||||
bountyRunestones: 615,
|
||||
crystalReward: 5e110,
|
||||
crystalReward: 0,
|
||||
currentHp: 2e116,
|
||||
damagePerSecond: 5e110,
|
||||
description:
|
||||
@@ -1264,14 +1264,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "absolute_herald",
|
||||
maxHp: 2e116,
|
||||
name: "The Absolute Herald",
|
||||
prestigeRequirement: 76,
|
||||
prestigeRequirement: 17,
|
||||
status: "locked",
|
||||
upgradeRewards: [ "primordial_mage_1" ],
|
||||
zoneId: "the_absolute",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 815,
|
||||
crystalReward: 3e119,
|
||||
crystalReward: 0,
|
||||
currentHp: 1e125,
|
||||
damagePerSecond: 3e119,
|
||||
description:
|
||||
@@ -1282,14 +1282,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "void_convergence",
|
||||
maxHp: 1e125,
|
||||
name: "The Void Convergence",
|
||||
prestigeRequirement: 79,
|
||||
prestigeRequirement: 18,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
zoneId: "the_absolute",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 1080,
|
||||
crystalReward: 1e129,
|
||||
crystalReward: 0,
|
||||
currentHp: 5e134,
|
||||
damagePerSecond: 1e129,
|
||||
description:
|
||||
@@ -1300,14 +1300,14 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "eternal_end",
|
||||
maxHp: 5e134,
|
||||
name: "The Eternal End",
|
||||
prestigeRequirement: 83,
|
||||
prestigeRequirement: 19,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
upgradeRewards: [ "omniversal_champion_1" ],
|
||||
zoneId: "the_absolute",
|
||||
},
|
||||
{
|
||||
bountyRunestones: 1430,
|
||||
crystalReward: 5e139,
|
||||
crystalReward: 0,
|
||||
currentHp: 2e145,
|
||||
damagePerSecond: 5e139,
|
||||
description:
|
||||
@@ -1318,7 +1318,7 @@ export const defaultBosses: Array<Boss> = [
|
||||
id: "the_absolute_one",
|
||||
maxHp: 2e145,
|
||||
name: "The Absolute One",
|
||||
prestigeRequirement: 88,
|
||||
prestigeRequirement: 20,
|
||||
status: "locked",
|
||||
upgradeRewards: [],
|
||||
zoneId: "the_absolute",
|
||||
|
||||
@@ -269,7 +269,7 @@ export const defaultEquipment: Array<Equipment> = [
|
||||
type: "trinket",
|
||||
},
|
||||
{
|
||||
bonus: { clickMultiplier: 1.55, goldMultiplier: 1.1 },
|
||||
bonus: { clickMultiplier: 1.65, goldMultiplier: 1.2 },
|
||||
description:
|
||||
"A fragment of the Mud Kraken's crystallised essence. Focuses raw power into devastating strikes.",
|
||||
equipped: false,
|
||||
@@ -305,9 +305,9 @@ export const defaultEquipment: Array<Equipment> = [
|
||||
type: "trinket",
|
||||
},
|
||||
{
|
||||
bonus: { clickMultiplier: 2.25, goldMultiplier: 1.25 },
|
||||
bonus: { clickMultiplier: 2.5, goldMultiplier: 1.4 },
|
||||
description:
|
||||
"The legendary stone that grants mastery over gold and combat alike.",
|
||||
"The legendary stone that transmutes effort into wealth — every action fills the coffers.",
|
||||
equipped: false,
|
||||
id: "philosophers_stone",
|
||||
name: "Philosopher's Stone",
|
||||
@@ -695,9 +695,171 @@ export const defaultEquipment: Array<Equipment> = [
|
||||
setId: "eternal_throne",
|
||||
type: "trinket",
|
||||
},
|
||||
// ── Primordial Chaos ──────────────────────────────────────────────────────
|
||||
{
|
||||
bonus: { goldMultiplier: 9 },
|
||||
description:
|
||||
"The Primordial Titan's carapace — formed before the concept of armour existed. It simply is what armour aspires to be.",
|
||||
equipped: false,
|
||||
id: "chaos_mantle",
|
||||
name: "The Chaos Mantle",
|
||||
owned: false,
|
||||
rarity: "legendary",
|
||||
setId: "primordial_chaos",
|
||||
type: "armour",
|
||||
},
|
||||
{
|
||||
bonus: { clickMultiplier: 5, combatMultiplier: 2, goldMultiplier: 2.5 },
|
||||
description:
|
||||
"The crystallised core of the Titan itself — the first stable thing to emerge from chaos. It radiates in every direction simultaneously.",
|
||||
equipped: false,
|
||||
id: "titan_core",
|
||||
name: "The Titan Core",
|
||||
owned: false,
|
||||
rarity: "legendary",
|
||||
setId: "primordial_chaos",
|
||||
type: "trinket",
|
||||
},
|
||||
// ── Infinite Expanse ──────────────────────────────────────────────────────
|
||||
{
|
||||
bonus: { combatMultiplier: 14 },
|
||||
description:
|
||||
"Forged from the Expanse Sovereign's own reach — a blade that has no beginning and no end, only edge.",
|
||||
equipped: false,
|
||||
id: "expanse_blade",
|
||||
name: "The Expanse Blade",
|
||||
owned: false,
|
||||
rarity: "legendary",
|
||||
setId: "infinite_expanse",
|
||||
type: "weapon",
|
||||
},
|
||||
{
|
||||
bonus: { goldMultiplier: 10 },
|
||||
description:
|
||||
"A second iteration of the void's armour — the first was not enough. This one has never been tested to its limit.",
|
||||
equipped: false,
|
||||
id: "void_armour_mk2",
|
||||
name: "Void Armour Mk. II",
|
||||
owned: false,
|
||||
rarity: "legendary",
|
||||
setId: "infinite_expanse",
|
||||
type: "armour",
|
||||
},
|
||||
// ── Reality Forge ─────────────────────────────────────────────────────────
|
||||
{
|
||||
bonus: { combatMultiplier: 16 },
|
||||
description:
|
||||
"The Reality Architect's primary instrument — a sword that does not cut through things but rewrites what they are.",
|
||||
equipped: false,
|
||||
id: "cosmos_blade",
|
||||
name: "The Cosmos Blade",
|
||||
owned: false,
|
||||
rarity: "legendary",
|
||||
setId: "reality_forge",
|
||||
type: "weapon",
|
||||
},
|
||||
{
|
||||
bonus: { goldMultiplier: 12 },
|
||||
description:
|
||||
"Plated from the substance of reality itself — wearing it makes you feel slightly more real than everything around you.",
|
||||
equipped: false,
|
||||
id: "reality_plate",
|
||||
name: "The Reality Plate",
|
||||
owned: false,
|
||||
rarity: "legendary",
|
||||
setId: "reality_forge",
|
||||
type: "armour",
|
||||
},
|
||||
// ── Cosmic Maelstrom ──────────────────────────────────────────────────────
|
||||
{
|
||||
bonus: { combatMultiplier: 18 },
|
||||
description:
|
||||
"Torn from the eye of the Cosmic Annihilator — a weapon that carries the force of an ending universe in every swing.",
|
||||
equipped: false,
|
||||
id: "maelstrom_edge",
|
||||
name: "The Maelstrom Edge",
|
||||
owned: false,
|
||||
rarity: "legendary",
|
||||
setId: "cosmic_maelstrom",
|
||||
type: "weapon",
|
||||
},
|
||||
{
|
||||
bonus: { goldMultiplier: 14 },
|
||||
description:
|
||||
"Armour that has weathered the destruction of countless realities. It has learned not to flinch.",
|
||||
equipped: false,
|
||||
id: "cosmic_plate",
|
||||
name: "The Cosmic Plate",
|
||||
owned: false,
|
||||
rarity: "legendary",
|
||||
setId: "cosmic_maelstrom",
|
||||
type: "armour",
|
||||
},
|
||||
// ── Primeval Sanctum ──────────────────────────────────────────────────────
|
||||
{
|
||||
bonus: { combatMultiplier: 22 },
|
||||
description:
|
||||
"The first weapon — older than the concept of war, older than the concept of a weapon. It remembers what it was made for.",
|
||||
equipped: false,
|
||||
id: "primeval_blade",
|
||||
name: "The Primeval Blade",
|
||||
owned: false,
|
||||
rarity: "legendary",
|
||||
setId: "primeval_sanctum",
|
||||
type: "weapon",
|
||||
},
|
||||
{
|
||||
bonus: { goldMultiplier: 17 },
|
||||
description:
|
||||
"The shield-form of the Primeval God — absolute protection from before the concept of harm existed.",
|
||||
equipped: false,
|
||||
id: "ancient_aegis",
|
||||
name: "The Ancient Aegis",
|
||||
owned: false,
|
||||
rarity: "legendary",
|
||||
setId: "primeval_sanctum",
|
||||
type: "armour",
|
||||
},
|
||||
// ── The Absolute ──────────────────────────────────────────────────────────
|
||||
{
|
||||
bonus: { combatMultiplier: 28 },
|
||||
description:
|
||||
"There is no name for what this was before it became a sword. There is no name for what it is now. It ends things.",
|
||||
equipped: false,
|
||||
id: "absolute_blade",
|
||||
name: "The Absolute Blade",
|
||||
owned: false,
|
||||
rarity: "legendary",
|
||||
setId: "the_absolute",
|
||||
type: "weapon",
|
||||
},
|
||||
{
|
||||
bonus: { goldMultiplier: 20 },
|
||||
description:
|
||||
"Eternity given the shape of armour — it has always existed, it will always exist, and it has always protected its wearer.",
|
||||
equipped: false,
|
||||
id: "eternity_plate",
|
||||
name: "The Eternity Plate",
|
||||
owned: false,
|
||||
rarity: "legendary",
|
||||
setId: "the_absolute",
|
||||
type: "armour",
|
||||
},
|
||||
{
|
||||
bonus: { clickMultiplier: 6, combatMultiplier: 3, goldMultiplier: 3 },
|
||||
description:
|
||||
"The heart of everything — a thing so fundamental that its removal from the Absolute One ended all things, briefly. Briefly.",
|
||||
equipped: false,
|
||||
id: "omniversal_core",
|
||||
name: "The Omniversal Core",
|
||||
owned: false,
|
||||
rarity: "legendary",
|
||||
setId: "the_absolute",
|
||||
type: "trinket",
|
||||
},
|
||||
// ── Purchasable endgame sinks ─────────────────────────────────────────────
|
||||
{
|
||||
bonus: { clickMultiplier: 3 },
|
||||
bonus: { clickMultiplier: 4.25 },
|
||||
cost: { crystals: 0, essence: 20_000_000, gold: 0 },
|
||||
description:
|
||||
"A lens of compressed celestial light that sharpens every strike with divine precision.",
|
||||
@@ -721,7 +883,7 @@ export const defaultEquipment: Array<Equipment> = [
|
||||
type: "armour",
|
||||
},
|
||||
{
|
||||
bonus: { combatMultiplier: 7 },
|
||||
bonus: { combatMultiplier: 10.5 },
|
||||
cost: { crystals: 0, essence: 100_000_000, gold: 0 },
|
||||
description:
|
||||
"A weapon that channels void energy — the absence of resistance makes every strike devastating.",
|
||||
@@ -745,7 +907,7 @@ export const defaultEquipment: Array<Equipment> = [
|
||||
type: "trinket",
|
||||
},
|
||||
{
|
||||
bonus: { goldMultiplier: 4.75 },
|
||||
bonus: { goldMultiplier: 7.5 },
|
||||
cost: { crystals: 20_000_000, essence: 0, gold: 0 },
|
||||
description:
|
||||
"Armour structured around a crystalline lattice of optimal income calculations. Every gold piece finds you faster.",
|
||||
@@ -757,7 +919,7 @@ export const defaultEquipment: Array<Equipment> = [
|
||||
type: "armour",
|
||||
},
|
||||
{
|
||||
bonus: { clickMultiplier: 5, combatMultiplier: 1.75, goldMultiplier: 2 },
|
||||
bonus: { clickMultiplier: 5, combatMultiplier: 3, goldMultiplier: 2.5 },
|
||||
cost: { crystals: 100_000_000, essence: 0, gold: 0 },
|
||||
description:
|
||||
"An artifact from beyond all known planes — it refracts power through all dimensions simultaneously.",
|
||||
|
||||
+144
-144
File diff suppressed because it is too large
Load Diff
@@ -96,7 +96,7 @@ export const defaultPrestigeUpgrades: Array<PrestigeUpgrade> = [
|
||||
id: "income_10",
|
||||
multiplier: 200,
|
||||
name: "Eternal Rune I",
|
||||
runestonesCost: 30_000,
|
||||
runestonesCost: 22_500,
|
||||
},
|
||||
{
|
||||
category: "income",
|
||||
@@ -105,7 +105,7 @@ export const defaultPrestigeUpgrades: Array<PrestigeUpgrade> = [
|
||||
id: "income_11",
|
||||
multiplier: 500,
|
||||
name: "Eternal Rune II",
|
||||
runestonesCost: 80_000,
|
||||
runestonesCost: 60_000,
|
||||
},
|
||||
// ── Click Power ───────────────────────────────────────────────────────────
|
||||
{
|
||||
|
||||
+448
-171
File diff suppressed because it is too large
Load Diff
@@ -23,7 +23,7 @@ export const defaultRecipes: Array<CraftingRecipe> = [
|
||||
zoneId: "verdant_vale",
|
||||
},
|
||||
{
|
||||
bonus: { type: "combat_power", value: 1.08 },
|
||||
bonus: { type: "combat_power", value: 1.2 },
|
||||
description:
|
||||
"A ward fashioned from bark older than the kingdom. Its presence on the battlefield is not merely physical — something ancient watches through it.",
|
||||
id: "elder_bark_shield",
|
||||
@@ -75,7 +75,7 @@ export const defaultRecipes: Array<CraftingRecipe> = [
|
||||
zoneId: "frozen_peaks",
|
||||
},
|
||||
{
|
||||
bonus: { type: "gold_income", value: 1.1 },
|
||||
bonus: { type: "gold_income", value: 1.15 },
|
||||
description:
|
||||
"The void shard set in frost crystal, creating something that should not be possible: a stable window into the spaces between spaces. Profitable beyond what physics suggests.",
|
||||
id: "void_fragment_amulet",
|
||||
@@ -101,7 +101,7 @@ export const defaultRecipes: Array<CraftingRecipe> = [
|
||||
zoneId: "shadow_marshes",
|
||||
},
|
||||
{
|
||||
bonus: { type: "combat_power", value: 1.1 },
|
||||
bonus: { type: "combat_power", value: 1.15 },
|
||||
description:
|
||||
"The cursed bone and shadow essence combined into a focus that doesn't so much help your party fight as make things afraid of them before the battle begins.",
|
||||
id: "cursed_focus",
|
||||
@@ -127,7 +127,7 @@ export const defaultRecipes: Array<CraftingRecipe> = [
|
||||
zoneId: "volcanic_depths",
|
||||
},
|
||||
{
|
||||
bonus: { type: "combat_power", value: 1.12 },
|
||||
bonus: { type: "combat_power", value: 1.2 },
|
||||
description:
|
||||
"The legendary ore, smelted in the volcanic forges with magma stone as fuel. What emerges is something the fire elementals recognise — and fear slightly.",
|
||||
id: "elemental_ore_ingot",
|
||||
@@ -193,7 +193,7 @@ export const defaultRecipes: Array<CraftingRecipe> = [
|
||||
|
||||
// Zone 8: abyssal_trench
|
||||
{
|
||||
bonus: { type: "combat_power", value: 1.15 },
|
||||
bonus: { type: "combat_power", value: 1.25 },
|
||||
description:
|
||||
"Trench coral and pressure gem combined under conditions that should have destroyed both. The result is something that survived conditions nothing should survive, which is ideal for combat.",
|
||||
id: "pressure_forged_core",
|
||||
@@ -231,7 +231,7 @@ export const defaultRecipes: Array<CraftingRecipe> = [
|
||||
zoneId: "infernal_court",
|
||||
},
|
||||
{
|
||||
bonus: { type: "essence_income", value: 1.15 },
|
||||
bonus: { type: "essence_income", value: 1.2 },
|
||||
description:
|
||||
"Soul residue and demon ichor worked into a catalyst that draws the essence from everything around it — gently, without drawing the court's attention. Usually.",
|
||||
id: "soul_bound_catalyst",
|
||||
@@ -271,7 +271,7 @@ export const defaultRecipes: Array<CraftingRecipe> = [
|
||||
|
||||
// Zone 11: void_sanctum
|
||||
{
|
||||
bonus: { type: "combat_power", value: 1.18 },
|
||||
bonus: { type: "combat_power", value: 1.28 },
|
||||
description:
|
||||
"Null matter and resonance fragments assembled into something that generates a field where the laws governing how hard things are to kill become negotiable.",
|
||||
id: "null_field_generator",
|
||||
@@ -309,7 +309,7 @@ export const defaultRecipes: Array<CraftingRecipe> = [
|
||||
zoneId: "eternal_throne",
|
||||
},
|
||||
{
|
||||
bonus: { type: "combat_power", value: 1.2 },
|
||||
bonus: { type: "combat_power", value: 1.3 },
|
||||
description:
|
||||
"An eternity splinter set into crown fragments, shaped into a ring. What it binds is unclear. Whatever it is, it makes your party significantly harder to kill.",
|
||||
id: "eternity_bound_ring",
|
||||
@@ -375,7 +375,7 @@ export const defaultRecipes: Array<CraftingRecipe> = [
|
||||
|
||||
// Zone 15: reality_forge
|
||||
{
|
||||
bonus: { type: "combat_power", value: 1.22 },
|
||||
bonus: { type: "combat_power", value: 1.35 },
|
||||
description:
|
||||
"Forge ash smelted with creation tools into an ingot of compressed reality. Your party hits harder when carrying it. Reality does not enjoy being concentrated like this.",
|
||||
id: "reality_ingot",
|
||||
@@ -427,7 +427,7 @@ export const defaultRecipes: Array<CraftingRecipe> = [
|
||||
|
||||
// Zone 17: primeval_sanctum
|
||||
{
|
||||
bonus: { type: "combat_power", value: 1.25 },
|
||||
bonus: { type: "combat_power", value: 1.4 },
|
||||
description:
|
||||
"Ancient dust and memory shards arranged into something that remembers how to fight before fighting was invented. Your party benefits from this instinct enormously.",
|
||||
id: "ancient_memory_array",
|
||||
@@ -493,7 +493,20 @@ export const defaultRecipes: Array<CraftingRecipe> = [
|
||||
zoneId: "abyssal_trench",
|
||||
},
|
||||
{
|
||||
bonus: { type: "combat_power", value: 1.4 },
|
||||
bonus: { type: "click_power", value: 1.38 },
|
||||
description:
|
||||
"A primeval relic submerged at the absolute boundary of existence alongside omega crystals and boundary shards — the first and last thing, unified. Every action your guild takes through it is simultaneously the most ancient and most final thing that has ever happened. It does not miss.",
|
||||
id: "primal_omega_lens",
|
||||
name: "Primal Omega Lens",
|
||||
requiredMaterials: [
|
||||
{ materialId: "primeval_relic", quantity: 2 },
|
||||
{ materialId: "boundary_shard", quantity: 4 },
|
||||
{ materialId: "omega_crystal", quantity: 2 },
|
||||
],
|
||||
zoneId: "the_absolute",
|
||||
},
|
||||
{
|
||||
bonus: { type: "combat_power", value: 1.65 },
|
||||
description:
|
||||
"An eternity splinter from the eternal throne, set at the boundary between everything and nothing with an omega crystal and bound by boundary shards. Where eternity meets the absolute, something is forged that has never existed and will never exist again. Your party fights as if they know this.",
|
||||
id: "eternal_omega",
|
||||
@@ -508,6 +521,18 @@ export const defaultRecipes: Array<CraftingRecipe> = [
|
||||
},
|
||||
|
||||
// Zone 18: the_absolute
|
||||
{
|
||||
bonus: { type: "click_power", value: 1.28 },
|
||||
description:
|
||||
"Absolute fragments ground and set in an omega crystal lattice — an instrument of pure finality. Every action your guild takes through it carries the weight of an ending. It does not miss.",
|
||||
id: "absolute_focus",
|
||||
name: "Absolute Focus",
|
||||
requiredMaterials: [
|
||||
{ materialId: "absolute_fragment", quantity: 8 },
|
||||
{ materialId: "omega_crystal", quantity: 3 },
|
||||
],
|
||||
zoneId: "the_absolute",
|
||||
},
|
||||
{
|
||||
bonus: { type: "gold_income", value: 1.3 },
|
||||
description:
|
||||
@@ -521,7 +546,7 @@ export const defaultRecipes: Array<CraftingRecipe> = [
|
||||
zoneId: "the_absolute",
|
||||
},
|
||||
{
|
||||
bonus: { type: "combat_power", value: 1.3 },
|
||||
bonus: { type: "combat_power", value: 1.55 },
|
||||
description:
|
||||
"The last omega crystal, set at the convergence of boundary shards in the precise arrangement of an ending. What it does to combat is what endings do to everything: make it final.",
|
||||
id: "omega_convergence",
|
||||
|
||||
@@ -8,4 +8,4 @@
|
||||
/**
|
||||
* The current game state schema version. Bump this whenever a breaking change is made to GameState.
|
||||
*/
|
||||
export const currentSchemaVersion = 1;
|
||||
export const currentSchemaVersion = 2;
|
||||
|
||||
@@ -11,7 +11,7 @@ export const defaultTranscendenceUpgrades: Array<TranscendenceUpgrade> = [
|
||||
// ── Income multipliers ──────────────────────────────────────────────────────
|
||||
{
|
||||
category: "income",
|
||||
cost: 5,
|
||||
cost: 2,
|
||||
description:
|
||||
"The echoes of past runs linger, amplifying your guild's income by 25%.",
|
||||
id: "echo_income_1",
|
||||
@@ -20,7 +20,7 @@ export const defaultTranscendenceUpgrades: Array<TranscendenceUpgrade> = [
|
||||
},
|
||||
{
|
||||
category: "income",
|
||||
cost: 10,
|
||||
cost: 4,
|
||||
description:
|
||||
"Your transcendent experience resonates through your guild, boosting income by 50%.",
|
||||
id: "echo_income_2",
|
||||
@@ -29,7 +29,7 @@ export const defaultTranscendenceUpgrades: Array<TranscendenceUpgrade> = [
|
||||
},
|
||||
{
|
||||
category: "income",
|
||||
cost: 20,
|
||||
cost: 8,
|
||||
description:
|
||||
"The harmony of multiple timelines surges through your guild, doubling its income.",
|
||||
id: "echo_income_3",
|
||||
@@ -38,7 +38,7 @@ export const defaultTranscendenceUpgrades: Array<TranscendenceUpgrade> = [
|
||||
},
|
||||
{
|
||||
category: "income",
|
||||
cost: 40,
|
||||
cost: 16,
|
||||
description:
|
||||
"Ethereal energy overflows from your transcendence, tripling your guild's income.",
|
||||
id: "echo_income_4",
|
||||
@@ -47,7 +47,7 @@ export const defaultTranscendenceUpgrades: Array<TranscendenceUpgrade> = [
|
||||
},
|
||||
{
|
||||
category: "income",
|
||||
cost: 80,
|
||||
cost: 32,
|
||||
description:
|
||||
"The infinite chorus of every run you've ever played amplifies your guild fivefold.",
|
||||
id: "echo_income_5",
|
||||
@@ -58,7 +58,7 @@ export const defaultTranscendenceUpgrades: Array<TranscendenceUpgrade> = [
|
||||
// ── Combat multipliers ──────────────────────────────────────────────────────
|
||||
{
|
||||
category: "combat",
|
||||
cost: 5,
|
||||
cost: 2,
|
||||
description:
|
||||
"Memories of countless battles harden your adventurers, increasing party DPS by 25%.",
|
||||
id: "echo_combat_1",
|
||||
@@ -67,7 +67,7 @@ export const defaultTranscendenceUpgrades: Array<TranscendenceUpgrade> = [
|
||||
},
|
||||
{
|
||||
category: "combat",
|
||||
cost: 15,
|
||||
cost: 6,
|
||||
description:
|
||||
"Veterans of transcendence know how to fight smarter, boosting party DPS by 50%.",
|
||||
id: "echo_combat_2",
|
||||
@@ -76,7 +76,7 @@ export const defaultTranscendenceUpgrades: Array<TranscendenceUpgrade> = [
|
||||
},
|
||||
{
|
||||
category: "combat",
|
||||
cost: 35,
|
||||
cost: 12,
|
||||
description:
|
||||
"Your warriors carry the strength of every fallen timeline, doubling party DPS.",
|
||||
id: "echo_combat_3",
|
||||
@@ -87,7 +87,7 @@ export const defaultTranscendenceUpgrades: Array<TranscendenceUpgrade> = [
|
||||
// ── Prestige threshold reductions ──────────────────────────────────────────
|
||||
{
|
||||
category: "prestige_threshold",
|
||||
cost: 8,
|
||||
cost: 3,
|
||||
description:
|
||||
"Experience from past lives shortens the road to prestige — threshold reduced by 10%.",
|
||||
id: "echo_prestige_threshold_1",
|
||||
@@ -96,7 +96,7 @@ export const defaultTranscendenceUpgrades: Array<TranscendenceUpgrade> = [
|
||||
},
|
||||
{
|
||||
category: "prestige_threshold",
|
||||
cost: 20,
|
||||
cost: 6,
|
||||
description:
|
||||
"You've walked this path so many times you know every shortcut — threshold reduced by 20%.",
|
||||
id: "echo_prestige_threshold_2",
|
||||
@@ -107,7 +107,7 @@ export const defaultTranscendenceUpgrades: Array<TranscendenceUpgrade> = [
|
||||
// ── Prestige runestone multipliers ─────────────────────────────────────────
|
||||
{
|
||||
category: "prestige_runestones",
|
||||
cost: 8,
|
||||
cost: 3,
|
||||
description:
|
||||
"Transcendent insight attunes you to the runestones, earning 50% more per prestige.",
|
||||
id: "echo_prestige_runestones_1",
|
||||
@@ -116,7 +116,7 @@ export const defaultTranscendenceUpgrades: Array<TranscendenceUpgrade> = [
|
||||
},
|
||||
{
|
||||
category: "prestige_runestones",
|
||||
cost: 20,
|
||||
cost: 6,
|
||||
description:
|
||||
"You have mastered the art of runestone crafting, doubling your prestige runestone yield.",
|
||||
id: "echo_prestige_runestones_2",
|
||||
@@ -127,7 +127,7 @@ export const defaultTranscendenceUpgrades: Array<TranscendenceUpgrade> = [
|
||||
// ── Echo meta multipliers ───────────────────────────────────────────────────
|
||||
{
|
||||
category: "echo_meta",
|
||||
cost: 50,
|
||||
cost: 15,
|
||||
description:
|
||||
"Your transcendence resonates deeper, amplifying future echo yields by 25%.",
|
||||
id: "echo_meta_1",
|
||||
@@ -136,7 +136,7 @@ export const defaultTranscendenceUpgrades: Array<TranscendenceUpgrade> = [
|
||||
},
|
||||
{
|
||||
category: "echo_meta",
|
||||
cost: 150,
|
||||
cost: 45,
|
||||
description:
|
||||
"Each loop of existence makes the next more powerful — future echo yields +50%.",
|
||||
id: "echo_meta_2",
|
||||
@@ -145,7 +145,7 @@ export const defaultTranscendenceUpgrades: Array<TranscendenceUpgrade> = [
|
||||
},
|
||||
{
|
||||
category: "echo_meta",
|
||||
cost: 400,
|
||||
cost: 100,
|
||||
description:
|
||||
"You have mastered the infinite spiral of transcendence, doubling all future echo yields.",
|
||||
id: "echo_meta_3",
|
||||
|
||||
@@ -48,7 +48,7 @@ export const defaultUpgrades: Array<Upgrade> = [
|
||||
unlocked: false,
|
||||
},
|
||||
{
|
||||
costCrystals: 100,
|
||||
costCrystals: 50,
|
||||
costEssence: 0,
|
||||
costGold: 0,
|
||||
description:
|
||||
@@ -104,7 +104,7 @@ export const defaultUpgrades: Array<Upgrade> = [
|
||||
description:
|
||||
"Forge partnerships with mage guilds across the realm. All income +50%.",
|
||||
id: "essence_guild",
|
||||
multiplier: 1.5,
|
||||
multiplier: 2,
|
||||
name: "Essence Guild",
|
||||
purchased: false,
|
||||
target: "global",
|
||||
@@ -459,7 +459,7 @@ export const defaultUpgrades: Array<Upgrade> = [
|
||||
unlocked: false,
|
||||
},
|
||||
{
|
||||
costCrystals: 10_000_000,
|
||||
costCrystals: 50_000_000,
|
||||
costEssence: 0,
|
||||
costGold: 0,
|
||||
description: "Transcend mortal limits through void energy. All income x3.",
|
||||
|
||||
@@ -24,6 +24,13 @@ import { updateChallengeProgress } from "../services/dailyChallenges.js";
|
||||
import { logger } from "../services/logger.js";
|
||||
import type { HonoEnvironment } from "../types/hono.js";
|
||||
|
||||
/**
|
||||
* Exponential base for the prestige combat multiplier: Math.pow(base, prestigeCount).
|
||||
* Replaces the former linear formula (1 + count * 0.1) to enable late-game zone progression.
|
||||
* Must be kept in sync with prestigeCombatBase in apps/web/src/engine/tick.ts.
|
||||
*/
|
||||
const prestigeCombatBase = 4;
|
||||
|
||||
const bossRouter = new Hono<HonoEnvironment>();
|
||||
|
||||
bossRouter.use("*", authMiddleware);
|
||||
@@ -38,8 +45,7 @@ const calculatePartyStats = (
|
||||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line stylistic/no-mixed-operators -- prestige count * factor is clear
|
||||
const prestigeMultiplier = 1 + state.prestige.count * 0.1;
|
||||
const prestigeMultiplier = Math.pow(prestigeCombatBase, state.prestige.count);
|
||||
|
||||
// Apply equipped weapon's combat bonus
|
||||
// eslint-disable-next-line capitalized-comments -- v8 ignore
|
||||
|
||||
@@ -102,12 +102,23 @@ prestigeRouter.post("/", async(context) => {
|
||||
}).length;
|
||||
|
||||
const now = Date.now();
|
||||
await prisma.gameState.update({
|
||||
const { updatedAt } = record;
|
||||
|
||||
/*
|
||||
* Use the record's current updatedAt as an optimistic lock — if another
|
||||
* concurrent prestige request already committed, this update will match
|
||||
* 0 rows and we can safely reject the duplicate without a double webhook.
|
||||
*/
|
||||
const updateResult = await prisma.gameState.updateMany({
|
||||
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- Prisma requires object */
|
||||
data: { state: finalState as object, updatedAt: now },
|
||||
where: { discordId },
|
||||
where: { discordId, updatedAt },
|
||||
});
|
||||
|
||||
if (updateResult.count === 0) {
|
||||
return context.json({ error: "Prestige already in progress" }, 409);
|
||||
}
|
||||
|
||||
await prisma.player.update({
|
||||
data: {
|
||||
characterName: state.player.characterName,
|
||||
@@ -136,17 +147,30 @@ prestigeRouter.post("/", async(context) => {
|
||||
|
||||
const prestigeCount = prestigeData.count;
|
||||
void logger.metric("prestige", 1, { discordId, prestigeCount });
|
||||
void postMilestoneWebhook(discordId, "prestige", {
|
||||
// eslint-disable-next-line capitalized-comments -- v8 ignore
|
||||
/* v8 ignore next -- @preserve */
|
||||
apotheosis: prestigeState.apotheosis?.count ?? 0,
|
||||
|
||||
prestige: prestigeData.count,
|
||||
|
||||
// eslint-disable-next-line capitalized-comments -- v8 ignore
|
||||
/* v8 ignore next 2 -- @preserve */
|
||||
transcendence: prestigeState.transcendence?.count ?? 0,
|
||||
const playerRecord = await prisma.player.findUnique({
|
||||
select: { profileSettings: true },
|
||||
where: { discordId },
|
||||
});
|
||||
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- Runtime shape check for JSON field */
|
||||
const playerSettings = playerRecord?.profileSettings as
|
||||
Record<string, unknown> | null | undefined;
|
||||
const announcementsEnabled
|
||||
= playerSettings?.enablePrestigeAnnouncements !== false;
|
||||
|
||||
if (announcementsEnabled) {
|
||||
void postMilestoneWebhook(discordId, "prestige", {
|
||||
// eslint-disable-next-line capitalized-comments -- v8 ignore
|
||||
/* v8 ignore next -- @preserve */
|
||||
apotheosis: prestigeState.apotheosis?.count ?? 0,
|
||||
|
||||
prestige: prestigeData.count,
|
||||
|
||||
// eslint-disable-next-line capitalized-comments -- v8 ignore
|
||||
/* v8 ignore next 2 -- @preserve */
|
||||
transcendence: prestigeState.transcendence?.count ?? 0,
|
||||
});
|
||||
}
|
||||
|
||||
return context.json({
|
||||
milestoneRunestones: milestoneRunestones,
|
||||
|
||||
@@ -47,6 +47,7 @@ const parseProfileSettings = (raw: unknown): ProfileSettings => {
|
||||
: "suffix";
|
||||
return {
|
||||
enableNotifications: rawObject.enableNotifications === true,
|
||||
enablePrestigeAnnouncements: rawObject.enablePrestigeAnnouncements !== false,
|
||||
enableSounds: rawObject.enableSounds === true,
|
||||
numberFormat: numberFormat,
|
||||
showAchievementsUnlocked: rawObject.showAchievementsUnlocked !== false,
|
||||
@@ -222,6 +223,7 @@ profileRouter.put("/", authMiddleware, async(context) => {
|
||||
: "suffix";
|
||||
const profileSettings: ProfileSettings = {
|
||||
enableNotifications: body.profileSettings.enableNotifications ?? false,
|
||||
enablePrestigeAnnouncements: body.profileSettings.enablePrestigeAnnouncements ?? true,
|
||||
enableSounds: body.profileSettings.enableSounds ?? false,
|
||||
numberFormat: numberFormat,
|
||||
showAchievementsUnlocked: body.profileSettings.showAchievementsUnlocked ?? true,
|
||||
|
||||
@@ -71,8 +71,7 @@ const shuffleWithSeed = <T>(array: Array<T>, seed: number): Array<T> => {
|
||||
return result;
|
||||
};
|
||||
|
||||
const challengeTypes: Array<DailyChallengeType> = [
|
||||
"clicks",
|
||||
const progressionChallengeTypes: Array<DailyChallengeType> = [
|
||||
"bossesDefeated",
|
||||
"questsCompleted",
|
||||
"prestige",
|
||||
@@ -80,7 +79,8 @@ const challengeTypes: Array<DailyChallengeType> = [
|
||||
|
||||
/**
|
||||
* Generates 3 daily challenges for the given date string, deterministically.
|
||||
* Picks one challenge from 3 different randomly-selected types.
|
||||
* Always includes a "clicks" challenge (always completable regardless of
|
||||
* progression), then picks 2 more from the remaining types.
|
||||
* @param dateString - The date string (YYYY-MM-DD) to generate challenges for.
|
||||
* @returns An array of 3 DailyChallenge objects.
|
||||
*/
|
||||
@@ -88,8 +88,10 @@ const generateDailyChallenges = (
|
||||
dateString: string,
|
||||
): Array<DailyChallenge> => {
|
||||
const seed = dateSeed(dateString);
|
||||
const selectedTypes = shuffleWithSeed([ ...challengeTypes ], seed).
|
||||
slice(0, 3);
|
||||
const selectedTypes: Array<DailyChallengeType> = [
|
||||
"clicks",
|
||||
...shuffleWithSeed([ ...progressionChallengeTypes ], seed).slice(0, 2),
|
||||
];
|
||||
|
||||
return selectedTypes.map((type, index) => {
|
||||
const templates = dailyChallengeTemplates.filter((template) => {
|
||||
|
||||
@@ -15,14 +15,21 @@ import type {
|
||||
} from "@elysium/types";
|
||||
|
||||
const basePrestigeGoldThreshold = 1_000_000;
|
||||
const thresholdScaleFactor = 5;
|
||||
const runestonesPerPrestigeLevel = 10;
|
||||
const runestonesPerPrestigeLevel = 15;
|
||||
const milestoneInterval = 5;
|
||||
const milestoneRunestonesPerInterval = 25;
|
||||
|
||||
/*
|
||||
* Hard cap on the base runestone yield (before multipliers) to prevent
|
||||
* extreme AFK accumulation from producing game-breaking runestone counts.
|
||||
* With all upgrades (5.625× max) this caps out at ~1,125 per prestige.
|
||||
*/
|
||||
const maxBaseRunestones = 200;
|
||||
|
||||
/**
|
||||
* Calculates the gold threshold required for the next prestige.
|
||||
* Formula: BASE * SCALE_FACTOR^prestigeCount — each prestige makes the next threshold harder.
|
||||
* Formula: BASE * (count + 1)^2 — polynomial growth that peaks around prestige 8–10
|
||||
* then gets easier as the production multiplier overtakes it.
|
||||
* @param prestigeCount - The current number of prestiges completed.
|
||||
* @param thresholdMultiplier - An optional echo-upgrade multiplier applied to the threshold.
|
||||
* @returns The gold amount required to prestige.
|
||||
@@ -33,7 +40,7 @@ const calculatePrestigeThreshold = (
|
||||
): number => {
|
||||
return (
|
||||
basePrestigeGoldThreshold
|
||||
* Math.pow(thresholdScaleFactor, prestigeCount)
|
||||
* Math.pow(prestigeCount + 1, 2)
|
||||
* thresholdMultiplier
|
||||
);
|
||||
};
|
||||
@@ -107,7 +114,9 @@ interface RunestoneParameters {
|
||||
|
||||
/**
|
||||
* Calculates how many runestones the player earns from a prestige.
|
||||
* Formula: floor(sqrt(totalGoldEarned / threshold)) * RUNESTONES_PER_PRESTIGE_LEVEL * runestoneMultiplier.
|
||||
* Formula: min(floor(cbrt(totalGoldEarned / threshold)) * RUNESTONES_PER_PRESTIGE_LEVEL, MAX_BASE) * multipliers.
|
||||
* Uses cube root for stronger diminishing returns than sqrt, and caps the base before multipliers
|
||||
* to prevent extended AFK sessions from producing runestone windfalls.
|
||||
* @param parameters - The parameters for the runestone calculation.
|
||||
* @param parameters.totalGoldEarned - The total gold earned in the current run.
|
||||
* @param parameters.prestigeCount - The current prestige count.
|
||||
@@ -123,9 +132,11 @@ const calculateRunestones = (parameters: RunestoneParameters): number => {
|
||||
echoRunestoneMultiplier = 1,
|
||||
} = parameters;
|
||||
const threshold = calculatePrestigeThreshold(prestigeCount);
|
||||
const base
|
||||
= Math.floor(Math.sqrt(totalGoldEarned / threshold))
|
||||
* runestonesPerPrestigeLevel;
|
||||
const base = Math.min(
|
||||
Math.floor(Math.cbrt(totalGoldEarned / threshold))
|
||||
* runestonesPerPrestigeLevel,
|
||||
maxBaseRunestones,
|
||||
);
|
||||
const runestoneMult = getCategoryMultiplier(
|
||||
purchasedUpgradeIds,
|
||||
"runestones",
|
||||
@@ -135,19 +146,20 @@ const calculateRunestones = (parameters: RunestoneParameters): number => {
|
||||
|
||||
/**
|
||||
* Calculates the new prestige production multiplier.
|
||||
* Formula: 1.15^prestigeCount — exponential scaling per prestige.
|
||||
* Formula: 1.3^prestigeCount — exponential scaling per prestige that eventually
|
||||
* overtakes the polynomial threshold growth, making late prestiges progressively easier.
|
||||
* @param prestigeCount - The new prestige count.
|
||||
* @returns The production multiplier for the new prestige level.
|
||||
*/
|
||||
const calculateProductionMultiplier = (
|
||||
prestigeCount: number,
|
||||
): number => {
|
||||
return Math.pow(1.15, prestigeCount);
|
||||
return Math.pow(1.3, prestigeCount);
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the milestone runestone bonus for the given prestige count.
|
||||
* Every MILESTONE_INTERVAL prestiges awards milestone_number * MILESTONE_RUNESTONES_PER_INTERVAL stones.
|
||||
* Every MILESTONE_INTERVAL prestiges awards milestone_number² * MILESTONE_RUNESTONES_PER_INTERVAL stones.
|
||||
* @param prestigeCount - The prestige count after the current prestige.
|
||||
* @returns The milestone runestone bonus, or 0 if not a milestone prestige.
|
||||
*/
|
||||
@@ -156,7 +168,7 @@ const calculateMilestoneBonus = (prestigeCount: number): number => {
|
||||
return 0;
|
||||
}
|
||||
const milestoneNumber = prestigeCount / milestoneInterval;
|
||||
return milestoneNumber * milestoneRunestonesPerInterval;
|
||||
return milestoneNumber * milestoneNumber * milestoneRunestonesPerInterval;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -251,7 +263,8 @@ const buildPostPrestigeState = (
|
||||
* Preserve automation preferences across prestige — the player explicitly
|
||||
* opted into these settings and would not expect them to silently reset.
|
||||
*/
|
||||
autoBoss: currentState.autoBoss ?? false,
|
||||
autoAdventurer: currentState.autoAdventurer ?? false,
|
||||
autoBoss: currentState.autoBoss ?? false,
|
||||
|
||||
autoQuest: currentState.autoQuest ?? false,
|
||||
// Boss statuses reset for gameplay, but first-kill claimed flag is preserved
|
||||
|
||||
@@ -20,7 +20,7 @@ const finalBossId = "the_absolute_one";
|
||||
/**
|
||||
* Base constant used in the echo yield formula.
|
||||
*/
|
||||
const echoFormulaConstant = 853;
|
||||
const echoFormulaConstant = 224;
|
||||
|
||||
const getCategoryMultiplier = (
|
||||
purchasedIds: Array<string>,
|
||||
|
||||
@@ -595,6 +595,18 @@ describe("debug route", () => {
|
||||
expect(adventurer?.unlocked).toBe(true);
|
||||
});
|
||||
|
||||
it("patches adventurer stats when only name has changed (exercises all earlier OR conditions)", async () => {
|
||||
const state = makeState({
|
||||
adventurers: [{ id: "militia", count: 5, unlocked: true, baseCost: 100, goldPerSecond: 0.7, essencePerSecond: 0, combatPower: 3, level: 2, name: "Old Name", class: "warrior" }] as GameState["adventurers"],
|
||||
});
|
||||
vi.mocked(prisma.gameState.findUnique).mockResolvedValueOnce({ state } as never);
|
||||
vi.mocked(prisma.gameState.update).mockResolvedValueOnce({} as never);
|
||||
const res = await syncNewContent();
|
||||
expect(res.status).toBe(200);
|
||||
const body = await res.json() as { adventurerStatsPatched: number };
|
||||
expect(body.adventurerStatsPatched).toBe(1);
|
||||
});
|
||||
|
||||
it("skips adventurer stat patching for adventurers not in defaults", async () => {
|
||||
const state = makeState({
|
||||
adventurers: [{ id: "nonexistent_adventurer", count: 0, unlocked: false, baseCost: 1, goldPerSecond: 1, essencePerSecond: 1, combatPower: 1, level: 1, name: "Ghost", class: "warrior" }] as GameState["adventurers"],
|
||||
@@ -816,6 +828,18 @@ describe("debug route", () => {
|
||||
expect(quest?.status).toBe("available");
|
||||
});
|
||||
|
||||
it("patches quest stats when only combatPowerRequired has changed (exercises all earlier OR conditions)", async () => {
|
||||
const state = makeState({
|
||||
quests: [{ id: "haunted_mine", status: "available", rewards: [], durationSeconds: 900, name: "The Haunted Mine", description: "An abandoned mine is rich with crystal deposits — if you dare brave its ghosts.", prerequisiteIds: ["goblin_camp"], zoneId: "verdant_vale", combatPowerRequired: 0 }] as GameState["quests"],
|
||||
});
|
||||
vi.mocked(prisma.gameState.findUnique).mockResolvedValueOnce({ state } as never);
|
||||
vi.mocked(prisma.gameState.update).mockResolvedValueOnce({} as never);
|
||||
const res = await syncNewContent();
|
||||
expect(res.status).toBe(200);
|
||||
const body = await res.json() as { questsPatched: number };
|
||||
expect(body.questsPatched).toBe(1);
|
||||
});
|
||||
|
||||
it("skips quest stat patching for quests not in defaults", async () => {
|
||||
const state = makeState({
|
||||
quests: [{ id: "nonexistent_quest_xyz", status: "available", rewards: [], durationSeconds: 1, name: "Ghost", description: "Old", prerequisiteIds: [], zoneId: "old_zone", combatPowerRequired: 0 }] as GameState["quests"],
|
||||
@@ -845,6 +869,42 @@ describe("debug route", () => {
|
||||
expect(boss?.currentHp).toBe(100);
|
||||
});
|
||||
|
||||
it("patches boss stats when only bountyRunestones has changed (exercises all earlier OR conditions)", async () => {
|
||||
const state = makeState({
|
||||
bosses: [{ id: "troll_king", status: "available", currentHp: 1000, maxHp: 1000, upgradeRewards: [], bountyRunestonesClaimed: false, damagePerSecond: 5, goldReward: 10_000, essenceReward: 25, crystalReward: 0, equipmentRewards: ["iron_sword", "chainmail", "mages_focus"], prestigeRequirement: 0, zoneId: "verdant_vale", bountyRunestones: 99, name: "The Troll King", description: "Gruk the Immovable has terrorised the trade roads for decades. Merchants will pay handsomely for his head." }] as GameState["bosses"],
|
||||
});
|
||||
vi.mocked(prisma.gameState.findUnique).mockResolvedValueOnce({ state } as never);
|
||||
vi.mocked(prisma.gameState.update).mockResolvedValueOnce({} as never);
|
||||
const res = await syncNewContent();
|
||||
expect(res.status).toBe(200);
|
||||
const body = await res.json() as { bossesPatched: number };
|
||||
expect(body.bossesPatched).toBe(1);
|
||||
});
|
||||
|
||||
it("patches boss when only equipmentRewards differ (covers savedRewards branch)", async () => {
|
||||
const state = makeState({
|
||||
bosses: [{ id: "troll_king", status: "available", currentHp: 1000, maxHp: 1000, upgradeRewards: ["click_2"], bountyRunestonesClaimed: false, damagePerSecond: 5, goldReward: 10_000, essenceReward: 25, crystalReward: 5, equipmentRewards: [], prestigeRequirement: 0, zoneId: "verdant_vale", bountyRunestones: 1, name: "The Troll King", description: "Gruk the Immovable has terrorised the trade roads for decades. Merchants will pay handsomely for his head." }] as GameState["bosses"],
|
||||
});
|
||||
vi.mocked(prisma.gameState.findUnique).mockResolvedValueOnce({ state } as never);
|
||||
vi.mocked(prisma.gameState.update).mockResolvedValueOnce({} as never);
|
||||
const res = await syncNewContent();
|
||||
expect(res.status).toBe(200);
|
||||
const body = await res.json() as { bossesPatched: number };
|
||||
expect(body.bossesPatched).toBe(1);
|
||||
});
|
||||
|
||||
it("patches boss when only bountyRunestones differs with all other fields matching", async () => {
|
||||
const state = makeState({
|
||||
bosses: [{ id: "troll_king", status: "available", currentHp: 1000, maxHp: 1000, upgradeRewards: ["click_2"], bountyRunestonesClaimed: false, damagePerSecond: 5, goldReward: 10_000, essenceReward: 25, crystalReward: 5, equipmentRewards: ["iron_sword", "chainmail", "mages_focus"], prestigeRequirement: 0, zoneId: "verdant_vale", bountyRunestones: 99, name: "The Troll King", description: "Gruk the Immovable has terrorised the trade roads for decades. Merchants will pay handsomely for his head." }] as GameState["bosses"],
|
||||
});
|
||||
vi.mocked(prisma.gameState.findUnique).mockResolvedValueOnce({ state } as never);
|
||||
vi.mocked(prisma.gameState.update).mockResolvedValueOnce({} as never);
|
||||
const res = await syncNewContent();
|
||||
expect(res.status).toBe(200);
|
||||
const body = await res.json() as { bossesPatched: number };
|
||||
expect(body.bossesPatched).toBe(1);
|
||||
});
|
||||
|
||||
it("skips boss stat patching for bosses not in defaults", async () => {
|
||||
const state = makeState({
|
||||
bosses: [{ id: "nonexistent_boss_xyz", status: "available", currentHp: 100, maxHp: 1, upgradeRewards: [], bountyRunestonesClaimed: false, damagePerSecond: 1, goldReward: 1, essenceReward: 1, crystalReward: 1, equipmentRewards: [], prestigeRequirement: 0, zoneId: "old_zone", bountyRunestones: 0, name: "Ghost", description: "Old" }] as GameState["bosses"],
|
||||
@@ -872,6 +932,18 @@ describe("debug route", () => {
|
||||
expect(zone?.status).toBe("unlocked");
|
||||
});
|
||||
|
||||
it("patches zone stats when only unlockQuestId has changed (exercises all earlier OR conditions)", async () => {
|
||||
const state = makeState({
|
||||
zones: [{ id: "verdant_vale", status: "unlocked", name: "The Verdant Vale", description: "Rolling green hills and ancient forests stretch to the horizon. This is where your guild takes its first steps — trade roads in need of clearing, goblin camps to rout, and an undead queen stirring in the north.", emoji: "🌿", unlockBossId: null, unlockQuestId: "wrong_quest" }] as GameState["zones"],
|
||||
});
|
||||
vi.mocked(prisma.gameState.findUnique).mockResolvedValueOnce({ state } as never);
|
||||
vi.mocked(prisma.gameState.update).mockResolvedValueOnce({} as never);
|
||||
const res = await syncNewContent();
|
||||
expect(res.status).toBe(200);
|
||||
const body = await res.json() as { zonesPatched: number };
|
||||
expect(body.zonesPatched).toBe(1);
|
||||
});
|
||||
|
||||
it("skips zone stat patching for zones not in defaults", async () => {
|
||||
const state = makeState({
|
||||
zones: [{ id: "nonexistent_zone_xyz", status: "unlocked", name: "Ghost", description: "Old", emoji: "❓", unlockBossId: null, unlockQuestId: null }] as GameState["zones"],
|
||||
@@ -901,6 +973,18 @@ describe("debug route", () => {
|
||||
expect(upgrade?.unlocked).toBe(true);
|
||||
});
|
||||
|
||||
it("patches upgrade stats when only costCrystals has changed (exercises all earlier OR conditions)", async () => {
|
||||
const state = makeState({
|
||||
upgrades: [{ id: "click_2", purchased: false, unlocked: false, multiplier: 2, name: "Battle Hardened", description: "Years of combat sharpen your instincts. Doubles click power again.", target: "click", adventurerId: undefined, costGold: 1000, costEssence: 0, costCrystals: 99 }] as GameState["upgrades"],
|
||||
});
|
||||
vi.mocked(prisma.gameState.findUnique).mockResolvedValueOnce({ state } as never);
|
||||
vi.mocked(prisma.gameState.update).mockResolvedValueOnce({} as never);
|
||||
const res = await syncNewContent();
|
||||
expect(res.status).toBe(200);
|
||||
const body = await res.json() as { upgradesPatched: number };
|
||||
expect(body.upgradesPatched).toBe(1);
|
||||
});
|
||||
|
||||
it("skips upgrade stat patching for upgrades not in defaults", async () => {
|
||||
const state = makeState({
|
||||
upgrades: [{ id: "nonexistent_upgrade_xyz", purchased: false, unlocked: false, multiplier: 0.1, name: "Ghost", description: "Old", target: "click", adventurerId: undefined, costGold: 1, costEssence: 0, costCrystals: 0 }] as GameState["upgrades"],
|
||||
@@ -929,6 +1013,30 @@ describe("debug route", () => {
|
||||
expect(item?.equipped).toBe(false);
|
||||
});
|
||||
|
||||
it("patches equipment stats when only cost has changed (exercises name/desc/type/rarity/bonus OR conditions)", async () => {
|
||||
const state = makeState({
|
||||
equipment: [{ id: "shadow_dagger", owned: true, equipped: false, name: "Shadow Dagger", description: "Forged in the Shadow Marshes from condensed darkness. It strikes before it is seen.", type: "weapon", rarity: "epic", bonus: { combatMultiplier: 1.65 }, cost: { crystals: 99, essence: 500, gold: 0 }, setId: "shadow_infiltrator" }] as GameState["equipment"],
|
||||
});
|
||||
vi.mocked(prisma.gameState.findUnique).mockResolvedValueOnce({ state } as never);
|
||||
vi.mocked(prisma.gameState.update).mockResolvedValueOnce({} as never);
|
||||
const res = await syncNewContent();
|
||||
expect(res.status).toBe(200);
|
||||
const body = await res.json() as { equipmentPatched: number };
|
||||
expect(body.equipmentPatched).toBe(1);
|
||||
});
|
||||
|
||||
it("patches equipment stats when only setId has changed (exercises all earlier OR conditions)", async () => {
|
||||
const state = makeState({
|
||||
equipment: [{ id: "iron_sword", owned: true, equipped: false, name: "Iron Sword", description: "A sturdy weapon issued to veterans of the guild.", type: "weapon", rarity: "rare", bonus: { combatMultiplier: 1.25 }, cost: undefined, setId: "old_set" }] as GameState["equipment"],
|
||||
});
|
||||
vi.mocked(prisma.gameState.findUnique).mockResolvedValueOnce({ state } as never);
|
||||
vi.mocked(prisma.gameState.update).mockResolvedValueOnce({} as never);
|
||||
const res = await syncNewContent();
|
||||
expect(res.status).toBe(200);
|
||||
const body = await res.json() as { equipmentPatched: number };
|
||||
expect(body.equipmentPatched).toBe(1);
|
||||
});
|
||||
|
||||
it("skips equipment stat patching for items not in defaults", async () => {
|
||||
const state = makeState({
|
||||
equipment: [{ id: "nonexistent_item_xyz", owned: false, equipped: false, name: "Ghost Sword", description: "Old", type: "weapon", rarity: "common", bonus: { type: "click_power", value: 0 }, cost: undefined, setId: undefined }] as GameState["equipment"],
|
||||
@@ -957,6 +1065,18 @@ describe("debug route", () => {
|
||||
expect(achievement?.unlockedAt).toBeNull();
|
||||
});
|
||||
|
||||
it("patches achievement stats when only reward has changed (exercises all earlier OR conditions)", async () => {
|
||||
const state = makeState({
|
||||
achievements: [{ id: "first_click", unlockedAt: null, name: "First Strike", description: "Click the Guild Hall for the first time.", icon: "👆", condition: { amount: 1, type: "totalClicks" }, reward: { crystals: 999 } }] as GameState["achievements"],
|
||||
});
|
||||
vi.mocked(prisma.gameState.findUnique).mockResolvedValueOnce({ state } as never);
|
||||
vi.mocked(prisma.gameState.update).mockResolvedValueOnce({} as never);
|
||||
const res = await syncNewContent();
|
||||
expect(res.status).toBe(200);
|
||||
const body = await res.json() as { achievementsPatched: number };
|
||||
expect(body.achievementsPatched).toBe(1);
|
||||
});
|
||||
|
||||
it("skips achievement stat patching for achievements not in defaults", async () => {
|
||||
const state = makeState({
|
||||
achievements: [{ id: "nonexistent_achievement_xyz", unlockedAt: null, name: "Ghost", description: "Old", icon: "❓", condition: { type: "totalClicks", amount: 1 }, reward: undefined }] as GameState["achievements"],
|
||||
|
||||
@@ -24,7 +24,7 @@ vi.mock("../../src/services/discord.js", () => ({
|
||||
}));
|
||||
|
||||
const DISCORD_ID = "test_discord_id";
|
||||
const CURRENT_SCHEMA_VERSION = 1;
|
||||
const CURRENT_SCHEMA_VERSION = 2;
|
||||
|
||||
const makeState = (overrides: Partial<GameState> = {}): GameState => ({
|
||||
player: { discordId: DISCORD_ID, username: "u", discriminator: "0", avatar: null, totalGoldEarned: 0, totalClicks: 0, characterName: "T" },
|
||||
|
||||
@@ -7,8 +7,8 @@ import type { GameState } from "@elysium/types";
|
||||
|
||||
vi.mock("../../src/db/client.js", () => ({
|
||||
prisma: {
|
||||
player: { update: vi.fn() },
|
||||
gameState: { findUnique: vi.fn(), update: vi.fn() },
|
||||
player: { findUnique: vi.fn(), update: vi.fn() },
|
||||
gameState: { findUnique: vi.fn(), update: vi.fn(), updateMany: vi.fn() },
|
||||
},
|
||||
}));
|
||||
|
||||
@@ -47,8 +47,8 @@ const makeState = (overrides: Partial<GameState> = {}): GameState => ({
|
||||
describe("prestige route", () => {
|
||||
let app: Hono;
|
||||
let prisma: {
|
||||
player: { update: ReturnType<typeof vi.fn> };
|
||||
gameState: { findUnique: ReturnType<typeof vi.fn>; update: ReturnType<typeof vi.fn> };
|
||||
player: { findUnique: ReturnType<typeof vi.fn>; update: ReturnType<typeof vi.fn> };
|
||||
gameState: { findUnique: ReturnType<typeof vi.fn>; update: ReturnType<typeof vi.fn>; updateMany: ReturnType<typeof vi.fn> };
|
||||
};
|
||||
|
||||
beforeEach(async () => {
|
||||
@@ -83,8 +83,8 @@ describe("prestige route", () => {
|
||||
|
||||
it("returns runestones on successful prestige", async () => {
|
||||
const state = makeState();
|
||||
vi.mocked(prisma.gameState.findUnique).mockResolvedValueOnce({ state } as never);
|
||||
vi.mocked(prisma.gameState.update).mockResolvedValueOnce({} as never);
|
||||
vi.mocked(prisma.gameState.findUnique).mockResolvedValueOnce({ state, updatedAt: 0 } as never);
|
||||
vi.mocked(prisma.gameState.updateMany).mockResolvedValueOnce({ count: 1 } as never);
|
||||
vi.mocked(prisma.player.update).mockResolvedValueOnce({} as never);
|
||||
const res = await post("");
|
||||
expect(res.status).toBe(200);
|
||||
@@ -93,6 +93,14 @@ describe("prestige route", () => {
|
||||
expect(body.runestones).toBeGreaterThanOrEqual(0);
|
||||
});
|
||||
|
||||
it("returns 409 when a concurrent prestige already committed", async () => {
|
||||
const state = makeState();
|
||||
vi.mocked(prisma.gameState.findUnique).mockResolvedValueOnce({ state, updatedAt: 0 } as never);
|
||||
vi.mocked(prisma.gameState.updateMany).mockResolvedValueOnce({ count: 0 } as never);
|
||||
const res = await post("");
|
||||
expect(res.status).toBe(409);
|
||||
});
|
||||
|
||||
it("returns 500 when the database throws during prestige", async () => {
|
||||
vi.mocked(prisma.gameState.findUnique).mockRejectedValueOnce(new Error("DB error"));
|
||||
const res = await post("");
|
||||
@@ -112,14 +120,26 @@ describe("prestige route", () => {
|
||||
challenges: [{ id: "prestige_challenge", type: "prestige", target: 2, progress: 0, completed: false, crystalReward: 5 }],
|
||||
} as GameState["dailyChallenges"],
|
||||
});
|
||||
vi.mocked(prisma.gameState.findUnique).mockResolvedValueOnce({ state } as never);
|
||||
vi.mocked(prisma.gameState.update).mockResolvedValueOnce({} as never);
|
||||
vi.mocked(prisma.gameState.findUnique).mockResolvedValueOnce({ state, updatedAt: 0 } as never);
|
||||
vi.mocked(prisma.gameState.updateMany).mockResolvedValueOnce({ count: 1 } as never);
|
||||
vi.mocked(prisma.player.update).mockResolvedValueOnce({} as never);
|
||||
const res = await post("");
|
||||
expect(res.status).toBe(200);
|
||||
const body = await res.json() as { runestones: number; newPrestigeCount: number };
|
||||
expect(body.newPrestigeCount).toBe(1);
|
||||
});
|
||||
|
||||
it("skips webhook when enablePrestigeAnnouncements is false", async () => {
|
||||
const { postMilestoneWebhook } = await import("../../src/services/webhook.js");
|
||||
const state = makeState();
|
||||
vi.mocked(prisma.gameState.findUnique).mockResolvedValueOnce({ state, updatedAt: 0 } as never);
|
||||
vi.mocked(prisma.gameState.updateMany).mockResolvedValueOnce({ count: 1 } as never);
|
||||
vi.mocked(prisma.player.update).mockResolvedValueOnce({} as never);
|
||||
vi.mocked(prisma.player.findUnique).mockResolvedValueOnce({ profileSettings: { enablePrestigeAnnouncements: false } } as never);
|
||||
const res = await post("");
|
||||
expect(res.status).toBe(200);
|
||||
expect(postMilestoneWebhook).not.toHaveBeenCalledWith(expect.anything(), "prestige", expect.anything());
|
||||
});
|
||||
});
|
||||
|
||||
describe("POST /buy-upgrade", () => {
|
||||
|
||||
@@ -158,7 +158,7 @@ describe("transcendence route", () => {
|
||||
const res = await post("/buy-upgrade", { upgradeId: "echo_income_1" });
|
||||
expect(res.status).toBe(200);
|
||||
const body = await res.json() as { echoesRemaining: number; purchasedUpgradeIds: string[] };
|
||||
expect(body.echoesRemaining).toBe(95); // 100 - 5
|
||||
expect(body.echoesRemaining).toBe(98); // 100 - 2
|
||||
expect(body.purchasedUpgradeIds).toContain("echo_income_1");
|
||||
});
|
||||
|
||||
|
||||
@@ -46,13 +46,24 @@ describe("generateDailyChallenges", () => {
|
||||
expect(a.map((c) => c.id)).toEqual(b.map((c) => c.id));
|
||||
});
|
||||
|
||||
it("always includes a clicks challenge regardless of date", async () => {
|
||||
vi.setSystemTime(LA_MIDNIGHT_2024_01_15);
|
||||
const { generateDailyChallenges } = await import("../../src/services/dailyChallenges.js");
|
||||
const day1 = generateDailyChallenges("2024-01-15");
|
||||
const day2 = generateDailyChallenges("2024-01-16");
|
||||
expect(day1.some((c) => c.type === "clicks")).toBe(true);
|
||||
expect(day2.some((c) => c.type === "clicks")).toBe(true);
|
||||
});
|
||||
|
||||
it("generates different challenges for different dates", async () => {
|
||||
vi.setSystemTime(LA_MIDNIGHT_2024_01_15);
|
||||
const { generateDailyChallenges } = await import("../../src/services/dailyChallenges.js");
|
||||
const day1 = generateDailyChallenges("2024-01-15");
|
||||
const day2 = generateDailyChallenges("2024-01-16");
|
||||
// They should differ in at least one challenge ID (types vary by seed)
|
||||
expect(day1.map((c) => c.type)).not.toEqual(day2.map((c) => c.type));
|
||||
// The 2 non-clicks types should vary by seed between dates
|
||||
const day1NonClicks = day1.filter((c) => c.type !== "clicks").map((c) => c.type);
|
||||
const day2NonClicks = day2.filter((c) => c.type !== "clicks").map((c) => c.type);
|
||||
expect(day1NonClicks).not.toEqual(day2NonClicks);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -55,15 +55,18 @@ const makeMinimalState = (overrides: Partial<GameState> = {}): GameState =>
|
||||
|
||||
describe("calculatePrestigeThreshold", () => {
|
||||
it("returns base threshold at count 0", () => {
|
||||
// base × (0+1)^2 = 1_000_000 × 1 = 1_000_000
|
||||
expect(calculatePrestigeThreshold(0)).toBe(1_000_000);
|
||||
});
|
||||
|
||||
it("returns 5× at count 1", () => {
|
||||
expect(calculatePrestigeThreshold(1)).toBe(5_000_000);
|
||||
it("returns 4× base at count 1", () => {
|
||||
// base × (1+1)^2 = 1_000_000 × 4 = 4_000_000
|
||||
expect(calculatePrestigeThreshold(1)).toBe(4_000_000);
|
||||
});
|
||||
|
||||
it("returns 25× at count 2", () => {
|
||||
expect(calculatePrestigeThreshold(2)).toBe(25_000_000);
|
||||
it("returns 9× base at count 2", () => {
|
||||
// base × (2+1)^2 = 1_000_000 × 9 = 9_000_000
|
||||
expect(calculatePrestigeThreshold(2)).toBe(9_000_000);
|
||||
});
|
||||
|
||||
it("applies threshold multiplier correctly", () => {
|
||||
@@ -99,21 +102,27 @@ describe("isEligibleForPrestige", () => {
|
||||
|
||||
describe("calculateRunestones", () => {
|
||||
it("calculates basic runestones formula", () => {
|
||||
// floor(sqrt(4_000_000 / 1_000_000)) × 10 = floor(2) × 10 = 20
|
||||
// floor(cbrt(4_000_000 / 1_000_000)) × 15 = floor(cbrt(4)) × 15 = 1 × 15 = 15
|
||||
const result = calculateRunestones({ totalGoldEarned: 4_000_000, prestigeCount: 0, purchasedUpgradeIds: [] });
|
||||
expect(result).toBe(20);
|
||||
expect(result).toBe(15);
|
||||
});
|
||||
|
||||
it("applies echo runestone multiplier", () => {
|
||||
// floor(sqrt(4) × 10) = 20; × 2 = 40
|
||||
// floor(cbrt(4)) × 15 = 15; × 2 = 30
|
||||
const result = calculateRunestones({ totalGoldEarned: 4_000_000, prestigeCount: 0, purchasedUpgradeIds: [], echoRunestoneMultiplier: 2 });
|
||||
expect(result).toBe(40);
|
||||
expect(result).toBe(30);
|
||||
});
|
||||
|
||||
it("applies purchased runestone upgrade multiplier", () => {
|
||||
// With "runestones_1" purchased (multiplier 1.25): floor(20 × 1.25) = 25
|
||||
// With "runestone_gain_1" purchased (multiplier 1.25): floor(15 × 1.25) = 18
|
||||
const result = calculateRunestones({ totalGoldEarned: 4_000_000, prestigeCount: 0, purchasedUpgradeIds: ["runestone_gain_1"] });
|
||||
expect(result).toBeGreaterThan(20);
|
||||
expect(result).toBe(18);
|
||||
});
|
||||
|
||||
it("caps base runestones before multipliers", () => {
|
||||
// cbrt(9_261_000_000 / 1_000_000) = cbrt(9261) = 21 → 21 × 10 = 210, capped at 200
|
||||
const result = calculateRunestones({ totalGoldEarned: 9_261_000_000, prestigeCount: 0, purchasedUpgradeIds: [] });
|
||||
expect(result).toBe(200);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -122,12 +131,12 @@ describe("calculateProductionMultiplier", () => {
|
||||
expect(calculateProductionMultiplier(0)).toBe(1);
|
||||
});
|
||||
|
||||
it("returns 1.15 at count 1", () => {
|
||||
expect(calculateProductionMultiplier(1)).toBeCloseTo(1.15);
|
||||
it("returns 1.3 at count 1", () => {
|
||||
expect(calculateProductionMultiplier(1)).toBeCloseTo(1.3);
|
||||
});
|
||||
|
||||
it("scales exponentially", () => {
|
||||
expect(calculateProductionMultiplier(10)).toBeCloseTo(Math.pow(1.15, 10));
|
||||
expect(calculateProductionMultiplier(10)).toBeCloseTo(Math.pow(1.3, 10));
|
||||
});
|
||||
});
|
||||
|
||||
@@ -142,12 +151,12 @@ describe("calculateMilestoneBonus", () => {
|
||||
expect(calculateMilestoneBonus(5)).toBe(25);
|
||||
});
|
||||
|
||||
it("returns 50 at prestige 10", () => {
|
||||
expect(calculateMilestoneBonus(10)).toBe(50);
|
||||
it("returns 100 at prestige 10", () => {
|
||||
expect(calculateMilestoneBonus(10)).toBe(100);
|
||||
});
|
||||
|
||||
it("returns 75 at prestige 15", () => {
|
||||
expect(calculateMilestoneBonus(15)).toBe(75);
|
||||
it("returns 225 at prestige 15", () => {
|
||||
expect(calculateMilestoneBonus(15)).toBe(225);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -97,20 +97,21 @@ describe("isEligibleForTranscendence", () => {
|
||||
|
||||
describe("calculateEchoes", () => {
|
||||
it("handles prestige count of 0 by treating it as 1", () => {
|
||||
// safeCount = max(0, 1) = 1; floor(853 / sqrt(1)) = 853
|
||||
expect(calculateEchoes(0, 1)).toBe(853);
|
||||
// safeCount = max(0, 1) = 1; floor(224 / sqrt(1)) = 224
|
||||
expect(calculateEchoes(0, 1)).toBe(224);
|
||||
});
|
||||
|
||||
it("calculates echoes at count 1", () => {
|
||||
expect(calculateEchoes(1, 1)).toBe(853);
|
||||
// floor(224 / sqrt(1)) = 224
|
||||
expect(calculateEchoes(1, 1)).toBe(224);
|
||||
});
|
||||
|
||||
it("decreases echoes with higher prestige count", () => {
|
||||
const echoesAt1 = calculateEchoes(1, 1);
|
||||
const echoesAt4 = calculateEchoes(4, 1);
|
||||
expect(echoesAt4).toBeLessThan(echoesAt1);
|
||||
// floor(853 / sqrt(4)) = floor(853 / 2) = 426
|
||||
expect(echoesAt4).toBe(426);
|
||||
// floor(224 / sqrt(4)) = floor(224 / 2) = 112
|
||||
expect(echoesAt4).toBe(112);
|
||||
});
|
||||
|
||||
it("applies echoMetaMultiplier", () => {
|
||||
@@ -118,6 +119,11 @@ describe("calculateEchoes", () => {
|
||||
const withMult = calculateEchoes(1, 2);
|
||||
expect(withMult).toBe(base * 2);
|
||||
});
|
||||
|
||||
it("returns 50 echoes at the target prestige 20", () => {
|
||||
// floor(224 / sqrt(20)) = floor(224 / 4.472) = floor(50.09) = 50
|
||||
expect(calculateEchoes(20, 1)).toBe(50);
|
||||
});
|
||||
});
|
||||
|
||||
describe("buildPostTranscendenceState", () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@elysium/web",
|
||||
"version": "0.3.2",
|
||||
"version": "0.4.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
/* eslint-disable complexity -- Complex component with many render paths */
|
||||
import { type JSX, useState } from "react";
|
||||
import { useGame } from "../../context/gameContext.js";
|
||||
import { computeEffectiveAdventurerStats } from "../../engine/tick.js";
|
||||
import { cdnImage } from "../../utils/cdn.js";
|
||||
import { LockToggle } from "../ui/lockToggle.js";
|
||||
import type { Adventurer } from "@elysium/types";
|
||||
@@ -76,12 +77,19 @@ const computeMaxAffordable = (adventurer: Adventurer, gold: number): number => {
|
||||
return quantity;
|
||||
};
|
||||
|
||||
interface EffectiveAdventurerStats {
|
||||
readonly combatPower: number;
|
||||
readonly essencePerSecond: number;
|
||||
readonly goldPerSecond: number;
|
||||
}
|
||||
|
||||
interface AdventurerCardProperties {
|
||||
readonly adventurer: Adventurer;
|
||||
readonly currentGold: number;
|
||||
readonly batchSize: BatchSize;
|
||||
readonly unlockHint: string | undefined;
|
||||
readonly formatNumber: (n: number)=> string;
|
||||
readonly adventurer: Adventurer;
|
||||
readonly currentGold: number;
|
||||
readonly batchSize: BatchSize;
|
||||
readonly unlockHint: string | undefined;
|
||||
readonly formatNumber: (n: number)=> string;
|
||||
readonly effectiveStats: EffectiveAdventurerStats;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -92,6 +100,7 @@ interface AdventurerCardProperties {
|
||||
* @param props.batchSize - The selected batch size.
|
||||
* @param props.unlockHint - Optional quest name that unlocks this adventurer.
|
||||
* @param props.formatNumber - The number formatting utility function.
|
||||
* @param props.effectiveStats - The post-multiplier per-unit stats.
|
||||
* @returns The JSX element.
|
||||
*/
|
||||
const AdventurerCard = ({
|
||||
@@ -100,6 +109,7 @@ const AdventurerCard = ({
|
||||
batchSize,
|
||||
unlockHint,
|
||||
formatNumber,
|
||||
effectiveStats,
|
||||
}: AdventurerCardProperties): JSX.Element => {
|
||||
const { buyAdventurer } = useGame();
|
||||
|
||||
@@ -134,17 +144,17 @@ const AdventurerCard = ({
|
||||
<div className="adventurer-info">
|
||||
<h3>{adventurer.name}</h3>
|
||||
<p>
|
||||
{formatNumber(adventurer.goldPerSecond)}
|
||||
{formatNumber(effectiveStats.goldPerSecond)}
|
||||
{" gold/s each"}
|
||||
</p>
|
||||
{adventurer.essencePerSecond > 0
|
||||
&& <p>
|
||||
{formatNumber(adventurer.essencePerSecond)}
|
||||
{formatNumber(effectiveStats.essencePerSecond)}
|
||||
{" essence/s each"}
|
||||
</p>
|
||||
}
|
||||
<p>
|
||||
{formatNumber(adventurer.combatPower)}
|
||||
{formatNumber(effectiveStats.combatPower)}
|
||||
{" combat power each"}
|
||||
</p>
|
||||
</div>
|
||||
@@ -280,6 +290,10 @@ const AdventurerPanel = (): JSX.Element => {
|
||||
adventurer={adventurer}
|
||||
batchSize={batchSize}
|
||||
currentGold={state.resources.gold}
|
||||
effectiveStats={computeEffectiveAdventurerStats(
|
||||
state,
|
||||
adventurer.id,
|
||||
)}
|
||||
formatNumber={formatNumber}
|
||||
key={adventurer.id}
|
||||
unlockHint={adventurerUnlockHints.get(adventurer.id)}
|
||||
|
||||
@@ -49,6 +49,40 @@ const sourceTypeFolder: Record<CodexEntry["sourceType"], string> = {
|
||||
zone: "zones",
|
||||
};
|
||||
|
||||
/**
|
||||
* Converts a snake_case ID to a Title Case display name.
|
||||
* @param id - The snake_case identifier to format.
|
||||
* @returns The formatted display name.
|
||||
*/
|
||||
const formatId = (id: string): string => {
|
||||
return id.split("_").
|
||||
map((word) => {
|
||||
return word.charAt(0).toUpperCase() + word.slice(1);
|
||||
}).
|
||||
join(" ");
|
||||
};
|
||||
|
||||
/**
|
||||
* Generates a human-readable unlock hint for a locked codex entry.
|
||||
* @param entry - The locked codex entry.
|
||||
* @returns A string describing how to unlock the entry.
|
||||
*/
|
||||
const buildUnlockHint = (entry: CodexEntry): string => {
|
||||
const name = formatId(entry.sourceId);
|
||||
switch (entry.sourceType) {
|
||||
case "boss": return `Defeat ${name}`;
|
||||
case "quest": return `Complete: ${name}`;
|
||||
case "equipment": return `Obtain: ${name}`;
|
||||
case "adventurer": return `Recruit a ${name}`;
|
||||
case "upgrade": return `Purchase: ${name}`;
|
||||
case "prestige": return `Purchase runestone upgrade: ${name}`;
|
||||
case "zone": return `Explore: ${name}`;
|
||||
case "exploration": return `Discover: ${name}`;
|
||||
case "recipe": return `Craft: ${name}`;
|
||||
default: return "Keep playing to unlock";
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Renders the codex panel with lore entries grouped by zone.
|
||||
* @returns The JSX element.
|
||||
@@ -136,6 +170,9 @@ const CodexPanel = (): JSX.Element => {
|
||||
<span className="codex-lock">{"🔒"}</span>
|
||||
<span className="codex-entry-title">{"???"}</span>
|
||||
</div>
|
||||
<p className="codex-unlock-hint">
|
||||
{buildUnlockHint(entry)}
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -225,6 +225,10 @@ const EditProfileModal = ({
|
||||
void handleNotificationsEnable();
|
||||
}
|
||||
|
||||
function handlePrestigeAnnouncementsToggle(): void {
|
||||
toggleSetting("enablePrestigeAnnouncements");
|
||||
}
|
||||
|
||||
const isSaveDisabled = saving || characterName.trim() === "";
|
||||
|
||||
let saveLabel = "Save Profile";
|
||||
@@ -417,6 +421,23 @@ const EditProfileModal = ({
|
||||
}
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
className={`stat-toggle-btn ${
|
||||
profileSettings.enablePrestigeAnnouncements
|
||||
? "stat-toggle-on"
|
||||
: "stat-toggle-off"
|
||||
}`}
|
||||
onClick={handlePrestigeAnnouncementsToggle}
|
||||
type="button"
|
||||
>
|
||||
<span>{"⭐ Prestige Bot Announcements"}</span>
|
||||
<span className="stat-toggle-indicator">
|
||||
{profileSettings.enablePrestigeAnnouncements
|
||||
? "✓ On"
|
||||
: "Off"
|
||||
}
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div className="edit-profile-section">
|
||||
|
||||
@@ -12,25 +12,27 @@ import { useState, type JSX } from "react";
|
||||
import { prestige } from "../../api/client.js";
|
||||
import { useGame } from "../../context/gameContext.js";
|
||||
import {
|
||||
PRESTIGE_UPGRADES,
|
||||
PRESTIGE_UPGRADE_CATEGORY_LABELS,
|
||||
PRESTIGE_UPGRADES,
|
||||
} from "../../data/prestigeUpgrades.js";
|
||||
import {
|
||||
computeProjectedRunestones,
|
||||
} from "../../engine/tick.js";
|
||||
import { cdnImage } from "../../utils/cdn.js";
|
||||
import { sendNotification } from "../../utils/notification.js";
|
||||
import { playSound } from "../../utils/sound.js";
|
||||
import type { PrestigeUpgradeCategory } from "@elysium/types";
|
||||
|
||||
const baseThreshold = 1_000_000;
|
||||
const thresholdScale = 5;
|
||||
const runestonesPerLevel = 10;
|
||||
|
||||
/**
|
||||
* Calculates the prestige threshold for a given prestige count.
|
||||
* Mirrors the server formula: BASE * (count + 1)^2.
|
||||
* @param prestigeCount - The current prestige count.
|
||||
* @returns The required gold to prestige.
|
||||
*/
|
||||
const calculateThreshold = (prestigeCount: number): number => {
|
||||
return baseThreshold * Math.pow(thresholdScale, prestigeCount);
|
||||
return baseThreshold * Math.pow(prestigeCount + 1, 2);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -42,32 +44,6 @@ const calculateProductionMultiplier = (prestigeCount: number): number => {
|
||||
return Math.pow(1.15, prestigeCount);
|
||||
};
|
||||
|
||||
/**
|
||||
* Calculates the runestone preview for a prestige.
|
||||
* @param totalGoldEarned - Total gold earned this run.
|
||||
* @param prestigeCount - The current prestige count.
|
||||
* @param purchasedUpgradeIds - IDs of purchased prestige upgrades.
|
||||
* @returns The predicted runestone reward.
|
||||
*/
|
||||
const calculateRunestonePreview = (
|
||||
totalGoldEarned: number,
|
||||
prestigeCount: number,
|
||||
purchasedUpgradeIds: Array<string>,
|
||||
): number => {
|
||||
const threshold = calculateThreshold(prestigeCount);
|
||||
const base
|
||||
= Math.floor(Math.sqrt(totalGoldEarned / threshold)) * runestonesPerLevel;
|
||||
const runestoneMult = PRESTIGE_UPGRADES.filter((upgrade) => {
|
||||
return (
|
||||
upgrade.category === "runestones"
|
||||
&& purchasedUpgradeIds.includes(upgrade.id)
|
||||
);
|
||||
}).reduce((mult, upgrade) => {
|
||||
return mult * upgrade.multiplier;
|
||||
}, 1);
|
||||
return Math.floor(base * runestoneMult);
|
||||
};
|
||||
|
||||
const categoryOrder: Array<PrestigeUpgradeCategory> = [
|
||||
"income",
|
||||
"click",
|
||||
@@ -84,7 +60,7 @@ const categoryOrder: Array<PrestigeUpgradeCategory> = [
|
||||
const PrestigePanel = (): JSX.Element => {
|
||||
const {
|
||||
state,
|
||||
reload,
|
||||
reloadSilent,
|
||||
formatNumber,
|
||||
buyPrestigeUpgrade,
|
||||
enableNotifications,
|
||||
@@ -114,11 +90,7 @@ const PrestigePanel = (): JSX.Element => {
|
||||
const { autoAdventurer, prestige: prestigeData, player } = state;
|
||||
const threshold = calculateThreshold(prestigeData.count);
|
||||
const isEligible = player.totalGoldEarned >= threshold;
|
||||
const runestonePreview = calculateRunestonePreview(
|
||||
player.totalGoldEarned,
|
||||
prestigeData.count,
|
||||
prestigeData.purchasedUpgradeIds,
|
||||
);
|
||||
const runestonePreview = computeProjectedRunestones(state);
|
||||
const nextMultiplier = calculateProductionMultiplier(prestigeData.count + 1);
|
||||
|
||||
async function handlePrestige(): Promise<void> {
|
||||
@@ -141,7 +113,7 @@ const PrestigePanel = (): JSX.Element => {
|
||||
`You've reached prestige level ${data.newPrestigeCount.toString()}!`,
|
||||
);
|
||||
}
|
||||
await reload();
|
||||
await reloadSilent();
|
||||
} catch (error_: unknown) {
|
||||
setPrestigeError(
|
||||
error_ instanceof Error
|
||||
|
||||
@@ -11,7 +11,10 @@
|
||||
/* eslint-disable max-statements -- Many local variables needed for quest state */
|
||||
import { useState, type JSX } from "react";
|
||||
import { useGame } from "../../context/gameContext.js";
|
||||
import { zoneFailureChance } from "../../engine/tick.js";
|
||||
import {
|
||||
computePartyCombatPower,
|
||||
zoneFailureChance,
|
||||
} from "../../engine/tick.js";
|
||||
import { cdnImage } from "../../utils/cdn.js";
|
||||
import { LockToggle } from "../ui/lockToggle.js";
|
||||
import { ZoneSelector } from "./zoneSelector.js";
|
||||
@@ -208,7 +211,7 @@ const QuestPanel = (): JSX.Element => {
|
||||
);
|
||||
}
|
||||
|
||||
const { adventurers, autoQuest, bosses, quests, zones } = state;
|
||||
const { autoQuest, bosses, quests, zones } = state;
|
||||
|
||||
const activeZone = zones.find((zone) => {
|
||||
return zone.id === activeZoneId;
|
||||
@@ -226,11 +229,7 @@ const QuestPanel = (): JSX.Element => {
|
||||
: quests.find((quest) => {
|
||||
return quest.id === activeZone.unlockQuestId;
|
||||
});
|
||||
let partyCombatPower = 0;
|
||||
for (const adventurer of adventurers) {
|
||||
const contribution = adventurer.combatPower * adventurer.count;
|
||||
partyCombatPower = partyCombatPower + contribution;
|
||||
}
|
||||
const partyCombatPower = computePartyCombatPower(state);
|
||||
const zoneQuests = quests.filter(({ zoneId }) => {
|
||||
return zoneId === activeZoneId;
|
||||
});
|
||||
|
||||
@@ -15,6 +15,7 @@ import {
|
||||
computeEssencePerSecond,
|
||||
computeGoldPerSecond,
|
||||
computePartyCombatPower,
|
||||
computeProjectedRunestones,
|
||||
} from "../../engine/tick.js";
|
||||
import type { Resource } from "@elysium/types";
|
||||
|
||||
@@ -89,10 +90,12 @@ const ResourceBar = ({
|
||||
let partyCombatPower = 0;
|
||||
let goldPerSecond = 0;
|
||||
let essencePerSecond = 0;
|
||||
let projectedRunestones = 0;
|
||||
if (state !== null) {
|
||||
partyCombatPower = computePartyCombatPower(state);
|
||||
goldPerSecond = computeGoldPerSecond(state);
|
||||
essencePerSecond = computeEssencePerSecond(state);
|
||||
projectedRunestones = computeProjectedRunestones(state);
|
||||
}
|
||||
|
||||
let avatarUrl: string | null = null;
|
||||
@@ -234,6 +237,13 @@ const ResourceBar = ({
|
||||
</span>
|
||||
<span className="resource-label">{"Runestones"}</span>
|
||||
</div>
|
||||
<div className="resource">
|
||||
<span className="resource-icon">{"⭐"}</span>
|
||||
<span className="resource-value">
|
||||
{`+${formatNumber(projectedRunestones)}`}
|
||||
</span>
|
||||
<span className="resource-label">{"On Prestige"}</span>
|
||||
</div>
|
||||
<div className="resource">
|
||||
<span className="resource-icon">{"⚔️"}</span>
|
||||
<span className="resource-value">
|
||||
|
||||
@@ -53,6 +53,7 @@ import {
|
||||
transcend as transcendApi,
|
||||
} from "../api/client.js";
|
||||
import { CODEX_ENTRIES } from "../data/codex.js";
|
||||
import { EXPLORATION_AREAS } from "../data/explorations.js";
|
||||
import { RECIPES } from "../data/recipes.js";
|
||||
import {
|
||||
RESOURCE_CAP,
|
||||
@@ -116,6 +117,9 @@ const applyBossResult = (
|
||||
}).
|
||||
filter(Boolean),
|
||||
);
|
||||
const newlyUnlockedZoneIds = new Set(unlockedZones.map((z) => {
|
||||
return z.id;
|
||||
}));
|
||||
|
||||
const challengeUpdate
|
||||
= previous.dailyChallenges === undefined
|
||||
@@ -216,6 +220,23 @@ const applyBossResult = (
|
||||
? { ...u, unlocked: true }
|
||||
: u;
|
||||
}),
|
||||
...newlyUnlockedZoneIds.size === 0 || previous.exploration === undefined
|
||||
? {}
|
||||
: {
|
||||
exploration: {
|
||||
...previous.exploration,
|
||||
areas: previous.exploration.areas.map((area) => {
|
||||
const areaDefinition = EXPLORATION_AREAS.find((definition) => {
|
||||
return definition.id === area.id;
|
||||
});
|
||||
return areaDefinition !== undefined
|
||||
&& newlyUnlockedZoneIds.has(areaDefinition.zoneId)
|
||||
&& area.status === "locked"
|
||||
? { ...area, status: "available" as const }
|
||||
: area;
|
||||
}),
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -289,6 +310,12 @@ interface GameContextValue {
|
||||
*/
|
||||
reload: ()=> Promise<void>;
|
||||
|
||||
/**
|
||||
* Reload state from the server without showing the loading screen (used
|
||||
* after prestige to avoid the visible flash/hang).
|
||||
*/
|
||||
reloadSilent: ()=> Promise<void>;
|
||||
|
||||
/**
|
||||
* Unix timestamp of the last successful cloud save (null until first save response).
|
||||
*/
|
||||
@@ -697,6 +724,10 @@ export const GameProvider = ({
|
||||
|
||||
/* No-op placeholder */
|
||||
});
|
||||
const reloadSilentReference = useRef<()=> Promise<void>>(async() => {
|
||||
|
||||
/* No-op placeholder */
|
||||
});
|
||||
const [ schemaOutdated, setSchemaOutdated ] = useState(false);
|
||||
const [ saveSchemaVersion, setSaveSchemaVersion ] = useState(0);
|
||||
const [ currentSchemaVersion, setCurrentSchemaVersion ] = useState(0);
|
||||
@@ -784,6 +815,32 @@ export const GameProvider = ({
|
||||
|
||||
reloadReference.current = reload;
|
||||
|
||||
const reloadSilent = useCallback(async() => {
|
||||
setError(null);
|
||||
try {
|
||||
const data = await loadGame();
|
||||
setState(data.state);
|
||||
setLastSavedAt(data.state.player.lastSavedAt);
|
||||
if (data.signature !== undefined) {
|
||||
signatureReference.current = data.signature;
|
||||
localStorage.setItem("elysium_save_signature", data.signature);
|
||||
}
|
||||
setLoginStreak(data.loginStreak);
|
||||
setSchemaOutdated(data.schemaOutdated);
|
||||
setSaveSchemaVersion(data.state.schemaVersion ?? 0);
|
||||
setCurrentSchemaVersion(data.currentSchemaVersion);
|
||||
setInGuild(data.inGuild);
|
||||
} catch (error_: unknown) {
|
||||
setError(
|
||||
error_ instanceof Error
|
||||
? error_.message
|
||||
: "Failed to load game",
|
||||
);
|
||||
}
|
||||
}, []);
|
||||
|
||||
reloadSilentReference.current = reloadSilent;
|
||||
|
||||
useEffect(() => {
|
||||
enableSoundsReference.current = enableSounds;
|
||||
}, [ enableSounds ]);
|
||||
@@ -1294,7 +1351,7 @@ export const GameProvider = ({
|
||||
if (enableNotificationsReference.current) {
|
||||
sendNotification("⭐ Prestige!", "You have ascended!");
|
||||
}
|
||||
await reloadReference.current();
|
||||
await reloadSilentReference.current();
|
||||
}).
|
||||
catch(() => {
|
||||
|
||||
@@ -1810,7 +1867,18 @@ export const GameProvider = ({
|
||||
|
||||
const collectExploration = useCallback(
|
||||
async(areaId: string): Promise<ExploreCollectResponse> => {
|
||||
isSyncingReference.current = true;
|
||||
const result = await collectExplorationApi({ areaId });
|
||||
|
||||
/*
|
||||
* Collect mutates server state outside the normal save flow — clear the
|
||||
* stale HMAC signature and reset the timer so the next auto-save fires
|
||||
* after React has re-rendered with the new materials in stateReference.
|
||||
*/
|
||||
signatureReference.current = null;
|
||||
localStorage.removeItem("elysium_save_signature");
|
||||
lastSaveReference.current = Date.now();
|
||||
isSyncingReference.current = false;
|
||||
setState((previous) => {
|
||||
if (previous?.exploration === undefined) {
|
||||
return previous;
|
||||
@@ -2341,6 +2409,7 @@ export const GameProvider = ({
|
||||
offlineEssence,
|
||||
offlineGold,
|
||||
reload,
|
||||
reloadSilent,
|
||||
resetProgress,
|
||||
saveSchemaVersion,
|
||||
schemaOutdated,
|
||||
|
||||
@@ -24,7 +24,7 @@ export const RECIPES: Array<CraftingRecipe> = [
|
||||
zoneId: "verdant_vale",
|
||||
},
|
||||
{
|
||||
bonus: { type: "combat_power", value: 1.08 },
|
||||
bonus: { type: "combat_power", value: 1.2 },
|
||||
description:
|
||||
"A ward fashioned from bark older than the kingdom. Its presence on the battlefield is not merely physical — something ancient watches through it.",
|
||||
id: "elder_bark_shield",
|
||||
@@ -102,7 +102,7 @@ export const RECIPES: Array<CraftingRecipe> = [
|
||||
zoneId: "shadow_marshes",
|
||||
},
|
||||
{
|
||||
bonus: { type: "combat_power", value: 1.1 },
|
||||
bonus: { type: "combat_power", value: 1.15 },
|
||||
description:
|
||||
"The cursed bone and shadow essence combined into a focus that doesn't so much help your party fight as make things afraid of them before the battle begins.",
|
||||
id: "cursed_focus",
|
||||
@@ -128,7 +128,7 @@ export const RECIPES: Array<CraftingRecipe> = [
|
||||
zoneId: "volcanic_depths",
|
||||
},
|
||||
{
|
||||
bonus: { type: "combat_power", value: 1.12 },
|
||||
bonus: { type: "combat_power", value: 1.2 },
|
||||
description:
|
||||
"The legendary ore, smelted in the volcanic forges with magma stone as fuel. What emerges is something the fire elementals recognise — and fear slightly.",
|
||||
id: "elemental_ore_ingot",
|
||||
@@ -194,7 +194,7 @@ export const RECIPES: Array<CraftingRecipe> = [
|
||||
|
||||
// Zone 8: abyssal_trench
|
||||
{
|
||||
bonus: { type: "combat_power", value: 1.15 },
|
||||
bonus: { type: "combat_power", value: 1.25 },
|
||||
description:
|
||||
"Trench coral and pressure gem combined under conditions that should have destroyed both. The result is something that survived conditions nothing should survive, which is ideal for combat.",
|
||||
id: "pressure_forged_core",
|
||||
@@ -272,7 +272,7 @@ export const RECIPES: Array<CraftingRecipe> = [
|
||||
|
||||
// Zone 11: void_sanctum
|
||||
{
|
||||
bonus: { type: "combat_power", value: 1.18 },
|
||||
bonus: { type: "combat_power", value: 1.28 },
|
||||
description:
|
||||
"Null matter and resonance fragments assembled into something that generates a field where the laws governing how hard things are to kill become negotiable.",
|
||||
id: "null_field_generator",
|
||||
@@ -310,7 +310,7 @@ export const RECIPES: Array<CraftingRecipe> = [
|
||||
zoneId: "eternal_throne",
|
||||
},
|
||||
{
|
||||
bonus: { type: "combat_power", value: 1.2 },
|
||||
bonus: { type: "combat_power", value: 1.3 },
|
||||
description:
|
||||
"An eternity splinter set into crown fragments, shaped into a ring. What it binds is unclear. Whatever it is, it makes your party significantly harder to kill.",
|
||||
id: "eternity_bound_ring",
|
||||
@@ -376,7 +376,7 @@ export const RECIPES: Array<CraftingRecipe> = [
|
||||
|
||||
// Zone 15: reality_forge
|
||||
{
|
||||
bonus: { type: "combat_power", value: 1.22 },
|
||||
bonus: { type: "combat_power", value: 1.35 },
|
||||
description:
|
||||
"Forge ash smelted with creation tools into an ingot of compressed reality. Your party hits harder when carrying it. Reality does not enjoy being concentrated like this.",
|
||||
id: "reality_ingot",
|
||||
@@ -428,7 +428,7 @@ export const RECIPES: Array<CraftingRecipe> = [
|
||||
|
||||
// Zone 17: primeval_sanctum
|
||||
{
|
||||
bonus: { type: "combat_power", value: 1.25 },
|
||||
bonus: { type: "combat_power", value: 1.4 },
|
||||
description:
|
||||
"Ancient dust and memory shards arranged into something that remembers how to fight before fighting was invented. Your party benefits from this instinct enormously.",
|
||||
id: "ancient_memory_array",
|
||||
@@ -466,7 +466,7 @@ export const RECIPES: Array<CraftingRecipe> = [
|
||||
zoneId: "the_absolute",
|
||||
},
|
||||
{
|
||||
bonus: { type: "combat_power", value: 1.3 },
|
||||
bonus: { type: "combat_power", value: 1.55 },
|
||||
description:
|
||||
"The last omega crystal, set at the convergence of boundary shards in the precise arrangement of an ending. What it does to combat is what endings do to everything: make it final.",
|
||||
id: "omega_convergence",
|
||||
|
||||
+193
-17
@@ -11,7 +11,6 @@
|
||||
/* eslint-disable max-lines -- Engine file necessarily exceeds line limit */
|
||||
/* eslint-disable import/group-exports -- Exports appear alongside their definitions for readability */
|
||||
/* eslint-disable import/exports-last -- Exports appear alongside their definitions for readability */
|
||||
/* eslint-disable unicorn/no-array-reduce -- reduce is the most readable approach for multiplier chains */
|
||||
/* eslint-disable max-nested-callbacks -- Tick engine requires nested array operations for game logic */
|
||||
import {
|
||||
type Achievement,
|
||||
@@ -21,6 +20,7 @@ import {
|
||||
getActiveCompanionBonus,
|
||||
} from "@elysium/types";
|
||||
import { EQUIPMENT_SETS } from "../data/equipmentSets.js";
|
||||
import { EXPLORATION_AREAS } from "../data/explorations.js";
|
||||
import { updateChallengeProgress } from "../utils/dailyChallenges.js";
|
||||
|
||||
/**
|
||||
@@ -83,6 +83,12 @@ const checkAchievements = (state: GameState): Array<Achievement> => {
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Exponential base for the prestige combat multiplier: Math.pow(base, prestigeCount).
|
||||
* Replaces the former linear formula (1 + count * 0.1) to enable late-game zone progression.
|
||||
*/
|
||||
export const PRESTIGE_COMBAT_BASE = 4;
|
||||
|
||||
/**
|
||||
* Maximum value any resource can accumulate to. Beyond this JS floats lose all useful precision.
|
||||
*/
|
||||
@@ -243,10 +249,128 @@ export const computeEssencePerSecond = (state: GameState): number => {
|
||||
return essencePerSecond;
|
||||
};
|
||||
|
||||
/**
|
||||
* Computes the effective per-unit stats for a single adventurer type,
|
||||
* applying all active multipliers (upgrades, prestige, equipment, echo,
|
||||
* crafted, companion). The returned values represent what a single
|
||||
* adventurer of this type currently contributes per second, matching the
|
||||
* per-unit contribution used by computeGoldPerSecond and
|
||||
* computeEssencePerSecond.
|
||||
* @param state - The current game state.
|
||||
* @param adventurerId - The ID of the adventurer to compute stats for.
|
||||
* @returns Effective per-unit goldPerSecond, essencePerSecond, and combatPower.
|
||||
*/
|
||||
export const computeEffectiveAdventurerStats = (
|
||||
state: GameState,
|
||||
adventurerId: string,
|
||||
): { combatPower: number; essencePerSecond: number; goldPerSecond: number } => {
|
||||
const adventurer = state.adventurers.find((a) => {
|
||||
return a.id === adventurerId;
|
||||
});
|
||||
|
||||
/* V8 ignore next 3 -- @preserve */
|
||||
if (adventurer === undefined) {
|
||||
return { combatPower: 0, essencePerSecond: 0, goldPerSecond: 0 };
|
||||
}
|
||||
|
||||
const upgradeMultiplier = state.upgrades.
|
||||
filter((upgrade) => {
|
||||
const isGlobal = upgrade.target === "global";
|
||||
const isThisAdventurer
|
||||
= upgrade.target === "adventurer"
|
||||
&& upgrade.adventurerId === adventurerId;
|
||||
return upgrade.purchased && (isGlobal || isThisAdventurer);
|
||||
}).
|
||||
reduce((mult, upgrade) => {
|
||||
return mult * upgrade.multiplier;
|
||||
}, 1);
|
||||
|
||||
const equippedItems = state.equipment.filter((item) => {
|
||||
return item.equipped;
|
||||
});
|
||||
const equipmentGoldMultiplier = equippedItems.reduce((mult, item) => {
|
||||
return mult * (item.bonus.goldMultiplier ?? 1);
|
||||
}, 1);
|
||||
const equipmentCombatMultiplier = equippedItems.reduce((mult, item) => {
|
||||
return mult * (item.bonus.combatMultiplier ?? 1);
|
||||
}, 1);
|
||||
const equippedItemIds = equippedItems.map((item) => {
|
||||
return item.id;
|
||||
});
|
||||
const setBonuses = computeSetBonuses(equippedItemIds, EQUIPMENT_SETS);
|
||||
|
||||
const runestonesIncome = state.prestige.runestonesIncomeMultiplier ?? 1;
|
||||
const runestonesEssence = state.prestige.runestonesEssenceMultiplier ?? 1;
|
||||
const prestigeCombatMultiplier = PRESTIGE_COMBAT_BASE ** state.prestige.count;
|
||||
const echoIncome = state.transcendence?.echoIncomeMultiplier ?? 1;
|
||||
const echoCombatMultiplier = state.transcendence?.echoCombatMultiplier ?? 1;
|
||||
const craftedGoldMultiplier
|
||||
= state.exploration?.craftedGoldMultiplier ?? 1;
|
||||
const craftedEssenceMultiplier
|
||||
= state.exploration?.craftedEssenceMultiplier ?? 1;
|
||||
const craftedCombatMultiplier
|
||||
= state.exploration?.craftedCombatMultiplier ?? 1;
|
||||
|
||||
const companionBonus = getActiveCompanionBonus(
|
||||
state.companions?.activeCompanionId,
|
||||
state.companions?.unlockedCompanionIds ?? [],
|
||||
);
|
||||
const companionGoldMult
|
||||
= companionBonus?.type === "passiveGold"
|
||||
? 1 + companionBonus.value
|
||||
: 1;
|
||||
const companionEssenceMult
|
||||
= companionBonus?.type === "essenceIncome"
|
||||
? 1 + companionBonus.value
|
||||
: 1;
|
||||
const companionCombatMult
|
||||
= companionBonus?.type === "bossDamage"
|
||||
? 1 + companionBonus.value
|
||||
: 1;
|
||||
|
||||
const goldPerSecond
|
||||
= adventurer.goldPerSecond
|
||||
* upgradeMultiplier
|
||||
* state.prestige.productionMultiplier
|
||||
* runestonesIncome
|
||||
* echoIncome
|
||||
* equipmentGoldMultiplier
|
||||
* setBonuses.goldMultiplier
|
||||
* craftedGoldMultiplier
|
||||
* companionGoldMult;
|
||||
|
||||
const essencePerSecond
|
||||
= adventurer.essencePerSecond
|
||||
* upgradeMultiplier
|
||||
* state.prestige.productionMultiplier
|
||||
* runestonesEssence
|
||||
* craftedEssenceMultiplier
|
||||
* companionEssenceMult;
|
||||
|
||||
const combatPower
|
||||
= adventurer.combatPower
|
||||
* upgradeMultiplier
|
||||
* prestigeCombatMultiplier
|
||||
* equipmentCombatMultiplier
|
||||
* setBonuses.combatMultiplier
|
||||
* echoCombatMultiplier
|
||||
* craftedCombatMultiplier
|
||||
* companionCombatMult;
|
||||
|
||||
return { combatPower, essencePerSecond, goldPerSecond };
|
||||
};
|
||||
|
||||
/**
|
||||
* Computes the party's total combat power, applying all active multipliers
|
||||
* (upgrades, prestige, equipment, set bonuses, echo, crafted, companion).
|
||||
* This mirrors the server-side calculatePartyStats in boss.ts.
|
||||
* This mirrors the server-side calculatePartyStats in boss.ts and is the
|
||||
* single source of truth for all combat-power checks in the client:
|
||||
* - Displayed as "Combat Power" in the resource bar
|
||||
* - Displayed as "Party DPS" in the boss panel
|
||||
* - Used to gate quest availability
|
||||
* Note: the active companion's bossDamage bonus is intentionally included
|
||||
* here, as it applies to the full combat power calculation (boss fights and
|
||||
* quest gating alike), matching the server-side behaviour.
|
||||
* @param state - The current game state.
|
||||
* @returns The total party combat power.
|
||||
*/
|
||||
@@ -258,8 +382,7 @@ export const computePartyCombatPower = (state: GameState): number => {
|
||||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line stylistic/no-mixed-operators -- prestige count * factor is clear
|
||||
const prestigeMultiplier = 1 + state.prestige.count * 0.1;
|
||||
const prestigeMultiplier = PRESTIGE_COMBAT_BASE ** state.prestige.count;
|
||||
|
||||
const equipmentCombatMultiplier = state.equipment.
|
||||
filter((item) => {
|
||||
@@ -327,6 +450,36 @@ export const computePartyCombatPower = (state: GameState): number => {
|
||||
* companionCombatMult;
|
||||
};
|
||||
|
||||
const basePrestigeThreshold = 1_000_000;
|
||||
const runestonesPerPrestigeLevelClient = 15;
|
||||
const maxBaseRunestones = 200;
|
||||
|
||||
/**
|
||||
* Computes the projected runestone reward if the player were to prestige right now.
|
||||
* Mirrors the server-side calculateRunestones formula exactly.
|
||||
* @param state - The current game state.
|
||||
* @returns The number of runestones the player would earn from a prestige now.
|
||||
*/
|
||||
export const computeProjectedRunestones = (state: GameState): number => {
|
||||
const { count, purchasedUpgradeIds } = state.prestige;
|
||||
const threshold = basePrestigeThreshold * Math.pow(count + 1, 2);
|
||||
const base = Math.min(
|
||||
Math.floor(Math.cbrt(state.player.totalGoldEarned / threshold))
|
||||
* runestonesPerPrestigeLevelClient,
|
||||
maxBaseRunestones,
|
||||
);
|
||||
const gain1Mult = purchasedUpgradeIds.includes("runestone_gain_1")
|
||||
? 1.25
|
||||
: 1;
|
||||
const gain2Mult = purchasedUpgradeIds.includes("runestone_gain_2")
|
||||
? 1.5
|
||||
: 1;
|
||||
const runestoneMult = gain1Mult * gain2Mult;
|
||||
const echoMult: number
|
||||
= state.transcendence?.echoPrestigeRunestoneMultiplier ?? 1;
|
||||
return Math.floor(base * runestoneMult * echoMult);
|
||||
};
|
||||
|
||||
/**
|
||||
* Pure function — applies one game tick to the state.
|
||||
* DeltaSeconds: time elapsed since last tick.
|
||||
@@ -634,6 +787,23 @@ export const applyTick = (
|
||||
...updatedDailyChallenges === undefined
|
||||
? {}
|
||||
: { dailyChallenges: updatedDailyChallenges },
|
||||
...newlyUnlockedZoneIds.size === 0 || state.exploration === undefined
|
||||
? {}
|
||||
: {
|
||||
exploration: {
|
||||
...state.exploration,
|
||||
areas: state.exploration.areas.map((area) => {
|
||||
const areaDefinition = EXPLORATION_AREAS.find((definition) => {
|
||||
return definition.id === area.id;
|
||||
});
|
||||
return areaDefinition !== undefined
|
||||
&& newlyUnlockedZoneIds.has(areaDefinition.zoneId)
|
||||
&& area.status === "locked"
|
||||
? { ...area, status: "available" as const }
|
||||
: area;
|
||||
}),
|
||||
},
|
||||
},
|
||||
adventurers: updatedAdventurers,
|
||||
bosses: updatedBosses,
|
||||
equipment: updatedEquipmentReference,
|
||||
@@ -647,24 +817,30 @@ export const applyTick = (
|
||||
zones: updatedZones,
|
||||
};
|
||||
|
||||
// Check achievements and apply crystal rewards for newly unlocked ones
|
||||
// Check achievements and apply crystal and runestone rewards for newly unlocked ones
|
||||
const updatedAchievements = checkAchievements(partialState);
|
||||
const crystalsFromAchievements = updatedAchievements.reduce(
|
||||
(sum, achievement, index) => {
|
||||
const wasLocked = state.achievements[index]?.unlockedAt === null;
|
||||
const isNowUnlocked = achievement.unlockedAt !== null;
|
||||
if (wasLocked && isNowUnlocked) {
|
||||
return sum + (achievement.reward?.crystals ?? 0);
|
||||
}
|
||||
return sum;
|
||||
},
|
||||
0,
|
||||
);
|
||||
let crystalsFromAchievements = 0;
|
||||
let runestonesFromAchievements = 0;
|
||||
for (const [ index, achievement ] of updatedAchievements.entries()) {
|
||||
const wasLocked = state.achievements[index]?.unlockedAt === null;
|
||||
const isNowUnlocked = achievement.unlockedAt !== null;
|
||||
if (wasLocked && isNowUnlocked) {
|
||||
crystalsFromAchievements
|
||||
= crystalsFromAchievements + (achievement.reward?.crystals ?? 0);
|
||||
runestonesFromAchievements
|
||||
= runestonesFromAchievements + (achievement.reward?.runestones ?? 0);
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
...partialState,
|
||||
achievements: updatedAchievements,
|
||||
resources: {
|
||||
prestige: {
|
||||
...partialState.prestige,
|
||||
runestones:
|
||||
partialState.prestige.runestones + runestonesFromAchievements,
|
||||
},
|
||||
resources: {
|
||||
...partialState.resources,
|
||||
crystals: capResource(
|
||||
partialState.resources.crystals + crystalsFromAchievements,
|
||||
|
||||
@@ -49,6 +49,18 @@ const initialiseFrontendLogger = (): void => {
|
||||
? argument
|
||||
: JSON.stringify(argument);
|
||||
}).join(" ");
|
||||
|
||||
/*
|
||||
* Ignore errors originating entirely from third-party scripts (e.g. AdSense).
|
||||
* Stack frames from our own code reference elysium.nhcarrigan.com or localhost;
|
||||
* if none are present but external URLs are, the error is not actionable.
|
||||
*/
|
||||
const hasExternalUrl = (/https?:\/\//u).test(message);
|
||||
const hasOurDomain = message.includes("elysium.nhcarrigan.com");
|
||||
const hasOwnFrame = hasOurDomain || message.includes("localhost");
|
||||
if (hasExternalUrl && !hasOwnFrame) {
|
||||
return;
|
||||
}
|
||||
const context = "console.error";
|
||||
post("/api/fe/error", { context, message });
|
||||
};
|
||||
|
||||
+150
@@ -0,0 +1,150 @@
|
||||
/**
|
||||
* Dev Puppeteer script — intercepts /api/game/load and injects a fresh
|
||||
* game state built from the actual compiled data files, so we can browse
|
||||
* the game UI without auth or a real DB record.
|
||||
*/
|
||||
import puppeteer from "puppeteer";
|
||||
import { createRequire } from "module";
|
||||
|
||||
const require = createRequire(import.meta.url);
|
||||
|
||||
// Load actual game data from compiled API output
|
||||
const { defaultAchievements } = require("./apps/api/prod/src/data/achievements.js");
|
||||
const { defaultEquipment } = require("./apps/api/prod/src/data/equipment.js");
|
||||
const { defaultBosses } = require("./apps/api/prod/src/data/bosses.js");
|
||||
const { defaultQuests } = require("./apps/api/prod/src/data/quests.js");
|
||||
const { defaultAdventurers } = require("./apps/api/prod/src/data/adventurers.js");
|
||||
const { defaultUpgrades } = require("./apps/api/prod/src/data/upgrades.js");
|
||||
const { defaultZones } = require("./apps/api/prod/src/data/zones.js");
|
||||
|
||||
console.log("📦 Data loaded:");
|
||||
console.log(` achievements : ${defaultAchievements.length}`);
|
||||
console.log(` equipment : ${defaultEquipment.length}`);
|
||||
console.log(` bosses : ${defaultBosses.length}`);
|
||||
console.log(` quests : ${defaultQuests.length}`);
|
||||
|
||||
// Spot-check for our new items
|
||||
const newEquipIds = [
|
||||
"chaos_mantle", "titan_core", "expanse_blade", "void_armour_mk2",
|
||||
"cosmos_blade", "reality_plate", "maelstrom_edge", "cosmic_plate",
|
||||
"primeval_blade", "ancient_aegis", "absolute_blade", "eternity_plate",
|
||||
"omniversal_core",
|
||||
];
|
||||
const foundNew = newEquipIds.filter(id => defaultEquipment.some(e => e.id === id));
|
||||
const missingNew = newEquipIds.filter(id => !defaultEquipment.some(e => e.id === id));
|
||||
console.log(`\n🗡️ New equipment found (${foundNew.length}/13): ${foundNew.join(", ")}`);
|
||||
if (missingNew.length > 0) console.log(` ❌ Missing: ${missingNew.join(", ")}`);
|
||||
|
||||
const questEternal = defaultAchievements.find(a => a.id === "quest_eternal");
|
||||
const fullyEquipped = defaultAchievements.find(a => a.id === "fully_equipped");
|
||||
console.log(`\n🏆 quest_eternal condition amount : ${questEternal?.condition?.amount}`);
|
||||
console.log(`🏆 fully_equipped condition amount: ${fullyEquipped?.condition?.amount}`);
|
||||
|
||||
// Build a minimal but valid mock game state
|
||||
const mockState = {
|
||||
achievements : defaultAchievements,
|
||||
adventurers : defaultAdventurers,
|
||||
baseClickPower: 1,
|
||||
bosses : defaultBosses,
|
||||
equipment : defaultEquipment,
|
||||
lastTickAt : Date.now(),
|
||||
player : {
|
||||
avatar : null,
|
||||
characterName : "Hikari Test",
|
||||
createdAt : Date.now(),
|
||||
discordId : "000000000000000001",
|
||||
discriminator : "0",
|
||||
lastSavedAt : Date.now(),
|
||||
lifetimeAchievementsUnlocked: 0,
|
||||
lifetimeAdventurersRecruited: 0,
|
||||
lifetimeBossesDefeated : 0,
|
||||
lifetimeClicks : 0,
|
||||
lifetimeGoldEarned : 0,
|
||||
lifetimeQuestsCompleted : 0,
|
||||
totalClicks : 0,
|
||||
totalGoldEarned : 0,
|
||||
username : "HikariTest",
|
||||
},
|
||||
prestige : {
|
||||
count : 0,
|
||||
runestones : 0,
|
||||
},
|
||||
quests : defaultQuests,
|
||||
resources : {
|
||||
crystals : 0,
|
||||
essence : 0,
|
||||
gold : 0,
|
||||
},
|
||||
upgrades : defaultUpgrades,
|
||||
zones : defaultZones,
|
||||
};
|
||||
|
||||
const mockLoadResponse = {
|
||||
currentSchemaVersion: 1,
|
||||
inGuild : true,
|
||||
loginBonus : null,
|
||||
loginStreak : 0,
|
||||
offlineEssence : 0,
|
||||
offlineGold : 0,
|
||||
offlineSeconds : 0,
|
||||
schemaOutdated : false,
|
||||
signature : undefined,
|
||||
state : mockState,
|
||||
};
|
||||
|
||||
console.log("\n🌐 Launching browser...");
|
||||
const browser = await puppeteer.launch({
|
||||
args : ["--no-sandbox", "--disable-setuid-sandbox"],
|
||||
headless: false,
|
||||
});
|
||||
|
||||
const page = await browser.newPage();
|
||||
await page.setViewport({ height: 900, width: 1400 });
|
||||
|
||||
// Intercept the game load call and inject our mock state
|
||||
await page.setRequestInterception(true);
|
||||
page.on("request", (req) => {
|
||||
if (req.url().includes("/api/game/load") && req.method() === "GET") {
|
||||
console.log(" ↩️ Intercepted /api/game/load — injecting mock state");
|
||||
req.respond({
|
||||
body : JSON.stringify(mockLoadResponse),
|
||||
contentType : "application/json",
|
||||
headers : { "Content-Type": "application/json" },
|
||||
status : 200,
|
||||
});
|
||||
} else {
|
||||
req.continue();
|
||||
}
|
||||
});
|
||||
|
||||
// Set a fake token so the frontend thinks we're logged in
|
||||
await page.evaluateOnNewDocument(() => {
|
||||
localStorage.setItem("elysium_token", "dev.fake.token");
|
||||
});
|
||||
|
||||
console.log(" 🔗 Navigating to http://localhost:5173 ...");
|
||||
await page.goto("http://localhost:5173", { waitUntil: "networkidle2" });
|
||||
|
||||
// Give the game a moment to tick and render
|
||||
await new Promise(r => setTimeout(r, 3000));
|
||||
|
||||
await page.screenshot({ path: "/tmp/elysium-01-game.png" });
|
||||
console.log(" 📸 Screenshot: /tmp/elysium-01-game.png");
|
||||
|
||||
// Try to find the equipment panel
|
||||
const equipmentTab = await page.$("button, a, [role='tab']");
|
||||
console.log(`\n🔍 Checking page title: ${await page.title()}`);
|
||||
|
||||
// Log any visible text that mentions our new items
|
||||
const pageText = await page.evaluate(() => document.body.innerText);
|
||||
const newItemsVisible = newEquipIds.filter(id => pageText.toLowerCase().includes(id.replace(/_/g, " ").toLowerCase().slice(0, 8)));
|
||||
console.log(`\n🗡️ New item names visible in UI: ${newItemsVisible.length > 0 ? newItemsVisible.join(", ") : "none yet (may need to navigate to equipment panel)"}`);
|
||||
|
||||
// Check achievement counts visible in page
|
||||
const hasQuestEternal = pageText.includes("112");
|
||||
const hasFullyEquipped = pageText.includes("78");
|
||||
console.log(` quest_eternal (112) visible: ${hasQuestEternal}`);
|
||||
console.log(` fully_equipped (78) visible: ${hasFullyEquipped}`);
|
||||
|
||||
console.log("\n✅ Browser open — take a look around! Close it when done.");
|
||||
console.log(" (or Ctrl+C to exit)\n");
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "elysium",
|
||||
"version": "0.3.2",
|
||||
"version": "0.4.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
@@ -11,6 +11,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nhcarrigan/typescript-config": "4.0.0",
|
||||
"typescript": "5.9.3"
|
||||
"typescript": "6.0.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@elysium/types",
|
||||
"version": "0.3.2",
|
||||
"version": "0.4.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "./prod/src/index.js",
|
||||
|
||||
@@ -20,7 +20,8 @@ interface AchievementCondition {
|
||||
}
|
||||
|
||||
interface AchievementReward {
|
||||
crystals?: number;
|
||||
crystals?: number;
|
||||
runestones?: number;
|
||||
}
|
||||
|
||||
interface Achievement {
|
||||
|
||||
@@ -48,11 +48,17 @@ interface ProfileSettings {
|
||||
* Whether browser system notifications are enabled.
|
||||
*/
|
||||
enableNotifications: boolean;
|
||||
|
||||
/**
|
||||
* Whether prestige milestones are announced in the Discord server.
|
||||
*/
|
||||
enablePrestigeAnnouncements: boolean;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention -- intentional constant name
|
||||
const DEFAULT_PROFILE_SETTINGS: ProfileSettings = {
|
||||
enableNotifications: false,
|
||||
enablePrestigeAnnouncements: true,
|
||||
enableSounds: false,
|
||||
numberFormat: "suffix",
|
||||
showAchievementsUnlocked: true,
|
||||
|
||||
Generated
+8
-8
@@ -10,10 +10,10 @@ importers:
|
||||
devDependencies:
|
||||
'@nhcarrigan/typescript-config':
|
||||
specifier: 4.0.0
|
||||
version: 4.0.0(typescript@5.9.3)
|
||||
version: 4.0.0(typescript@6.0.2)
|
||||
typescript:
|
||||
specifier: 5.9.3
|
||||
version: 5.9.3
|
||||
specifier: 6.0.2
|
||||
version: 6.0.2
|
||||
|
||||
apps/api:
|
||||
dependencies:
|
||||
@@ -2833,8 +2833,8 @@ packages:
|
||||
engines: {node: '>=14.17'}
|
||||
hasBin: true
|
||||
|
||||
typescript@5.9.3:
|
||||
resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==}
|
||||
typescript@6.0.2:
|
||||
resolution: {integrity: sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ==}
|
||||
engines: {node: '>=14.17'}
|
||||
hasBin: true
|
||||
|
||||
@@ -3507,9 +3507,9 @@ snapshots:
|
||||
dependencies:
|
||||
typescript: 5.8.2
|
||||
|
||||
'@nhcarrigan/typescript-config@4.0.0(typescript@5.9.3)':
|
||||
'@nhcarrigan/typescript-config@4.0.0(typescript@6.0.2)':
|
||||
dependencies:
|
||||
typescript: 5.9.3
|
||||
typescript: 6.0.2
|
||||
|
||||
'@nodelib/fs.scandir@2.1.5':
|
||||
dependencies:
|
||||
@@ -6147,7 +6147,7 @@ snapshots:
|
||||
|
||||
typescript@5.8.2: {}
|
||||
|
||||
typescript@5.9.3: {}
|
||||
typescript@6.0.2: {}
|
||||
|
||||
unbox-primitive@1.1.0:
|
||||
dependencies:
|
||||
|
||||
Reference in New Issue
Block a user