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:
@@ -9,6 +9,7 @@ import type {
|
||||
ExpeditionResult,
|
||||
GameState,
|
||||
} from "./types";
|
||||
import { constellationBonuses } from "./constellation";
|
||||
|
||||
/** 简单可复现随机(mulberry32) */
|
||||
function makeRng(seed: number) {
|
||||
@@ -173,7 +174,7 @@ export function generateExpedition(
|
||||
};
|
||||
}
|
||||
|
||||
/** 计算探险力(由技术树 + 飞升蓝图) */
|
||||
/** 计算探险力(由技术树 + 飞升蓝图 + 星图天赋) */
|
||||
export function computeExpeditionPower(state: GameState): number {
|
||||
let power = EXPEDITION_CONFIG.basePower;
|
||||
// 探险分支技术加成
|
||||
@@ -185,6 +186,9 @@ export function computeExpeditionPower(state: GameState): number {
|
||||
power *= 1 + (state.blueprints?.length ?? 0) * 0.08;
|
||||
// 飞升周目加成
|
||||
power *= 1 + (state.ascensions ?? 0) * 0.15;
|
||||
// 星图「信标矩阵」加成
|
||||
const cm = constellationBonuses(state.constellation ?? []);
|
||||
power *= cm.expeditionPowerMult;
|
||||
return Math.round(power);
|
||||
}
|
||||
|
||||
@@ -193,6 +197,9 @@ export function computeExpeditionHp(state: GameState): number {
|
||||
let hp = EXPEDITION_CONFIG.baseHp;
|
||||
hp += (state.tech?.exp_2 ?? 0) * 20;
|
||||
hp += (state.ascensions ?? 0) * 10;
|
||||
// 星图「维生护盾」加成
|
||||
const cm = constellationBonuses(state.constellation ?? []);
|
||||
hp = Math.round(hp * cm.expeditionHpMult);
|
||||
return hp;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user