generated from nhcarrigan/template
feat: add codex / lore book with 364 entries
Implements a full in-game Codex panel that tracks lore discovery across seven categories: bosses (72), quests (95), zones (18), equipment (65), adventurer tiers (32), upgrades (57), and prestige upgrades (25). Lore entries unlock automatically as players progress — existing completions are retroactively and silently added on first load. New discoveries trigger a toast notification and badge counter on the Codex tab.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
export type { CodexEntry, CodexState } from "./interfaces/Codex.js";
|
||||
export type {
|
||||
Achievement,
|
||||
AchievementCondition,
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
export interface CodexEntry {
|
||||
id: string;
|
||||
title: string;
|
||||
content: string;
|
||||
sourceType: "boss" | "quest" | "equipment" | "adventurer" | "upgrade" | "prestige" | "zone";
|
||||
sourceId: string;
|
||||
zoneId: string;
|
||||
}
|
||||
|
||||
export interface CodexState {
|
||||
unlockedEntryIds: string[];
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
import type { Achievement } from "./Achievement.js";
|
||||
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 { Equipment } from "./Equipment.js";
|
||||
import type { Player } from "./Player.js";
|
||||
@@ -27,4 +28,6 @@ export interface GameState {
|
||||
lastTickAt: number;
|
||||
/** Daily challenge progress — optional for backwards compatibility with old saves */
|
||||
dailyChallenges?: DailyChallengeState;
|
||||
/** Lore codex unlock state — optional for backwards compatibility with old saves */
|
||||
codex?: CodexState;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user