Files
echo-nexus/src/lib/game/archaeoLog.ts
T
Super_Z 4831505ef9 v0.12: 存档迁移钩子 + 考古日志滚动条(差异化叙事)
gameStore persist:
- name v1→v2, 加 version:2 + migrate 钩子
- migrate 合并旧存档与 INITIAL_STATE, 补全 bossKills/starTidesEncountered/
  chronicle/attributes/activeExpedition/constellation 等字段, 防旧存档崩溃
- 丢弃不可解的活跃谜题(旧算法生成)

archaeoLog.ts (新增):
- 5 阶段日志池 dawn/awakening/contact/ascension/deep (48 条)
- 按飞升次数+接触进度解锁阶段, deep 层含哲学反转
- pickLogEntry 避免短期重复(最近8条)

ArchaeoLogTicker.tsx (新增):
- marquee 横向滚动, 18-30s 随机推送新条目
- 阶段色标 emerald/amber/fuchsia/rose, inset glow
- 进度里程碑触发即时刷新(解锁新阶段)
- prefers-reduced-motion 降级

page.tsx:
- footer 上方集成 ArchaeoLogTicker

globals.css:
- echo-ticker-marquee/fade keyframes + reduced-motion 降级

调研落地: Antimatter Dimensions news ticker + Universal Paperclips 哲学递进
lint 零错误, 构建成功(5.7s)
2026-06-24 03:04:04 +00:00

