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:
2026-06-23 14:12:37 +00:00
parent f3d2e53e4f
commit 9f4d839c6b
18 changed files with 1002 additions and 36 deletions
+24
View File
@@ -167,6 +167,30 @@ export const ACHIEVEMENTS: Achievement[] = [
reward: { insights: 8 },
rewardText: "+8 洞见",
},
{
id: "ach_constellation_1",
name: "星图初绘",
desc: "觉醒第 1 道星图天赋",
icon: "✨",
color: "#e879f9",
check: (s) => (s.constellation?.length ?? 0) >= 1,
reward: { insights: 30, crystalsPerSecPct: 5 },
rewardText: "+30 洞见 · 产能 +5%",
},
{
id: "ach_constellation_6",
name: "六分星辉",
desc: "觉醒 6 道星图天赋(每类各 1 道)",
icon: "✺",
color: "#34d399",
check: (s) => {
const c = s.constellation ?? [];
const cats = new Set(c.map((id) => id.split("_")[1]));
return cats.size >= 6 && c.length >= 6;
},
reward: { crystalsPerSecPct: 12, insightPct: 12 },
rewardText: "产能 +12% · 洞见 +12%",
},
];
/** 计算成就提供的永久加成(跨周目保留) */