"use client"; // 回响星核 / Echo Nexus — 飞升(Prestige)对话框 import { useGameStore } from "@/store/gameStore"; import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, } from "@/components/ui/dialog"; import { Button } from "@/components/ui/button"; import { RotateCcw, Sparkles, Star, BookOpen } from "lucide-react"; import { PRESTIGE } from "@/lib/game/config"; import { computeNewBlueprints, computePrestigeBonus } from "@/lib/game/engine"; import { constellationProgress } from "@/lib/game/constellation"; import { useState } from "react"; import { useToast } from "@/hooks/use-toast"; import { sfx } from "@/hooks/useAudio"; export function PrestigeDialog({ open, onOpenChange, }: { open: boolean; onOpenChange: (v: boolean) => void; }) { const state = useGameStore(); const doPrestige = useGameStore((s) => s.doPrestige); const { toast } = useToast(); const [confirming, setConfirming] = useState(false); const [canReconfirm, setCanReconfirm] = useState(false); const newBp = computeNewBlueprints(state); const bonus = computePrestigeBonus(state); const totalBpAfter = Math.min(PRESTIGE.maxBlueprints, state.blueprints.length + newBp); const cProgress = constellationProgress(state.constellation ?? []); return ( 飞升 · 跨越维度 当接触进度满溢,你将跨越维度与以太族相会。本次飞升将重置资源与技术,但保留记忆图谱与蓝图加成。
{/* 本次飞升获得 */}
本次获得蓝图 +{newBp}

蓝图总数将达 {totalBpAfter}/{PRESTIGE.maxBlueprints}(每 {PRESTIGE.blueprintsPerDecode} 次解码产出 1 张)

{/* 永久加成 */}
{/* 保留 / 重置 */}
保留:记忆图谱、累计解码数、飞升次数、蓝图、星图天赋
重置:晶体、洞见、技术树、接触进度、待解码晶体
{/* 星图觉醒预告 */}
星图觉醒预告
飞升后将从 3 道随机天赋中选 1,永久获得加成 {cProgress.unlocked < cProgress.total && ( · 当前 {cProgress.unlocked}/{cProgress.total} )}
{cProgress.unlocked < cProgress.total ? "✦ 可觉醒" : "✧ 已圆满"}
{/* 编年史铭刻提示(v0.4 新增) */}
本次飞升将铭刻入回响编年史, 记录本周目的解码、探险、星潮与觉醒天赋,形成永恒叙事时间轴。
); } function BonusCard({ label, value, color, }: { label: string; value: string; color: string; }) { return (
{label}
{value}
); }