feat(v0.3.1): 星图天文台元进程天赋系统 — 18 天赋 / 3 选 1 draft / Canvas 动态星图
- 新增 src/lib/game/constellation.ts:6 类别 × 3 天赋 = 18 个永久天赋, constellationBonuses() 聚合 19 项修饰器,rollPerkChoices() 保证不同类别 - 状态扩展:GameState.constellation / pendingPerkChoices - engine.ts: recomputeStats 聚合三层加成(技术+蓝图+成就+星图), performPrestige 触发天赋选择 + 飞升礼包补偿,新增 rollCrystalTierWithBonus - expedition.ts: 探险力/生命应用星座修饰器 - gameStore.ts: 新增 chooseConstellationPerk + rerollPerkChoices 动作, 全链路接入(tickTide/autoDecodeTick/clickNode 等用点) - 新增 ConstellationPanel.tsx: Canvas 动态星图(六边形 6 星座 × 3 星点, 闪烁/光晕/十字光线/连接线/中心星核呼吸)+ Hover 提示 + 类别图例 - 新增 ConstellationDialog.tsx: 飞升后自动弹出,3 卡片 draft + 重新抽取 - PrestigeDialog: 增加「星图觉醒预告」卡片 - page.tsx: 6 列标签栏 + 顶部「觉醒」按钮 + 统计面板加星图天赋 - audio.ts: 新增 constellation SFX(上升琶音 + 高频闪光) - achievements.ts: 新增「星图初绘」「六分星辉」2 项成就 - QA: agent-browser + VLM 全流程通过;lint 零错误;编译 < 200ms - 二次回应 Issue #1:从「连连看」扩展为 6 大玩法层 + 元进程 draft
This commit is contained in:
@@ -10,9 +10,10 @@ import {
|
||||
DialogFooter,
|
||||
} from "@/components/ui/dialog";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { RotateCcw, Sparkles } from "lucide-react";
|
||||
import { RotateCcw, Sparkles, Star } 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";
|
||||
@@ -32,6 +33,7 @@ export function PrestigeDialog({
|
||||
const newBp = computeNewBlueprints(state);
|
||||
const bonus = computePrestigeBonus(state);
|
||||
const totalBpAfter = Math.min(PRESTIGE.maxBlueprints, state.blueprints.length + newBp);
|
||||
const cProgress = constellationProgress(state.constellation ?? []);
|
||||
|
||||
return (
|
||||
<Dialog open={open} onOpenChange={onOpenChange}>
|
||||
@@ -83,13 +85,32 @@ export function PrestigeDialog({
|
||||
<div className="text-[11px] text-muted-foreground space-y-1 pt-1">
|
||||
<div className="flex items-center gap-1.5">
|
||||
<Sparkles className="h-3 w-3 text-fuchsia-400" />
|
||||
保留:记忆图谱、累计解码数、飞升次数、蓝图
|
||||
保留:记忆图谱、累计解码数、飞升次数、蓝图、星图天赋
|
||||
</div>
|
||||
<div className="flex items-center gap-1.5">
|
||||
<RotateCcw className="h-3 w-3 text-rose-400" />
|
||||
重置:晶体、洞见、技术树、接触进度、待解码晶体
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 星图觉醒预告 */}
|
||||
<div className="rounded-lg border border-fuchsia-400/30 bg-gradient-to-r from-fuchsia-950/40 to-purple-950/40 p-2.5">
|
||||
<div className="flex items-center gap-2">
|
||||
<Star className="h-4 w-4 text-fuchsia-300" />
|
||||
<div className="flex-1">
|
||||
<div className="text-[12px] text-fuchsia-200 font-bold">星图觉醒预告</div>
|
||||
<div className="text-[10px] text-muted-foreground">
|
||||
飞升后将从 3 道随机天赋中选 1,永久获得加成
|
||||
{cProgress.unlocked < cProgress.total && (
|
||||
<span className="text-fuchsia-300/80"> · 当前 {cProgress.unlocked}/{cProgress.total}</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<div className="text-[10px] text-fuchsia-300/70 font-mono">
|
||||
{cProgress.unlocked < cProgress.total ? "✦ 可觉醒" : "✧ 已圆满"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<DialogFooter>
|
||||
|
||||
Reference in New Issue
Block a user