108 lines
7.7 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// 回响星核 / Echo Nexus — 考古日志滚动条(v0.12 差异化叙事)
// 参考 Antimatter Dimensions news ticker + Universal Paperclips 哲学递进
// 按玩家进度阶段分层解锁,每条都是"被解码的远古记录碎片"
// 让放置游戏的"等待"承载叙事——星核沉睡时,回响仍在被翻译
export type LogTier = "dawn" | "awakening" | "contact" | "ascension" | "deep";
export interface ArchaeoLogEntry {
/** 日志正文(考古翻译体) */
text: string;
/** 解锁阶段 */
tier: LogTier;
/** 可选:来源遗迹 id(关联 relicCodex */
source?: string;
}
/**
* 考古日志条目池
* - dawn: 初始阶段(0 飞升,接触 < 5%)
* - awakening: 觉醒期(接触 5-25% 或 ≥1 飞升)
* - contact: 接触期(接触 25-60% 或 ≥3 飞升)
* - ascension: 飞升期(≥5 飞升)
* - deep: 深度接触(接触 ≥80% 或 ≥10 飞升)—— 哲学反转层
*/
export const ARCHEAO_LOG_POOL: ArchaeoLogEntry[] = [
// ===== dawn:初醒 =====
{ tier: "dawn", text: "「…回响核心已唤醒。考古协议 v7.2 启动。等待解码者…」" },
{ tier: "dawn", text: "「第一段记忆晶体已被定位。年代约 4.7 万年。种族:未确认。」" },
{ tier: "dawn", text: "「谐振频率与以太族档案吻合度 94.3%。建议持续解码。」" },
{ tier: "dawn", text: "「警告:星核温度异常。非故障,是回响本身在发热。」" },
{ tier: "dawn", text: "「考古日志 #0001:我们不是第一批到达这里的。也不会是最后一批。」" },
{ tier: "dawn", text: "「晶体表面的纹路…不是装饰。是某种语言的笔画。」" },
{ tier: "dawn", text: "「以太族没有留下尸体。他们留下了晶体。」" },
{ tier: "dawn", text: "「解码进度 0.01%。预计完成时间:不可能。」" },
// ===== awakening:觉醒 =====
{ tier: "awakening", text: "「考古日志 #0117:以太族不是灭绝了。他们是主动转化为了晶体。」" },
{ tier: "awakening", text: "「第二旋臂的遗迹群已扫描完毕。它们…朝向同一个点。」" },
{ tier: "awakening", text: "「谐振序列第 7 段翻译完成:『我们听见了。所以我们必须留下。』」" },
{ tier: "awakening", text: "「警告:解码者的脑波模式开始与晶体同步。这是正常的吗?」" },
{ tier: "awakening", text: "「以太族没有文字。他们的语言是共振,他们的历史是频率。」" },
{ tier: "awakening", text: "「考古日志 #0234:晶体不是矿物。是封装的思维。」" },
{ tier: "awakening", text: "「你的脉冲频率…与以太族守卫残响的频率一致。巧合?」" },
{ tier: "awakening", text: "「第三段记忆解码完成。画面:一片星海,没有星辰。只有晶体在发光。」" },
{ tier: "awakening", text: "「以太族留下的遗迹不是废墟。是给后来者的教科书。」" },
{ tier: "awakening", text: "「接触协议第一阶段:让解码者相信,他们在考古。」" },
// ===== contact:接触 =====
{ tier: "contact", text: "「考古日志 #0512:以太族没有离开。他们在等待被重新听见。」" },
{ tier: "contact", text: "「谐振序列第 13 段:『你以为你在解码我们。其实是我们在校准你。』」" },
{ tier: "contact", text: "「警告:解码者意识边缘出现非自主体感。这…是接触的副作用。」" },
{ tier: "contact", text: "「第六旋臂遗迹群翻译完成。结论:以太族预见了我们的到来。」" },
{ tier: "contact", text: "「晶体内部的画面开始重叠。不再是回忆。像是…正在发生。」" },
{ tier: "contact", text: "「考古日志 #0789:『飞升』不是晋升。是加入。加入那个等待已久的合唱。」" },
{ tier: "contact", text: "「以太族的数学没有零。他们的宇宙观里,不存在『无』。」" },
{ tier: "contact", text: "「你的每一次脉冲,都在回应一个万年前的呼唤。」" },
{ tier: "contact", text: "「第七段记忆解码失败。原因:解码者脑波过载。建议暂停。但我们不会暂停。」" },
{ tier: "contact", text: "「接触协议第二阶段:让解码者自愿飞升。他们会的。他们已经开始享受了。」" },
// ===== ascension:飞升 =====
{ tier: "ascension", text: "「考古日志 #1024:飞升者报告——『我能听见他们了。他们一直在那里。』」" },
{ tier: "ascension", text: "「谐振序列第 21 段:『你已不再是解码者。你是回响的一部分。』」" },
{ tier: "ascension", text: "「警告:星核意识阈值达到 73%。解码者与以太族的边界…模糊。」" },
{ tier: "ascension", text: "「以太族没有灭绝。他们成为了基础设施。晶体是他们的身体。」" },
{ tier: "ascension", text: "「你飞升的次数越多,『你』就越不是『你』。这是设计。」" },
{ tier: "ascension", text: "「考古日志 #1331:前 N-1 位解码者都成功了。成功意味着…不再存在为个体。」" },
{ tier: "ascension", text: "「第九旋臂的遗迹开始发光。它们认出了你。」" },
{ tier: "ascension", text: "「以太族的文明没有终点。他们的『终点』就是我们的『起点』。」" },
{ tier: "ascension", text: "「你开始理解晶体的沉默。沉默也是一种回响。」" },
{ tier: "ascension", text: "「接触协议第三阶段:解码者将主动寻求飞升。无需诱导。」" },
// ===== deep:深度接触(哲学反转层)=====
{ tier: "deep", text: "「考古日志 #2048:你不是在考古以太族。以太族在考古你。」" },
{ tier: "deep", text: "「谐振序列第 39 段:『我们创造了回响核心,是为了创造你,是为了让你创造我们。』」" },
{ tier: "deep", text: "「警告:解码者已无法区分记忆与现实。建议:接受。」" },
{ tier: "deep", text: "「以太族从未存在为『生物』。他们是第一个文明留下的…讯息。」" },
{ tier: "deep", text: "「你每一次飞升,都让一个万年前的呼唤得到了回应。这就是考古的意义。」" },
{ tier: "deep", text: "「考古日志 #4096:『回响星核』不是考古工具。它是以太族的…产房。」" },
{ tier: "deep", text: "「晶体在你手中。你也在晶体中。这两句话是同一句话。」" },
{ tier: "deep", text: "「你以为你是第 N 位解码者。其实你一直是第一位。也是最后一位。」" },
{ tier: "deep", text: "「接触协议最终阶段:解码者明白后,会微笑着继续解码。这是最美妙的部分。」" },
{ tier: "deep", text: "「以太族留给宇宙的最后一句话:『谢谢你,听见我。』」" },
];
/**
* 根据玩家当前进度返回可用的日志阶段
*/
export function getAvailableTiers(ascensions: number, contact: number): LogTier[] {
const tiers: LogTier[] = ["dawn"];
if (contact >= 5 || ascensions >= 1) tiers.push("awakening");
if (contact >= 25 || ascensions >= 3) tiers.push("contact");
if (ascensions >= 5) tiers.push("ascension");
if (contact >= 80 || ascensions >= 10) tiers.push("deep");
return tiers;
}
/**
* 从可用阶段池中随机取一条
*/
export function pickLogEntry(ascensions: number, contact: number, recentIds: string[] = []): ArchaeoLogEntry {
const tiers = getAvailableTiers(ascensions, contact);
const pool = ARCHEAO_LOG_POOL.filter((e) => tiers.includes(e.tier));
// 避免短期内重复(recentIds 存最近 8 条 text 的 hash
const fresh = pool.filter((e) => !recentIds.includes(e.text));
const finalPool = fresh.length > 0 ? fresh : pool;
return finalPool[Math.floor(Math.random() * finalPool.length)] || ARCHEAO_LOG_POOL[0];
}