generated from nhcarrigan/template
feat: add transcendence second prestige layer
Implements the full Transcendence system — the ultimate endgame mechanic, unlocked by defeating The Absolute One (requires Prestige 90). Nuclear reset model: wipes resources, prestige, runestones, upgrades, equipment, bosses, quests, zones, and achievements. Codex entries and lifetime profile stats are preserved. Transcendence data is permanent and accumulates across all future resets. Echo formula: floor(853 / sqrt(prestigeCount)) × echoMetaMultiplier Fewer prestiges = more Echoes, rewarding optimised play. 15 Echo upgrades across 5 categories: - Income multipliers (×1.25 → ×5): 5 tiers, cost 5–80 echoes - Combat multipliers (×1.25 → ×2): 3 tiers, cost 5–35 echoes - Prestige threshold reductions (×0.9, ×0.8): cost 8–20 echoes - Prestige runestone multipliers (×1.5, ×2): cost 8–20 echoes - Echo meta multipliers (×1.25 → ×2): cost 10–50 echoes New files: Transcendence.ts types, transcendence service, route, data files (API + web), TranscendencePanel.tsx component. Modified: GameState, Api, types/index, prestige service (carries transcendence through resets, applies echo multipliers), boss route (echoCombatMultiplier), game.ts anti-cheat (echo cap), tick.ts (echoIncomeMultiplier), GameContext, API client, GameLayout (new tab), ResourceBar (transcendence badge alongside prestige badge), styles.css, AboutPanel, IDEAS.md.
This commit is contained in:
@@ -12,6 +12,8 @@ export type {
|
||||
AuthResponse,
|
||||
BossChallengeRequest,
|
||||
BossChallengeResponse,
|
||||
BuyEchoUpgradeRequest,
|
||||
BuyEchoUpgradeResponse,
|
||||
BuyPrestigeUpgradeRequest,
|
||||
BuyPrestigeUpgradeResponse,
|
||||
GiteaRelease,
|
||||
@@ -21,6 +23,8 @@ export type {
|
||||
PublicProfileResponse,
|
||||
SaveRequest,
|
||||
SaveResponse,
|
||||
TranscendenceRequest,
|
||||
TranscendenceResponse,
|
||||
UpdateProfileRequest,
|
||||
UpdateProfileResponse,
|
||||
} from "./interfaces/Api.js";
|
||||
@@ -59,3 +63,8 @@ export type {
|
||||
export type { Zone, ZoneStatus } from "./interfaces/Zone.js";
|
||||
export type { NumberFormat, ProfileSettings } from "./interfaces/ProfileSettings.js";
|
||||
export { DEFAULT_PROFILE_SETTINGS } from "./interfaces/ProfileSettings.js";
|
||||
export type {
|
||||
TranscendenceData,
|
||||
TranscendenceUpgrade,
|
||||
TranscendenceUpgradeCategory,
|
||||
} from "./interfaces/Transcendence.js";
|
||||
|
||||
@@ -127,6 +127,29 @@ export interface UpdateProfileResponse {
|
||||
profileSettings: ProfileSettings;
|
||||
}
|
||||
|
||||
export interface TranscendenceRequest {
|
||||
characterName: string;
|
||||
}
|
||||
|
||||
export interface TranscendenceResponse {
|
||||
echoes: number;
|
||||
newTranscendenceCount: number;
|
||||
}
|
||||
|
||||
export interface BuyEchoUpgradeRequest {
|
||||
upgradeId: string;
|
||||
}
|
||||
|
||||
export interface BuyEchoUpgradeResponse {
|
||||
echoesRemaining: number;
|
||||
purchasedUpgradeIds: string[];
|
||||
echoIncomeMultiplier: number;
|
||||
echoCombatMultiplier: number;
|
||||
echoPrestigeThresholdMultiplier: number;
|
||||
echoPrestigeRunestoneMultiplier: number;
|
||||
echoMetaMultiplier: number;
|
||||
}
|
||||
|
||||
export interface ApiError {
|
||||
error: string;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import type { Adventurer } from "./Adventurer.js";
|
||||
import type { Boss } from "./Boss.js";
|
||||
import type { CodexState } from "./Codex.js";
|
||||
import type { DailyChallengeState } from "./DailyChallenge.js";
|
||||
import type { TranscendenceData } from "./Transcendence.js";
|
||||
import type { Equipment } from "./Equipment.js";
|
||||
import type { Player } from "./Player.js";
|
||||
import type { PrestigeData } from "./Prestige.js";
|
||||
@@ -30,4 +31,6 @@ export interface GameState {
|
||||
dailyChallenges?: DailyChallengeState;
|
||||
/** Lore codex unlock state — optional for backwards compatibility with old saves */
|
||||
codex?: CodexState;
|
||||
/** Transcendence (second prestige layer) state — optional for backwards compatibility */
|
||||
transcendence?: TranscendenceData;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
export type TranscendenceUpgradeCategory =
|
||||
| "income"
|
||||
| "combat"
|
||||
| "prestige_threshold"
|
||||
| "prestige_runestones"
|
||||
| "echo_meta";
|
||||
|
||||
export interface TranscendenceUpgrade {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
category: TranscendenceUpgradeCategory;
|
||||
/** Echo cost to purchase */
|
||||
cost: number;
|
||||
/** Multiplicative effect of this upgrade */
|
||||
multiplier: number;
|
||||
}
|
||||
|
||||
export interface TranscendenceData {
|
||||
/** Number of times the player has transcended */
|
||||
count: number;
|
||||
/** Echoes accumulated across all transcendences */
|
||||
echoes: number;
|
||||
/** IDs of echo upgrades purchased with echoes */
|
||||
purchasedUpgradeIds: string[];
|
||||
/** Pre-computed: multiplier applied to all passive gold income */
|
||||
echoIncomeMultiplier: number;
|
||||
/** Pre-computed: multiplier applied to party DPS in boss fights */
|
||||
echoCombatMultiplier: number;
|
||||
/** Pre-computed: multiplier applied to the prestige gold threshold (< 1 lowers requirement) */
|
||||
echoPrestigeThresholdMultiplier: number;
|
||||
/** Pre-computed: multiplier applied to runestones earned per prestige */
|
||||
echoPrestigeRunestoneMultiplier: number;
|
||||
/** Pre-computed: multiplier applied to echo yield on future transcendences */
|
||||
echoMetaMultiplier: number;
|
||||
}
|
||||
Reference in New Issue
Block a user